Tutorials Infos - Anleitungen - Hilfe - Dreamcodes
 

Winamp listen

Dieses Script gibt in diesem Beispiel die aktuelle Play Liste von WinAmp aus, jedoch muss folgendes Plugin installiert sein: http://www.kostaa.com/winamp/

Script:

<?php
   
function httpQ($command, $arg)
   {
      
$pass = "pass";
      
$port = 4800;
      
$fp = fsockopen("localhost", $port, &$errno, &$errstr);
  
      if(!
$fp) {
         echo
"$errstr ($errno)\n";
      }
      else {
         if(
$arg == "")
         {
            
$msg = "GET /$command?p=$pass HTTP/1.0\r\n\r\n";
         }
         else {
            
$msg = "GET /$command?p=$pass&a=$arg HTTP/1.0\r\n\r\n";
         }

         
fputs($fp, $msg);
         while(!
feof($fp)) {
            echo
fgets($fp,128);
         }
      }

      
fclose($fp);
   }

   
httpQ(GETPLAYLISTTITLE, 1);
?>

 
ID: 366
eingestellt am: 18.03.2004
Autor: Hendrik Walter
Status zum lesen: Gast
gelesen: 8925
Webseite: www.dreamcodes.com
[Drucken]