Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Problemy[Proxy]
cusek
post
Post #1





Grupa: Zarejestrowani
Postów: 32
Pomógł: 0
Dołączył: 22.09.2007

Ostrzeżenie: (0%)
-----


Witajcie

mam problem z pewnym skryptem wywala mi blad:

Kod
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request [i][url="http://www.bykowinateam.ovh.org/stan.php"]GET /stan.php[/url]

[/i]Reason:Error reading from remote server


Plik stan.php wygląda tak:

Kod
<?php

    /**
    * pobiera informacje z serwera i zwraca tablice z tymi danymi
    *
    * @param string $intServerIP  Adres IP serwera
    * @param integer $intServerPort  Port serwera
    * @return array
    */

    function RetriveInfo ( $strServerIP = '85.114.134.28', $intServerPort = 27019 )
    {
        $connection = fsockopen( "udp://" . $strServerIP, $intServerPort );
        fwrite( $connection, sprintf( '%c%c%c%c%s%c', 0xFF, 0xFF, 0xFF, 0xFF, "infostring", 0x00 ) );
        fread( $connection, 24 );
        $status = socket_get_status( $connection );
        if ( $status["unread_bytes"] != 0 )
        {
            $return = "";
            while ( $status["unread_bytes"] != 0 )
            {
                $return .= fread( $connection, 1 );
                $status = socket_get_status( $connection );
            }

        $return = explode( '', $return );

            $arr = array();
            $arr['ip'] = $intServerIP;
            $arr['port'] = $intServerPort;
            $arr['hostname'] = $return[19];
            $arr['game'] = $return[17];
            $arr['players'] = $return[5];
            $arr['maxplayers'] = $return[11];
            $arr['system'] = ( $return[25] == "l" ) ? "Windows" : "Linux";
            $arr['game_dir'] = $return[15];
            $arr['map'] = $return[21];
            $arr['password'] = ( $return[25] == "0" ) ? "false" : "true";
            $arr['secure'] = $return[29];
            return $arr;
        }
        else
        {
            // blad?
            return $arr;
        }
    }
?>



<?php
  $arr = RetriveInfo("85.114.134.28", "27019"); // gdzie te parametry to IP oraz port
  echo "IP: " . $arr['ip'];
  echo "<BR>";
  echo "Port: " . $arr['port'];
  echo "<BR>";
  echo "Nazwa servera: " . $arr['hostname'];
  echo "<BR>";
  echo "Gra: " . $arr['game'];
  echo "<BR>";
  echo "Ilosc graczy: " . $arr['players'];
  echo "<BR>";
  echo "Max graczy: " . $arr['maxplayers'];
  echo "<BR>";
  echo "System: " . $arr['system'];
  echo "<BR>";
  echo "Cos tam: " . $arr['game_dir'];
  echo "<BR>";
  echo "Mapa: " . $arr['players'];
  echo "<BR>";
  echo "Haslo: " . $arr['password'];
  echo "<BR>";
  echo "VAC: " . $arr[secure];
  echo "<BR>";
?>


Proszę o pomoc!!!!

Ten post edytował cusek 23.09.2007, 14:26:18
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
klocu
post
Post #2





Grupa: Zarejestrowani
Postów: 291
Pomógł: 45
Dołączył: 21.08.2007

Ostrzeżenie: (0%)
-----


a nie mogłeś kontynuować tamtego tematu? no nic.

a takie zasadnicze pytanie czy usługa o której rozmawaimy działa?? bo mnie port 27019 nie zgłasza się (connection refused), 80 tak samo cisza. jedyne co to odpowiada post ssh 22 reszty nie próbowałem.
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 6.10.2025 - 02:18