<?php
function URLopen($url)
{
$dh = fopen($url,'r');
$result = '';
while(!feof($dh)) {
$result .= fread($dh,8192);
}
return $result;
}
$data=URLopen("http://kmgx.phirefast.com:8300/played.html");
?>
--- In phpexperts@yahoogroups.com, "shorts732" <shorts732@...> wrote:
>
> Working on a project and it needs to pull the data from shoutcast.com.
> I am pulling the song history data and find it writes everything on one single
line.
>
> I an looking for a script to take the source from
http://kmgx.phirefast.com:8300/played.html, and then replace all >< with
str_replace("><", ">\r<", $string); to create hard returns.
>
> How do I get the php to make $string = the source file of
http://kmgx.phirefast.com:8300/played.html?
>