Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Problemy[Proxy]
cusek
post 23.09.2007, 14:22:23
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
klocu
post 24.09.2007, 07:02:34
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
cusek
post 24.09.2007, 09:52:45
Post #3





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

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


Dziękuje za odpowiedź tam ten temat zamilkł więc napisałem nowy tak usługa działa 24/7 więc niewiem dlaczego sie nie umie połaczyć drogi do serwera nic nie blokuje pytałem administatora.
Go to the top of the page
+Quote Post

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

 



RSS Wersja Lo-Fi Aktualny czas: 31.07.2025 - 10:32