sock = fsockopen($this->server, $this->port); fputs($this->sock, "USER $this->ident 127.0.0.1 localhost :$this->name\n\r"); fputs($this->sock, "NICK $this->nick\n\r"); //fputs($this->sock, "JOIN #devcol"); while (!feof($this->sock)) { $data = fgets($this->sock,512); echo "-> $data"; } } } $connect = new bot; $connect->connect(); ?>