As part of something I was doing today, I needed to check a load of URLs to see if they ended up as 404 (error) pages, were redirected (301 or 302), whether the page was fine, or if the URL was invalid. I could have done this by checking each URL individually, but manual checking is only good for a certain amount of URLs. What if, for instance, I had a list of 500 URLs? That’s a lot of manual checking.
With that in mind, I created my URL checker v1.0.
The idea is that each URL you want to check goes on an individual line and then you hit the “Check URLs” button. This will go off and check all of the listed URLs and output the status code of the request and, if relevant, the URL that the page was redirected to.
As the code needs to go away and check every URL, it can be a bit slow for large datasets, but then again so would manually checking them all!
The URL checker is located at http://garybell.co.uk/portfoliofiles/url_check.php and the source for this can be found at http://garybell.co.uk/portfoliofiles/code/url_check_source.zip
Feel free to download and use it as you see fit. It does require cURL to be installed for PHP, as this is what it uses to check the pages.
Once the results are found, filters will appear for the different response statuses which were returned. Un-ticking the box relating to a specific status will hide the rows which contain that particular status. Ticking the box will make them show up again. It’s really simple jQuery to perform that one, and all available in the source.
It’s a really crude layout and has no stylesheet at all. If you want to style it, let me know and I’ll see what I can do.
I might add a few more features to it at a later date as I see fit. If you can think of a feature you would like adding to this page, post a comment and I’ll think about it (I’ll probably do it actually).