Results 1 to 5 of 5
  1. #1
    "An Englishman In New York" TJ's Avatar
    Join Date
    January 18th, 2005
    Posts
    3,282
    I'm looking to write a script to check to see if our link exists on a remote web site.

    Initially I'm thinking the easy way would be to do a wget of their page with links (which I have the URL of) into a temp file and then check for it that way, but is there an easier way of doing this?

  2. #2
    "An Englishman In New York" TJ's Avatar
    Join Date
    January 18th, 2005
    Posts
    3,282
    Here is a snippet of coding I just found online... funny that I couldn't find this earlier!<pre class="ip-ubbcode-code-pre">&lt;?

    $siteurl = "http://auctions.shopping.yahoo.com/"; // this is the webpage the backlink should be found on
    $recip = "http://www.yahoo.com/"; // this is the reciprocal url, text, image, ... that EXACTLY must match
    if (backlinkCheck($siteurl, $recip)) {
    echo "Yes link exists"l;
    } else {
    echo "&lt;font color='red'&gt;NO LINK FOUND&lt;/font&gt;";
    }


    function backlinkCheck($siteurl, $recip) {
    $arrText = file($siteurl);
    for ($i=0; $i&lt;count($arrText); $i++) {
    $text = $text . $arrText[$i];
    }
    if (eregi($recip, $text)) {
    return true; // set true if there is a backlink
    } else {
    return false; // set false if backlink is missing
    }
    }

    ?&gt;</pre>thoughts?

  3. #3
    ABW Ambassador
    Join Date
    January 18th, 2005
    Location
    ÄúsTrálíĺ
    Posts
    1,372
    The problem with that is that it will also pass a positive match even if the url is not linked.

    Eg.
    <pre class="ip-ubbcode-code-pre">http://example.com</pre>
    and
    a href="http://example.com"&gt;site/a
    will both pass even though only 1 would be the required link.

    I'd say you would need a bit more complex regex, but I'm still at grasshopper stage with my regex skills. You need a master.

  4. #4
    "An Englishman In New York" TJ's Avatar
    Join Date
    January 18th, 2005
    Posts
    3,282
    Hey Pete, thanks, not sure how I missed this post earlier but what the hey

    I'm not even to grasshopper stage! Anyone? anyone?

  5. #5
    ABW Ambassador Steveinid's Avatar
    Join Date
    January 18th, 2005
    Posts
    827
    I use a program that does all that for me. you can get it here:

    http://www.onlinemarketingtoday.com/...nk-management/

    I'm sure you could tear it apart and see how it works.
    Deleted

  6. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Checking Links
    By carpetkare in forum ShareASale - SAS
    Replies: 0
    Last Post: April 21st, 2008, 07:03 AM
  2. Checking Links
    By carpetkare in forum Other Affiliate Networks
    Replies: 0
    Last Post: April 20th, 2008, 07:28 AM
  3. Checking Links
    By weblady in forum Commission Junction - CJ
    Replies: 4
    Last Post: November 16th, 2004, 10:35 AM
  4. checking links to my site
    By terrigal in forum Search Engine Optimization
    Replies: 6
    Last Post: January 16th, 2002, 05:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •