marson
02-19-2008, 04:42 PM
Hello people,
I'm with problems for this script bellow:
<?php
$server_ip = "200.181.171.8";
$server_port = 28960; //if I change to a server in "28961" this script don't work =/
$server_ip = "udp://" . $server_ip;
$serverip = substr($server_ip, 6);
$connect = fsockopen($server_ip, $server_port, $errno, $errstr, 30);
if ($connect)
{
socket_set_timeout ($connect, 1, 000000);
$send = "\xFF\xFF\xFF\xFF\x02rcon "."password"." "."say hello"."\x0a\x00";
fwrite ($connect, $send);
fclose($connect);
}
else
{
echo "ERROR: $errno - $errstr<br />\n";
}
?>
this script just work with port default of COD4 (28960), but I want to find some solution for it work with ports different of default port.
I'm sorry by my poor english. =/
Help me plz.
Marson
I'm with problems for this script bellow:
<?php
$server_ip = "200.181.171.8";
$server_port = 28960; //if I change to a server in "28961" this script don't work =/
$server_ip = "udp://" . $server_ip;
$serverip = substr($server_ip, 6);
$connect = fsockopen($server_ip, $server_port, $errno, $errstr, 30);
if ($connect)
{
socket_set_timeout ($connect, 1, 000000);
$send = "\xFF\xFF\xFF\xFF\x02rcon "."password"." "."say hello"."\x0a\x00";
fwrite ($connect, $send);
fclose($connect);
}
else
{
echo "ERROR: $errno - $errstr<br />\n";
}
?>
this script just work with port default of COD4 (28960), but I want to find some solution for it work with ports different of default port.
I'm sorry by my poor english. =/
Help me plz.
Marson