file, link autocheck

Discussion in 'PHP' started by promotingspace.net, Jul 23, 2007.

  1. #1
    Hi
    Have you seen some link exchange services that automatically check to find if members have placed a special code on their website and linked to it from their homepage?
    How do they do it?
     
    promotingspace.net, Jul 23, 2007 IP
  2. ecentricNick

    ecentricNick Peon

    Messages:
    351
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #2
    We use three different methods.

    1) If our members use our link code (which consists of a clickable image), it draws the image displayed from our server. We know when the image is pulled, and so know, with reasonable certainty the link is in place, and cache the page we think contains it.

    2) We then have a crawler which will crawl all pages upon which we think the link exists, or those upon which it previously exists, and it physically checks the link is there. If it's not found, the crawler looks around the rest of their site.

    3) Manually check - because sites written in Flash etc, don't lend themselves well to checking with the robot.

    In short, it's not easy and you need to cope with a whole raft of issues such as sites which can't add html, sites which use external link pages, sites which have multiple redirects in place, or go thru a click counter to link to you, sites which use alternatives to <a href to link and so on.
     
    ecentricNick, Jul 24, 2007 IP
  3. HuggyCT2

    HuggyCT2 Guest

    Messages:
    222
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    As ecentric said,

    You could get them to upload a 1x1 image or something and then give you the url to it, then in the script you could run a fopen query like.

    
    $url = "the users inputted url"; // users link they placed
    if(fopen($url, "r"))
    echo "Passed";
    // confirmed it is there
    }else{
    echo "Failed";
    // failed cannot find it
    }
    
    Code (markup):
     
    HuggyCT2, Jul 24, 2007 IP