Ciao vi scrivo per sapere che vuol dire questo errore che mi da' non appena eseguo una pagina in php che svolge una query.
Premesso la query permette di interrogare un server
su cui gira Unreal Tournament e mi da' come "risultato":
1) chi sta giocando
2) i frag ecc. ecc.
ecco l'errore appena l'eseguo
Notice: Undefined variable: errno in /membri/kbm/phpBB2/utquery/index.php on line 71
Notice: Undefined variable: errstr in /membri/kbm/phpBB2/utquery/index.php on line 71
Warning: fsockopen,pfsockpen,show_source,php_uname,ini_alte r,ini_restore,
getrusage,set_time_limit,getmypid,dl,leak,listen,s ystem,exec,passthru,
popen,chmod,chown,chgrp,symlink,link,putenv,linkin fo,readlink,
lstat,ini_set,diskfreespace,tmpfile,tempnam() has been disabled for security reasons in /membri/kbm/phpBB2/utquery/index.php on line 71
Notice: Undefined variable: errstr in /membri/kbm/phpBB2/utquery/index.php on line 75
Notice: Undefined variable: errno in /membri/kbm/phpBB2/utquery/index.php on line 75
()
Sembra come che ci siano delle restrizioni da parte dei server Altervista
per quanto riguarda le query su socks.
Aggiungo e poi chiudo, che ho provato il listato da un altro sito e funzika alla meraviglia...
MI sapete aiutare? GRAZIE in anticipo :-)
Inviato: 21 Lug 2003 17:22 Soggetto:
--------------------------------------------------------------------------------
Allego pure la riga 71
$sock = fsockopen("udp://" . $txtip, $txtportnum, $errno, $errstr,4);
e la riga 75
echo "$errstr ($errno)<br>\n";
QUESTO QUI SOTTO e' un pezzo dello script dove mi da' l' errore
//Return if no variables are set (exit)
if (isset($_GET['txtip']) != 1) return;
//Get variables from the URL
$txtip = $_GET['txtip'];
$txtportnum = $_GET['portnum'];
//If there is no IP, return (exit)
if (strlen($txtip) == 0) return;
//Open UDP socket to server
$sock = fsockopen("udp://" . $txtip, $txtportnum, $errno, $errstr,4);
//Check if we have a socket open, if not, display error message
if (!$sock) {
echo "$errstr ($errno)<br>\n";
exit;
}
{
fputs($sock,"\\status\\\player_property\Health\\\g ame_property\ElapsedTime\\\game_property\Remaining Time\\");
$gotfinal = False;
$data = "";
//Set starttime, for possible loop expiration, so the server doesn't get too much work.
$starttime = Time();
//Loop until final packet has been received.
while(!($gotfinal == True || feof($sock))) {
//Get data
if(($buf = fgetc($sock)) == FALSE) {
usleep(100); // wait for additional data? :S whatever
}
//Add to databuffer
$data .= $buf;
//Check if final item (queryid) has been received
if (strpos($data,"final\\") != False) {
$gotfinal = True;
}
//Protect webserver against massive loop.
if ((Time() - $starttime) > 5) {
echo "Data receiving took too long. Cancelled.<P>";
$gotfinal = True;
}
}
//Close socket
fclose ($sock);
//Split chunks by \
$chunks = split('[\]', $data);
_______________
http://www.kbm.altervista.org/phpBB2...-ban-small.gif
--FORUM--
