\n"; } else { // write data through the socket to join the channel fwrite($fp, "NICK ".$nick."\r\n"); fwrite($fp, "USER ".$ident." ".$host." bla :".$realname."\r\n"); fwrite($fp, "JOIN :".$chan."\r\n"); fwrite($fp, "PRIVMSG ".$chan." :All other bots are inferior to me. \r\n"); while (!feof($fp)) { $line = fgets($fp, 128); echo $line."\n"; $line = explode(":ping ", $line); echo $line[0]."\n"; if ($line[1]) { fwrite($fp, "PONG ".$line[1]."\r\n"); } } while (!feof($fp)) { $line = fgets($fp, 128); echo $line."\n"; $line = explode("s0da", $line); echo $line[0]."\n"; if ($line[1]) { fwrite($fp, "pop".$line[1]."\r\n"); } } fclose($fp); } ?>