When i connect to server with sockets.

Locked
langeda9
Posts: 1
Joined: Wed May 17, 2006 8:10 pm

When i connect to server with sockets.

Post by langeda9 »

When i connecting to a server fks
ip:64.147.171.197:27950
port:27964

i cant make a connection. Is there something else and the IP i shall write in host?

please help
NOTE: IT IS PHP SOCKETS IM CONNECTING WITH
Im currently here, because i got problems with sockets.
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Post by ^misantropia^ »

Err... is this what you need?

Code: Select all

$host = '64.147.171.197';
$port = 27964; // NOTE: the Q3 default is 27960
$sock = @fsockopen("udp://$host", $port, $errno, $errstr);
if (!$sock) {
    echo "Error $errno: $errstr\n";
    exit;
}
// ...
fclose($sock);
Fjoggs
Posts: 2555
Joined: Fri May 03, 2002 7:00 am

Re: When i connect to server with sockets.

Post by Fjoggs »

langeda9 wrote:When i connecting to a server fks
ip:64.147.171.197:27950
port:27964
NOTE: IT IS PHP SOCKETS IM CONNECTING WITH
that's not an ip, that's an ip with a port, remove the 27950.
Locked