socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); socket_bind($this->socket, $localhost); socket_connect($this->socket, $remotehost, $port); socket_write($this->socket,"USER " . $real . " " . $localhost . " " . $real . " " . $real . "\r\n"); socket_write($this->socket,"NICK " . $nick . "\r\n"); socket_write($this->socket,"JOIN #annihilation\r\n"); $this->readdata; } function readdata() { if ($rdata = socket_read($this->socket, 128)) { echo $rdata; flush(); } } } $IRC0 = new connection; $IRC1 = new connection; $IRC0->newc(0, "loli.catl.in", "irc.deltaanime.net", 6667, "Catlin", "Catlin", "Catlin"); $IRC1->newc(1, "loli.catl.in", "irc.deltaanime.net", 6667, "Catlin2", "Catlin", "Catlin"); while (1) { $IRC0->readdata(); $IRC1->readdata(); } ?>