PhpIrc
| From: | Viva | Date: | Fri, 28 Jul 2000 10:52:01 +0000 |
| Subject: | PhpIrc | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-8759@lists.php.net to get a copy of this message | ||
Hi list,
I have set up an IRC Server ...a standalone server .
i wanna run the phpIrc client on it.
socket connection to the server is happening ,
but when i try writing to the socket and retrive data from the socket,
it gives me the foll. error
ERROR :Closing Link: a3981626[-nobody@10.1.2.34] (Unauthorized
connection) .
Cud anyone help me in rectifying this.
Here is the code i have been trying...
<?
$fp = fsockopen($server_name,6667);
if (!isset($fp))
{
echo "Connection failed";
}
else
{
echo "connection done<br>";
$irc_identd = "nobody";
$irc_host = $server_name;
$irc_realname = "TEMP";
$irc_nick = "a398156c";
fputs($fp,"USER $irc_identd $irc_host $server_name
:$irc_realname\n\r");
fputs($fp,"NICK $irc_nick\n\r");
$buffer = fgets($fp,1024);
echo "<br>buffer : $buffer";
fclose($fp);
}
?>
Thanx.
viva.
--
"There are three kinds of computer scientists:
Those who can count, and those who can't..."