PDA

View Full Version : Link Exchange "dodgers"



Delta12
03-21-2013, 10:59 PM
From time to time I check ALL my link exchanges are still functional, I suggest you do the same! You will be surprised to find on how many sites your link has just vanished despite the fact that your link to the given site is still in tact. :confused:

If your link is no longer visible on my site - not too worry, I just returned a favor :)

WhyMe
03-21-2013, 11:45 PM
I do the same thing with both of my sites. About once a week I check them to see if I am still listed, if not then they are outta here.

iMage
03-22-2013, 10:42 PM
I do check now and then, i do get alot of people adding their sites though, i guess they dont think i will check of a backlink first before approving it i guess, so of course those never get added at all

The One
03-22-2013, 10:59 PM
You could set this up pretty easy :)

http://www.webmastertalkforums.com/php-tutorials/14440-%5Bscript%5D-free-php-backlink-checker.html

then just set a cron to run once a week.

Delta12
03-23-2013, 06:55 AM
You could set this up pretty easy :)

http://www.webmastertalkforums.com/php-tutorials/14440-%5Bscript%5D-free-php-backlink-checker.html

then just set a cron to run once a week.

I like this!!! :) It would be nice to somehow build it into the reports drop-down in admin as a MOD and instead of a cron have a "generate report" button on that page so you can run a report on request. It would also have to auto import all your links that is on your link exchange page to this section


/*
* Backlink Sources
*/
$backlinkSources = array ('http://google.com/',
'http://yahoo.com/',
'http://www.webmastertalkforums.com'
);

Delta12
03-23-2013, 08:50 AM
I have set this up as a cron and it seems to work perfectly :)

HOWEVER be Warned...

You have to specify the FULL URL where your link is unless you have a site-wide link on the given site - For example http://www.TheOtherSite.com/links

The other issue is when the site your link is on receive more links and your link ends up moving down and ends up on another page which will result in the URL where your link is on moving to another URL

The One
03-23-2013, 09:16 AM
Its more of to notify to go visually check your links out. I wouldn't wipe someone else link out before visually inspected anyway.

Delta12
03-23-2013, 09:25 AM
I agree :)

I must say in all honesty, I'm not a fan of cron jobs. I have 2 on my site now and although both does what it is meant to do it also gives me an error message to my inbox daily and not even my host can come up with an answer as to why this happens.

The One
03-23-2013, 09:42 AM
Right this will make it work under reports menu.

open admin/menu.php

find



<a href="?task=wallpaper_reports">Wallpaper reports (<?php echo $report_count_g;?>)</a>


add after it


<a href="?task=link_checker">Link Checker</a>


step2:open admin /title.php

find(line 48 ish)



else if ($_GET['task'] == 'comment_reports') { echo 'Comment reports'; }


add after



else if ($_GET['task'] == 'link_checker') { echo 'Link Checker'; }



step 3: open admin/content.php and find line 51 ish)


else if ($_GET['task'] == 'comment_reports') { include 'pages/comment_reports.php'; }

add this after


else if ($_GET['task'] == 'link_checker') { include 'pages/link_checker.php'; }

step4: make a file named link_checker.php in admin/pages/folder and the code you using to check link delta(one you got on cron) place the code from that file into this file. It should work fine.

Delta12
03-23-2013, 11:28 AM
Right this will make it work under reports menu.

open admin/menu.php

find



<a href="?task=wallpaper_reports">Wallpaper reports (<?php echo $report_count_g;?>)</a>


add after it


<a href="?task=link_checker">Link Checker</a>


step2:open admin /title.php

find(line 48 ish)



else if ($_GET['task'] == 'comment_reports') { echo 'Comment reports'; }


add after



else if ($_GET['task'] == 'link_checker') { echo 'Link Checker'; }



step 3: open admin/content.php and find line 51 ish)


else if ($_GET['task'] == 'comment_reports') { include 'pages/comment_reports.php'; }

add this after


else if ($_GET['task'] == 'link_checker') { include 'pages/link_checker.php'; }

step4: make a file named link_checker.php in admin/pages/folder and the code you using to check link delta(one you got on cron) place the code from that file into this file. It should work fine.

This works however the output takes a while to generate not to mention when it finally does you get an ugly URL display with all links randomly like this [http://the_site/] => 1

I guess 1 indicates there is a backlink?

The One
03-23-2013, 11:39 AM
I dont know I haven't tried it but I'd take it to be it has a link. add a site my my flash games website to the array as it doesnt link to MB and see how it reacts.

Edit: => 0 is no link and => 1 it has a link

The One
03-24-2013, 01:38 PM
This here will take links form your mysql db etc and report back only those suspected of link removal

format is

blah blah site May Have removed your reciprocal link. Please check manually to confirm!

change this line to your website url.


$myURL = "http://www.dgwallpaper.com";

code goes in the admin/pages/link_check.php file


<?php
include('../config.php');

//retrieve reciprocal links
$query="select url from wss_links";
$result=mysql_query($query) or die('Error, query failed');

$row=0;
$numrows=mysql_num_rows($result);

//change to your URL
$myURL = "http://www.dgwallpaper.com";

//loop through reciprocal links
while($row<$numrows)
{
$backlink=mysql_result($result,$row,"url");
$check=linkcheck($myURL,$backlink);

//if reciprocal link doesn't have your url, tell us they been naughty!

if($check==null)
{

echo '<span style="float:left;"><b>'.$backlink.'</b> &nbsp;May Have removed your reciprocal link. Please check manually to confirm!</span><BR />';
}
$row++;
}

//check reciprocal link function
function linkcheck($mylink,$con)
{
$html = implode('', file($con));
$pos = strpos($html,$mylink);
return $pos;
}
mysql_close($con);

?>

same applies if link moved to other page it might report a removal so always check manually before removal of a partners link!