I tried running an irc script that i found from someone.. and i altered it a bit.. but.. its only echoing.. "connection accepted..
can anyone tell me why.. or am i calling the script the wrong way?? here is the code
$irc_addy = "irc.domain.net";
$irc_port = "6667";
$nick = "phpxlordt";
if(!( $socket=fsockopen( $irc_addy, $irc_port )))
{
echo "Error Could not connect to $irc_addy";
}
echo "Connection accepted to: $irc_addy<br>\n\n";
for( $i=0; $i < 5; $i ++ )
{
fgets( $socket, 1024 );
}
$A = fputs( $socket, "Nick $nick\n\n" );
$ping = fgets($socket, 1024);
$pong = explode("PING :",$ping); $pong = "PONG ".$pong[1];
$A = fputs($socket,"USER xlord 0 0 xlord\n");
$A = fputs( $socket, "$pong\n" );
$A = fputs( $socket,"JOIN #chan\n");
$A = fputs( $socket,"PRIVMSG #chan xlordt\n");
$close = fputs( $socket, " Good bye\n");