Jump to content


Photo

Is there a function to check if an URL is a valid resource for fopen?


  • Please log in to reply
No replies to this topic

#1 gnuffo1

gnuffo1
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 24 March 2006 - 02:04 AM

My loop gets a list of URLs in my DB and scans those URLs using fopen (the reason is to scan my supplier's site to update prices). It consists of a while loop to get all of the URLs from each record and then update them one by one. The problem is that some of the URL's link to pages that aren't on the site anymore and I don't have the time to go round checking them all. When the loop comes to one of the invalid URLs, the script stops processing all the other records and I just get errors about it not being a valid resource for fopen.

So is there a function to check this, where it only actually does open the page if it is valid; hopefully this will avoid the errors and not stop the script.

Thanks
[a href="http://www.sentinelpc.co.uk" target="_blank"]Sentinel Technology - Custom PCs and Laptops[/a]




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users