PLEASE HELP sites abusing my service need to fix asap
Posted: Sun Sep 16, 2007 11:23 am
scottayy | Please use
scottayy | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
the code below is currently what im using for the service I offer on my website
I want to block browser requests so requests only from websites get accepted!
Also the check link and link check function do not work just displays image backlink not found??? even when the backlink is
located on the page im initiating requests from...
This is just to verify that sites have added a backlink to us on thier HOMEPAGE for our free serviceCode: Select all
if ($_SERVER['REQUEST_METHOD'] == 'GET' && isset($_REQUEST['url'])) {
checklink();
} else {
}
function checklink() {
$requestedurl = parse_url($_SERVER['HTTP_REFERER']);
$remote = $requestedurl['host'];
$remote = str_replace( 'www.', '', $remote);
$link = 'http://mywebsiteaddress.com';
if (linkCheck($remote, $link)) {
start();
} else {
nobacklink();
}
}
function linkCheck($remote, $link ) {
$arrText = file($remote);
for ($i=0; $i<count($arrText); $i++) {
$text = $text . $arrText[$i];
}
if (eregi($link, $text)) {
return true; // set true if there is a backlink
} else {
return false; // set false if backlink is missing
}
}scottayy | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]