Status
Not open for further replies.
20 comments
some sites use php redirect or html redirect or javascript redirect

you will have to parse the page returned and check for the new url
 
hi no soft2050, most sites on the web use href="" tags m8...

t30d0r has a point but i like wot i have.

i jus checked a site and seen they use: href="http://www.warezrelease.org/" the www. which i dont use. how can i add http://www.warezrelease.org/ so if it dont find 1 wthout www. it'll find with www.
 
hi no soft2050, most sites on the web use href="" tags m8...

t30d0r has a point but i like wot i have.

i jus checked a site and seen they use: href="http://www.warezrelease.org/" the www. which i dont use. how can i add http://www.warezrelease.org/ so if it dont find 1 wthout www. it'll find with www.
Thats the only thing what i said. Its only checking for that code but not with www. thats why i pointed out www link below the code

To fix this, use this on if check
PHP:
if ((stripos($page,$subBacklink)===false) || (stripos($page, str_replace("http://","", $subBacklink)===false))
            return false; 
            else 
            return true;
        }
 
PHP:
// Config
$modEnabled = true;
$subBacklink = "warezrelease.org";

$reason = "Add our linkback, then <a href='/contact.php'>email us here</a>.";

$date = date("d-m-Y");

$surl = $_POST['surl'];
$surl = parse_url(trim($surl)); //remove spaces split the url 
$surl= str_replace("www.","",$surl['host']); //get host
$email = $_POST['email'];

	if ($modEnabled) {

		function subBacklink($link, $subBacklink) {
			global $subBacklink;
			$ch = curl_init($link);  
			curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);  
//			curl_setopt($ch, CURLOPT_HEADER, FALSE);
  			curl_setopt($ch, CURLOPT_USERAGENT, 'Opera/9.80 (Windows NT 5.1; U; en) Presto/2.7.62 Version/11.01');  
			$page = curl_exec($ch);  
			curl_close($ch); 

		if (stripos($page,$subBacklink)===false) 
			echo "No linkback found !";
			return false;
			else {
			echo "Link back found";
			return true;
		}

Try that.
 
m8 tht dont work, it says error here

PHP:
            return false; 
            else 
            return true;
Try this
PHP:
// Config
$modEnabled = true;
$subBacklink = "http://warezrelease.org/";

$reason = "Add our linkback, then <a href='/contact.php'>email us here</a>.";

$date = date("d-m-Y");

$surl = $_POST['surl'];
$surl = parse_url(trim($surl)); //remove spaces split the url 
$surl= str_replace("www.","",$surl['host']); //get host
$email = $_POST['email'];

    if ($modEnabled) {

        function subBacklink($link, $subBacklink) {
            global $subBacklink;
            $ch = curl_init($link);  
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);  
//            curl_setopt($ch, CURLOPT_HEADER, FALSE);
              curl_setopt($ch, CURLOPT_USERAGENT, 'Opera/9.80 (Windows NT 5.1; U; en) Presto/2.7.62 Version/11.01');  
            $page = curl_exec($ch);  
            curl_close($ch); 

        if (stripos($page,$subBacklink) || stripos($page, str_replace("http://www.", "http://", $subBacklink)))
            return true 
            else 
            return false;
}

Edit: Note: Always use link with www. in subbacklink
 
m8 tht dont work, jus tested....

hmm gonna try

PHP:
$subBacklink = str_replace('http://www.', 'http://', 'http://www.warezrelease.org/');
 
m8 tht dont work, jus tested....

hmm gonna try

PHP:
$subBacklink = str_replace('http://www.', 'http://', 'http://www.warezrelease.org/');

I am quite sure that you used this in the code:
PHP:
$subBacklink = "http://warezrelease.org/";

And you also forget to read the note:
68a0ece04f.png


It should be:
PHP:
$subBacklink = "http://www.warezrelease.org/";

I have tested the code and it does work
 
Hi m8

Yep i read it all bro, i guess in this link check mod i have a couple more jobs goin on (like sending an email and blacklistng also iv got the email function in thr.) so maybe don like it...

Anyway this works good
PHP:
$subBacklink = str_replace('http://www.', 'http://', 'http://www.warezrelease.org/');
 
I dont know your whole code what you are using so i cant say much.

Use this test code:
PHP:
<?php

//Test Link Back Checking Code -- Soft2050

function chkbacklink($url, $mywebsite) {
$pagesource = file_get_contents($url);

if (stripos($pagesource, $mywebsite) || stripos($pagesource, str_replace("http://www.", "http://", $mywebsite)))
    return true;
    else 
    return false;        
}

$url = $_GET['url'];
$yourwebsiteurl = 'http://www.warezrelease.org'; // always start with http://www. and dont end the url with a trailing slash "/"

echo (chkbacklink($url, $yourwebsiteurl)) ? 'Backlink Found' : 'Failed to find the backlink at the specified url.';
?>
It works for the above website too. Check yourself. Implement the code from this to your one.

:facepalm: Should have warned about the link though
 
Try this:
PHP:
<?php
    if(!defined("WCDDL_GUTS"))
    exit;

// Config
$modEnabled = true;
$mywebsite = 'http://www.warezrelease.org'; // always start with http://www. and dont end the url with a trailing slash "/"
// $Backlink = str_replace('http://www.', 'http://', 'http://www.warezrelease.org/'); -- No Need of this

$reason = "Add our linkback, then <a href='/contact.php'>email us here</a>.";

$date = date("d-m-Y");

$surl = $_POST['surl'];
$surl = parse_url(trim($surl)); //remove spaces split the url 
$surl= str_replace("www.","",$surl['host']); //get host
$email = $_POST['email'];

    if ($modEnabled) {

    function subBacklink($url) {
    global $mywebsite;
    $pagesource = file_get_contents($url);

    if (stripos($pagesource, $mywebsite) || stripos($pagesource, str_replace("http://www.", "http://", $mywebsite)))
    return true;
    else 
    return false;        
    }
    
        function blacklistemail($email,$surl) {
        global $core;
        
        $to  = $email; // note the comma
        $from = $core->adminemail;
        // subject
        $subject = 'Your website is blacklisted at '.$core->siteurl;
        // message
        $message = 'Your website is blacklisted at '.$core->siteurl.'.<br />
        <br />
        Domain: '.$surl.'<br />
        Email: '.$email.'<br />
        <br />
        Possible reasons are:<br />
        <br />
        1. Your domain/site does not contain a valid linkback or atleast our bot can not find one.<br />
        2. You may have submitted before without a baclink but since then have added one.<br />
        3. Our bot can not even access your domain/site due to a mod you have installed, crappy host, free domain/host, downtime etc.
        <br />
        <br />
        In most cases you can rectify and solve the issue, then you can get un-blacklisted by either emailing us at: <a
href="http://www.domaintools.com/domain-privacy/email-protection.html"><img src="http://source.domaintools.com/email.pgif?md5=fa3ef7c68d597f0414e085f303b1736b&amp;face=Andale&amp;size=11&amp;color=FF0033&amp;bgcolor=FFFFFF&amp;format[]=transparent"  align="middle" border="0" /></a> or by visiting: '.$core->siteurl.'blacklist.php and un-blacklisting yourself...
        <br /><br />
        Regards,<br />
        <a href="'.$core->siteurl.'">'.$core->siteurl.'</a>';
        
        // To send HTML mail, the Content-type header must be set
        $headers  = 'MIME-Version: 1.0' . "\r\n";
        $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
        $headers .= 'From: '.$from.'' . "\r\n";
        // Mail it
        mail($to, $subject, $message, $headers);
        }
        
        if(subBacklink ($surl) == false) {
            mysql_query("INSERT INTO wcddl_blacklist (url,reason,dat,email) VALUES ('".mysql_real_escape_string($surl)."','".mysql_real_escape_string($reason)."','".mysql_real_escape_string($date)."','".mysql_real_escape_string($email)."')");
            blacklistemail($email,$surl);
        }
    }
    
    $core->attachDataHook("submitChecksPass","subBacklink");
?>
 
Status
Not open for further replies.
Back
Top