Guest User

Untitled

a guest
Nov 23rd, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. <?php
  2. $rap=$_GET['rap'];
  3. $fp=@fsockopen("ouvir.radioamorportugal.com","80",$errno,$errstr,10);
  4.  
  5. if(!$fp) {
  6. $stationinfo = 'Radio Amor Portugal';
  7. } else {
  8. fputs($fp,"GET /7 HTTP/1.1\nUser-Agent:Mozilla\n\n");
  9. for($i=0; $i<1; $i++) {
  10. if(feof($fp)) break;
  11. $fp_data=fread($fp,31337);
  12. usleep(500000);
  13. }
  14.  
  15. $fp_data = ereg_replace("^.*<body>","",$fp_data);
  16. $fp_data = ereg_replace("</body>.*","",$fp_data);
  17.  
  18. list($currentlisteners,$status,$peak,$max,$reported,$bit,$song) = explode(",", $fp_data, 7);
  19.  
  20.  
  21. $stationsong = $currentsong.' '.$song;
  22.  
  23. $stationinfo = $stationinfo . $currentlisteners.' of '.$peak.' '.$listenerlabel.'<br />';
  24.  
  25. }
  26. $stationsong = str_replace('Now Playing: ','',$stationsong);
  27. echo strpos($stationsong,"track");
  28.  
  29. if (strpos(strtolower($stationsong),'track')) {
  30. $stationsong="Informa��o indispon�vel!";
  31. }
  32.  
  33. if (strpos(strtolower($stationsong),'faixa')) {
  34. $stationsong="Informa��o indispon�vel!!";
  35. }
  36.  
  37. if (strpos(strtolower($stationsong),'piste')) {
  38. $stationsong="Informa��o indispon�vel!!";
  39. }
  40.  
  41. if($rap=="mr") {
  42. echo fixEncoding($stationsong);
  43. }else{
  44. echo '<p style="color: rgb(255, 255, 255); vertical-align: middle;">' . $stationsong . '<br /></p>';
  45. }
  46.  
  47. function fixEncoding($in_str)
  48. {
  49.  
  50. return $in_str;
  51. }
  52.  
  53. ?>
Add Comment
Please, Sign In to add comment