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
https://forums.phpfreaks.com/topic/212350-link-exchange-automatic-check/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.