[Icecast] Parsing /admin/stats with PHP

Lance Earl lance at dallypost.com
Sun Mar 4 10:15:03 UTC 2007


I am trying to connect to my icecast server with the following php 
script and I keep getting an error. Script and errot follow:

$server = "www.dallypost.com:8000";
$user = "admin";
$passw = "my_pass_word";
$mountpoint = "/DallyPostRadio.ogg";

$fp = fopen("http://$user:$passw@$server/admin/stats","r")
         or die("Error reading Icecast data from $server.");

______________________________________________


*Warning*: fopen(http://...@www.dallypost.com:8000/admin/stats) 
[function.fopen <http://www.dallypost.com/a/radio/function.fopen>]: 
failed to open stream: HTTP request failed! HTTP/1.0 401 Authentication 
Required in */var/www/a/radio/server_data.php* on line *8*
Error reading Icecast data from www.dallypost.com:8000.


I sure will appreciate any help

Lance



More information about the Icecast mailing list