Results 1 to 1 of 1
-
5th May 2011, 09:09 PM #1OPMember
can about one help me i have found linkback and whitelist script here
Code:http://www.besthostingforums.com/showpost.php?p=765898&postcount=22
i have been trying to check for a linkback to any of my websites
E.G (site1.com, site2.com, site3.com, site4.com)
PHP Code:$ururl = "site1.com";
$ururl = "site2.com";
$ururl = "site3.com";
$ururl = "site4.com";
here is the code i found.
PHP Code:<?php
function linkback($link, $ururl)
{
$ch = curl_init($link);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
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,$ururl)===false)
return false;
else
return true;
}
if(isset($_POST['siteurl']) && !empty($_POST['siteurl']))
{
//jomasaco's code
$siteurl = $_POST['siteurl']; //need be in http
$surl = $siteurl;
if (!preg_match('#^http://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?$#i', $surl)) //not sure if are the best way
die('Invalid Domain shold be in format http://domain.tld');
$surl = parse_url(trim($surl)); //remove spaces split the url
$surl= str_ireplace("www.","",$surl['host']); //get host
$ipAddress = gethostbyname($surl);
if($ipAddress === $surl)
{
die('Error: Invalid Domain.');
}
//jomasaco's code
$ururl = "extremeddl.net";
$connect = mysql_connect ("localhost", "root", "jorge") or die ('Connection Fail!');
mysql_select_db("wcddl", $connect) or die ('lol');
$x = mysql_num_rows(mysql_query("select url from wcddl_whitelist where url = '".mysql_real_escape_string($surl)."'"));
if ($x!=0)
{
die ("Already Whitelisted");
}
$x = mysql_num_rows(mysql_query("select url from wcddl_blacklist where url = '".mysql_real_escape_string($surl)."'"));
if ($x!=0)
{
die ("Your Site are Blacklisted.<br /> Contact the admin.");
}
elseif ($x==0)
{
//curl_part to retrieve content from the said sitename & chk for link back
if(linkback($siteurl,$ururl)==true)
{
$add = mysql_query("INSERT INTO wcddl_whitelist (url) VALUES ('".mysql_real_escape_string($surl)."')");
echo "Whitelisted!";
}
else
{
die('No Link Back');
}
}
}
else
{
echo'
<form action="'.$_SERVER['PHP_SELF'].'" method="post">
<input type="text" size="32" class="text" value="http://" name="siteurl" />
<input class="button" type="submit" name="submit"/>
';
}
/* entire credits to humour
http://www.besthostingforums.com/member.php?u=5806 */
?>please it has been driving me nuts
__________________
Added after 7 Hours 54 minutes:
anybody got any help ??1LinkDL Reviewed by 1LinkDL on . check multi domains can about one help me i have found linkback and whitelist script here http://www.besthostingforums.com/showpost.php?p=765898&postcount=22 but i can not get it to check more then one domain. i have been trying to check for a linkback to any of my websites E.G (site1.com, site2.com, site3.com, site4.com) $ururl = "site1.com"; $ururl = "site2.com"; $ururl = "site3.com"; Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Multi domain giveaway ( 4 domains 4 winners )
By GeeZus in forum Contests & GiveawaysReplies: 55Last Post: 19th May 2012, 04:36 PM -
Domains Suggestion thread...Thinking of new domain ? check here :)
By innocent_kid in forum Webmaster DiscussionReplies: 29Last Post: 8th Feb 2012, 04:14 PM -
[Selling] 5 PREMIUM Domains for sale! Check Here!
By gmaister22 in forum Completed TransactionsReplies: 2Last Post: 17th Oct 2011, 02:24 PM -
buy domains or info about expired domains with good qulity BL and PR
By gruby4678 in forum Completed TransactionsReplies: 2Last Post: 1st Mar 2010, 09:36 AM -
new multi link movie downloader, plz check it out let me know what u think
By mp3saw in forum Site ReviewsReplies: 0Last Post: 17th Aug 2009, 06:57 AM
themaCreator - create posts from...
Version 3.46 released. Open older version (or...