As i have created a website live cricket scores, my interest gradually increased to maintain that to the perfect. In this jorney I have just came accross how to check the broken links for the website and what measures needs to be taken to prevent or eliminate that.
When I did my basic research I got the following stuff, which might be useful for every website moderator.
How to check the Broken Links in a website?
I used the following websites with which I hvae tested and got the list of broken links
- See LinkChecker for Firefox, some more info you can get at this link http://www.kevinfreitas.net/extensions/linkchecker/
- For Windows there is Xenu's Link Sleuth.
- For Mac, Integrity link Checker http://peacockmedia.co.uk/integrity/ (personally I have not used this,i dont know what to comment on this).
- W3C Link Checker.
- Even Google Webmaster will give you the crawl errors, you can try that.
// Alogorithm to recursively check for broken links and log all errors at one file
// First get the Url of the page,
function check_links($page)
{
$html = fetch_page($page);
if(!$html)
{
// Log page to failures log
------------
------------
}
else
{
// Find all html, img, etc links on page
$links = find_links_on_page($html);
foreach($links as $link) {
check_links($link);
}
}
}
If you are very eager to develop a own spider this algorithm will help you a bit.
Thats all about the link checker.
No comments:
Post a Comment