I have make a small modul to irc...... :
<?php
$sock = fsockopen("gizeh.memphisnet.org", "6667");
$wn = rand(1,99);
fputs($sock,"NICK moulaf[$wn]\n");
fputs($sock,"USER K moulaf[$wn] gizeh.memphisnet.org :realname\n");
if(ereg("[0-9]+$", $match[1]))
$done = 1;
else
{
// this might have been a PING message, check for it
if($match[0] == "PING")
{
// yes it was a PING, reply with a PONG
irc_put_message("PONG $match[1]");
}
else
{
if($match[0] == "ERROR")
{
return(0);
}
}
// this wasn't an important server message, get the next one
// by doing another iteration
}
fputs($sock,"PING :gizeh.memphisnet.org\n");
fputs($sock,"PONG :gizeh.memphisnet.org\n");
while (!feof($sock)) {
$arf = fgets($sock, 1024);
echo "$arf<br>";
}
fputs($sock,"LUSERS\n");
fclose($sock);
?>
When I launch, the modul respond to me :
:gizeh.memphisnet.org NOTICE AUTH : Recherche de votre hostname...
:gizeh.memphisnet.org NOTICE AUTH : Hostname trouvé (cached)
:gizeh.memphisnet.org NOTICE AUTH : Recherche ident...
:gizeh.memphisnet.org NOTICE AUTH : Recherche des ports ouvert...
:gizeh.memphisnet.org NOTICE AUTH : Pas de réponses de l'ident; ident préfixé par ~
:gizeh.memphisnet.org NOTICE AUTH : Pas de ports trouvés (good!)...
:gizeh.memphisnet.org NOTICE moulaf[98] :*** If you are having problems connecting due to ping timeouts, please type /quote pong 134A87 or /raw pong 134A87 now.
PING :134A87
:gizeh.memphisnet.org 451 PING :You have not registered
:134A87!nospoof@gizeh.memphisnet.org PRIVMSG moulaf[98] :VERSION
ERROR :Closing Link: moulaf[98][194.51.146.66] (Ping timeout)
Thank for your help and sorry for the bad english 😛 !