gnuffo1 Posted March 24, 2006 Share Posted March 24, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/5653-is-there-a-function-to-check-if-an-url-is-a-valid-resource-for-fopen/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.