Results 21 to 24 of 24
-
11th Apr 2011, 05:16 PM #21Retired NinJaWebsite's:
loledhard.comDunno y the code didnt work, may be some silly error. Havent executed so cant say much. Anyways the code u just posted looks like it would work fine & smoothly. Try it out.
You don't hate Justin bieber.You hate the fact you ain't Justin Bieber!
-
11th Apr 2011, 07:13 PM #22MemberPHP 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 */
?>
-
12th Apr 2011, 07:12 PM #23OPBannedWebsite's:
WarezRelease.org ThatHosting.cohi, some 1 can optimize the code, cos as jomasaco said, the linkback maybe commented and not visible on a page.
-
13th Apr 2011, 05:47 AM #24The Wise OneWebsite's:
twilight.ws ddlrank.comChris why dont you atleast try finding the solution yourself and then when you run into an error you ask for our help... This way you will learn more...
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Whitelisting with Zunox Help
By blankshare in forum Technical Help Desk SupportReplies: 2Last Post: 13th Dec 2011, 02:01 AM -
Mechoddl whitelisting
By lukip006 in forum Forum and DDL DiscussionReplies: 2Last Post: 3rd Jul 2011, 09:14 AM -
[Buying] Need WCDDL mod (Self Whitelisting)
By mannNmeet in forum Completed TransactionsReplies: 1Last Post: 24th Apr 2011, 09:16 AM -
[Official] DDL0.com Whitelisting & Re-Rating (Apply Here)
By SJshah in forum Forum and DDL DiscussionReplies: 220Last Post: 1st Feb 2011, 12:16 AM -
Whitelisting.
By CyberPirate in forum Forum and DDL DiscussionReplies: 9Last Post: 4th Mar 2010, 11:12 AM
themaCreator - create posts from...
Version 3.45 released. Open older version (or...