Script URL: http://www.martinsvillehenrycountycarcl ... /links.php
Version of script:
Hosting company:Mine
URL of phpinfo.php: 5.2
URL of session_test.php:
What terms did you try when SEARCHING for a solution: Nothing
Write your message below:
Hello,
I was wondering if there is a way to remove the URL with reciprocal link from the script?
Linkman
You mean like what, you don't want reciprocal links, just a "free for all links" script?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
You can delete the reciprocal URL field from the form and these block of code from addlink.php: then just paste this code at the top of the addlink.php file just below define('IN_SCRIPT',1); :
Haven't tested it so make sure you keep backups of your old files.
Code: Select all
$recurl = pj_input($_POST['recurl'],'Please enter the url where a reciprocal link to our site is placed!');
if (!(preg_match('/(http:\/\/+[\w\-]+\.[\w\-]+)/i',$recurl)))
{
problem('Please enter valid URL of the page where the reciprocal link to our site is placed!');
}
/* Compare URL and Reciprocal page URL */
$parsed_url = parse_url($url);
$parsed_rec = parse_url($recurl);
if ($parsed_url['host'] != $parsed_rec['host'])
{
problem('The reciprocal link must be placed under the same (sub)domain as your link is!');
}
Code: Select all
$recurl = str_replace('&','&',$recurl);
Code: Select all
/* Check reciprocal link URL */
$regex = str_replace(array('http://www.','http://'),'http://(www\.)?',$recurl);
$regex = preg_replace('/index\.[^\/]+$/','',$regex);
$regex = str_replace('/','\/',rtrim($regex,'/'));
$regex = '/'.$regex.'\/?(index\.[^\/]+)?/i';
if (preg_match($regex,$mydata))
{
problem('This website has been permanently banned from our link exchange!');
}
Code: Select all
/* Get HTML code of the reciprocal link URL */
$html = @file_get_contents($recurl) or problem('Can\'t open remote URL!');
$html = strtolower($html);
$site_url = strtolower($settings['site_url']);
/* Block links with the meta "robots" noindex or nofollow tags? */
if ($settings['block_meta_rob']==1 && preg_match('/<meta([^>]+)(noindex|nofollow)(.*)>/siU',$html,$meta))
{
problem(
'Please don\'t place the reciprocal link to a page with the meta robots noindex or nofollow tag:<br />'.
htmlspecialchars($meta[0])
);
}
$found = 0;
$nofollow = 0;
if (preg_match_all('/<a\s[^>]*href=([\"\']??)([^" >]*?)\\1([^>]*)>/siU', $html, $matches, PREG_SET_ORDER)) {
foreach($matches as $match)
{
if ($match[2] == $settings['site_url'] || $match[2] == $settings['site_url'].'/')
{
$found = 1;
if (strstr($match[3],'nofollow'))
{
$nofollow = 1;
}
break;
}
}
}
if ($found == 0)
{
problem(
'Our URL (<a href="'.$settings['site_url'].'">'.$settings['site_url'].
'</a>) wasn\'t found on your reciprocal links page (<a href="'.$recurl.'">'.
$recurl.'</a>)!<br><br>Please make sure you place this exact URL on your
links page before submitting your link!'
);
}
Code: Select all
$recurl = 'http://nolink';
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools