On Sun, Jan 11, 2009 at 13:07, John Allsopp <[email protected]> wrote:
>
> Thanks, that worked a treat except I was getting warnings on 404. I looked
> around for solutions to that and it appears curl might handle that better,
> so I'm currently working on that. Many thanks tho .. let me know if you know
> how to stop the warnings :-)
If you want to stop the warnings and verify that data exists, you
can just modify that code like so:
<?php
$myFileLast = "http://www.isawit.com/ffindex.php";
$theDataLast = (strlen($tmpData = @file_get_contents($myFileLast))
> 0) ? $tmpData : sprintf("File not found.");
?>
Then you can modify it to read generated error pages (such as
Apache's stock 404 page) through a simple regexp or other method to
verify that the file is what you expect it to be.
--
</Daniel P. Brown>
[email protected] || [email protected]
http://www.parasane.net/ || http://www.pilotpig.net/
Unadvertised dedicated server deals, too low to print - email me to find out!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php