Hi:
I do that quite often.
Explore file handling functions.
what you would to is open the URL as you would a file, and read data from it.
Parsing it is another story, i tend to use regexp's wherever possable but im still learning them too..
below is an example from one of my scripts, what I am doing is taking one of two possable internet comic strips and parsing out the image name/tag and putting it on my page:
if ($sinfest){
if ($fp = @fopen("http://www.sinfest.net", "r")){
while (($current=fgets($fp, 4096))) {
if (preg_match("/SRC=(.) WIDTH=\"669\" HEIGHT=\"276\"/", $current, $regs)){
$comicTAG = "<A HREF=\"http://www.sinfest.net\" TARGET=\"_blank\"><IMG SRC=\"http://sinfest.net/".str_replace("\"", "", $regs[1])."\" BORDER=\"0\"></A>";
break;
}
}
echo "<TABLE BORDER><TR><TD>".$comicTAG."</TD></TR></TABLE>";
}
}else{
if ($fp = @fopen("http://www.userfriendly.org/static/", "r"))
while (($current=fgets($fp, 4096))) {
if (ereg('ALT="Latest Strip" . SRC="(.*)"', $current, $regs)) {
$staticURL=$regs[1];
break;
}
}
$comicURL = substr($staticURL, 0, 52) . substr($staticURL, 53);
echo "<TABLE BORDER><TR><TD><A HREF=\"http://www.userfriendly.org/static/\" TARGET=\"_blank\"><IMG SRC=\"".$comicURL."\" BORDER=\"0\"></A></TD></TR></TABLE>";
}
echo "</CENTER>";
}
?>