Dear Magnum!
It seems to be a problem with newer version of PHP. I tried your code with 4.0.6 and it worked. I tried it with 4.3.2 and it doesn't work. In both cases under Linux.
I modified your script to make it run also with newer versions of PHP:
- Code: Select all
...
#############################
## Do Not Edit Below Here ##
## Do Not Edit Below Here ##
#############################
echo "<font face=Verdana size=1><B>DefenseLINK News</B><BR>";
#$OpenFile = fopen("$GrabURL", "rb"); //- DO NOT CHANGE
#$RetrieveFile = fread($OpenFile, 200000); //- Reduce This To Save Memory
$RetrieveFile = file_get_contents("$GrabURL"); //- Reduce This To Save Memory
$GrabData = eregi("$GrabStart(.*)$GrabEnd", $RetrieveFile, $DataPrint);
$DataPrint[1] = str_replace('<A HREF="/', '<A HREF="http://www.defenselink.mil/', $DataPrint[1]);
$DataPrint[1] = str_replace("<li>", "", $DataPrint[1]);
$DataPrint[1] = str_replace("</LI>", "<BR>", $DataPrint[1]);
#fclose($OpenFile); //- DO NOT CHANGE
echo $DataPrint[1]; //- DO NOT CHANGE
echo " <font face=Verdana size=1>Script Provided By: <a href=\"http://www.4cm.com/\" target=\"_blank\">www.4cm.com</a></font>"; //- DO NOT REMOVE
####################
## End of Script ##
####################
...
I removed the fopen() and fclose() line and replaced the fread() command by the file_get_contents() command.
Greetings,
Oswald