Previously I used the W3C link checker. But nowadays it gives errors in the process. What other dead link checker would you advise to use?
FshareTool tools check for dead links on FshareTool. Usage is very simple. Every entry on the Download link, if link was removed will report deleted files and cause the link was a lovely pink color. or Php code will help you check the link that link that was alive or die <?php function check_link($url=NULL) { if($url == NULL) return false; $ch = curl_init($url); curl_setopt($ch, CURLOPT_TIMEOUT, 5); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $data = curl_exec($ch); $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);//get code return from http curl_close($ch); if($httpcode>=200 && $httpcode<300){ return true; } else { return false; } } if (check_link("http://webhaiphong.net")){ echo "linklive"; }else{ echo "linkdie"; } ?> Code (markup):
Link checkers work much like a search engine spider. They "crawl" your website looking for internal and external links that are broken. Crawling is recursive, meaning that the spider builds a tree of links leading from page to page until all branches have been explored. Spidering continues until it reaches a defined termination point. For example, when all internal branches have been examined, or when all first level external links have also been examined. A good link checker also produces broken-link reports that enable you to determine where the broken link is located, and why the link is broken.