Hey,
I've had this problem for a couple days now, and haven't been able to work it out.
I'm trying to connect to the Gamesurge IRC using PHP - though the code I am using times out and can't connect.
I thought it was my code, however I have searched the web for working codes and they all *seem* to do the same basic thing as mine.
So if anyone has any ideas as to why I am getting a timeout, I would appreciate it.
The code I'm using.
<?php
error_reporting(E_ERROR);
$cfg = array(
"server" => "irc.gamesurge.net",
"channel" => "#wiremod",
"port" => 6667,
"name" => "thetree PHP"
);
echo "Connecting to " . $cfg["server"] . " on port " . $cfg["port"] . "<br/>";
$socket = fsockopen($cfg["server"], $cfg["port"], $errno, $errstr, 5);
if (!$socket) {
echo("Error[$errno]: $errstr...<br/>");
}
else {
echo "Socket connection successful..<br/>";
}
fclose($socket);
?>
Hosted file:
http://joethetree.lil.org.uk/socket.php
Thanks
thetree