');} //where to connect to //$target = '127.0.0.1'; $t = gethostbyname('Rokscom.NL.EU.GameSurge.net'); $tp = 6667; $nick = 'zbot'; $user = 'zbot'; $my_address = 'mijn ip'; $s = @fsockopen($t,$tp,$en,$es); //creating socket echo 'Attempting to create a socket..'.nl(); if($s){ echo 'Succes!'.nl(); }else{ die('Failed: reason: '.socket_strerror(socket_last_error()).nl()); } echo 'sending nick'.nl(); echo 'DEBUG - \'NICK '.$nick.'\''.nl(); fwrite($s, 'NICK '.$nick.'\r\n'); echo 'sending user'.nl(); echo 'DEBUG - \'USER '.$user.' '.$my_address.' '.$t.' :'.$user.'\''.nl(); fwrite($s, 'USER '.$user.' localhost '.$t.' '.$user.'\r\n'); while(!feof($s)){ $m = (fgets($s,128)).nl(); echo($m); } ?>