Jump to content

[SOLVED] file_get_contents


Kingy

Recommended Posts

I'm trying to get the contents of a shoutcast radio webpage.

 

The code i'm using is:

 

$file = "http://69.64.58.2:8000";
$data = file_get_contents($file);

 

obviously nothing special about that, but when i navigate to the page, it spits out the error:

 

"failed to open stream: HTTP request failed! ICY 401 Service Unavailable"

now that is when the radio is offline.

 

when its online it gives this error:

"failed to open stream: HTTP request failed! ICY 200 OK"

 

but as you can see when you navigate to the radio page there is a lot of information regardless. Any ideas on why its giving the error and not bringing back the contents?

Link to comment
https://forums.phpfreaks.com/topic/129327-solved-file_get_contents/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.