TeamBlast

dubbeats php (old)

Dec 12th, 2011
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.80 KB | None | 0 0
  1. <?php
  2. $stream_1 = fsockopen('NOPR','AVI',$errno,$errstr,1);
  3. $stream_2 = fsockopen('NOPE','AVI',$errno,$errstr,1);
  4.  
  5. if($stream_1 && $stream_2)
  6. {
  7.     echo '1';
  8.     fputs($stream_1, "GET /admin.cgi?pass=NOPE&mode=viewxml HTTP/1.0\r\nUser-Agent: SHOUTcast Song Status (Mozilla Compatible)\r\n\r\n");
  9.     fputs($stream_2, "GET /admin.cgi?pass=NOPE&mode=viewxml HTTP/1.0\r\nUser-Agent: SHOUTcast Song Status (Mozilla Compatible)\r\n\r\n");
  10.     while(!feof($stream_1))
  11.     {
  12.         $xml_1 = fgets($stream_1, 8192);
  13.     }
  14.     while(!feof($stream_2))
  15.     {
  16.         $xml_2 = fgets($stream_2, 8192);
  17.     }
  18.     fclose($stream_1);
  19.     fclose($stream_2);
  20.     $tmp_1 = fopen("stream-1.xml", "w+");
  21.     $tmp_2 = fopen("stream-2.xml", "w+");
  22.     fwrite($tmp_1, $xml_1);
  23.     fwrite($tmp_2, $xml_2);
  24.     fclose($tmp_1);
  25.     fclose($tmp_2);
  26.     flush();
  27. }
  28. else
  29. {
  30.     echo '0';
  31. }
  32. ?>
  33.  
Advertisement
Add Comment
Please, Sign In to add comment