What is the best dead link checker?

Discussion in 'HTML & Website Design' started by alfa1, Jul 14, 2011.

  1. #1
    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?
     
    alfa1, Jul 14, 2011 IP
  2. fabia

    fabia Member

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #2
    I always use dreamweaver to check mine before a site goes live
     
    fabia, Jul 14, 2011 IP
  3. BennyTran

    BennyTran Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    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):
     
    Last edited: Jul 14, 2011
    BennyTran, Jul 14, 2011 IP
  4. dianna

    dianna Peon

    Messages:
    96
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    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.
     
    dianna, Jul 14, 2011 IP