Monitor aria l2 in Sockets & GDlib

  • 0 Risposte
  • 1345 Visite

0 Utenti e 1 Visitatore stanno visualizzando questo topic.

*

Offline 3n1gm4

  • *****
  • 8432
  • 256
  • Chiamami 02-303123903
    • Mostra profilo
    • nigma blog
Monitor aria l2 in Sockets & GDlib
« il: Settembre 25, 2005, 03:41:53 pm »
Codice: [Seleziona]
<?php
if ($_GET['t'] == 'l') { $t "Login"; }
if (
$_GET['t'] == 'g') { $t "Game"; }
 
$server='www.dutch-gamer.nl';
 
set_time_limit(0);
 
$fp pfsockopen ("$server"80);
 if (!
$fp
   {
       echo 
"Si è verificato un errore: $errstr ($errno)<br>";
   }
   else 
      {   

          
$send "GET /IA/ HTTP/1.1
Host: www.dutch-gamer.nl
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: it,it-it;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://www.dutch-gamer.nl/
Content-Type: application/x-www-form-urlencoded
"
;
          
$send explode("\n"$send);
          
$i 0;
          while (
$i <= count($send)-1)
             {
                
fputs ($fp$send[$i] ."\n");
               
$i++;
            };
          
$i 0;
          while (!
feof($fp)) 
               {
                  
$buffer fgets($fp40960);
                  if ( (
$i == 53) && ($t == "Login") || ($i ==55) && ($t == "Game") ) 
                     {
// <td><center><img src="green.gif" alt="Status: Up, Domain: 70.86.134.66, Port: 7777">
                        
$port substr($bufferstrlen($buffer)-74);
                        if (
strstr($buffer'green')) { $img "http://www.dutch-gamer.nl/IA/green.gif"; }
                        if (
strstr($buffer'red')) { $img "http://www.dutch-gamer.nl/IA/red.gif"; }
                        
$i imagecreatefromgif($img);
                        
$x 2;
                        
$y 7;
                        
$contrasto imagecolorallocate($i000);
                        
$testo imagecolorallocate($i255255255);
                        
imagestring($i3$x-1$y+1$t$contrasto);
                        
imagestring($i3$x-1$y+1$t$contrasto);
                        
imagestring($i3$x+1$y-1$t$contrasto);
                        
imagestring($i3$x+1$y-1$t$contrasto);
                        
imagestring($i3$x$y$t$testo);
                        
header('Content-type: image/gif');
                          
imagegif($i);
                          
imagedestroy($i);
                        
//echo "Port: " . substr($buffer, strlen($buffer)-7, 4) . $buf/fer . "<br />\n";
                     
}
                  
$i++;
               } 
      };
?>



« Ultima modifica: Settembre 25, 2005, 09:22:14 pm da 3n1gm4 »

nigma blog
Impara Il Sardo 1 2
vengo a cagliari di persona accompagnato dall'armata elfica per giocare a quake3arena dentro casa tua!