Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $stream_1 = fsockopen('NOPR','AVI',$errno,$errstr,1);
- $stream_2 = fsockopen('NOPE','AVI',$errno,$errstr,1);
- if($stream_1 && $stream_2)
- {
- echo '1';
- 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");
- 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");
- while(!feof($stream_1))
- {
- $xml_1 = fgets($stream_1, 8192);
- }
- while(!feof($stream_2))
- {
- $xml_2 = fgets($stream_2, 8192);
- }
- fclose($stream_1);
- fclose($stream_2);
- $tmp_1 = fopen("stream-1.xml", "w+");
- $tmp_2 = fopen("stream-2.xml", "w+");
- fwrite($tmp_1, $xml_1);
- fwrite($tmp_2, $xml_2);
- fclose($tmp_1);
- fclose($tmp_2);
- flush();
- }
- else
- {
- echo '0';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment