Check with this code.
Code:
<?php
if (eregi("block-Angelo.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}
$ufurl = "http://www.gocomics.com/espanol/condorito/";
$content = "<i>ufurl:</i> $ufurl<br>";
$imagefile = "";
if (!($textfile = fopen( "$ufurl", "r"))) {
$content .= "$ufurl<br> could not be opened<br>";
die();
}
while (!feof($textfile)) {
$line = fgets($textfile, 1500);
if (eregi( ".*<IMG .*SRC=\"(.*)\">.*", $line, $out)) {
//if (eregi( ".*<center> <img src=".=\"(.*)\">.*", $line, $out)) {
$imagefile = $out[1];
break;
}
}
fclose($textfile);
$content = "<p align=center>";
$content .= "<A HREF=\"http://www.gocomics.com/espanol/condorito\" target=\"_blank\"><IMG SRC=\"$imagefile\" alt=\"Condorito\"></A>";
?>
Bookmarks