Jump to content

Link exchange automatic check


realcoder

Recommended Posts

 

$html = @file_get_contents($urlw) or problem('Can\'t open Your Remote URL!');
$html = strtolower($html);
$site_url = strtolower($set['site_url']);


if (preg_match_all('/<a\s[^>]*href=([\"\']??)([^" >]*?)\\1([^>]*)>/siU', $html, $matches, PREG_SET_ORDER)) {
    foreach($matches as $match)
    {
        if ($match[2] == $set['site_url'] || $match[2] == $set['site_url'].'/')
        {
            $found = 1;
            if (strstr($match[3],'nofollow'))
            {
                $nofollow = 1;
            }
            break;
        }
    }
}
if ($found == 0)
{
    echo "<center><h2>Our URL Not FOund on your page please submit or check again</h2></center>";
}
else next proceggerr....

in $html we getting the content of that page which that user give where he put our link

what is this actually this all code is doing  :shrug:

infact i was making a link exchange site where on a page people can submit their link for exchange and give their site link and the that page link where they have put our link

this code verify at the sPot did they have put our code or not

 

but m facing some problem.. beacuse it's not working good :(

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.