Find programmers and grapic design experts at ScriptLance.com
<? DEW-CODE.COM  
Dew-Code
Welcome, Guest
Please Login or Register.    Lost Password?
Re:link check problems (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:link check problems
#165
Dewed (User)
Administrator
Posts: 250
graph
User Offline Click here to see the profile of this user
Dew-Code.com
Re:link check problems 7 Months, 4 Weeks ago Karma: 7  
DOH ! I can't believe I never noticed this.. You are right, teh way its coded, it will skip a site.. . at least one.

I am currently doing a rewrite of the related files, but in the meantime, see if this slight tweak helps..

Edit the file /admin/linkcheck_top.php

Locate ...
Code:

while($x<$count){ echo "<option value=\"linkcheck_main.php?" . session_name() . "="; echo session_id() . "&start=" . ($x+1); echo "&many=" . $many . "\">" . ($x+1) . " - "; if(($x+$many)>$count){echo $count;} else {echo ($x+$many);} echo "</option>\n"; $x=$x+$many; }
Replace with . . . .
Code:

while($x<$count){ echo "<option value=\"linkcheck_main.php?" . session_name() . "="; echo session_id() . "&start=" . $x; echo "&many=" . $many . "\">" . $x . " - "; if(($x+$many)>$count){ echo $count; } else { echo ($x+$many); } echo "</option>\n"; $x=$x+$many; }
Secondly.. yes, the actual link check is limited... but it does actually look for the link.. Here is the admitadly clunky code that does it..
Code:

$file = @fopen($rows[RecipURL], "r"); while (!feof($file)) {$line = fgets($file, 4096); if (preg_match("/.*href.*". $our_site .".*a/i",$line, $out)){ $rlink="<font color=green>Rlink found</font><br>";$rlink2=$line; } if (preg_match("/noindex/i",$line,$out)){ $bad_recip = 1;$note.="<font color=red>No Index</font><br>"; } if (preg_match("/nofollow/i",$line,$out)){ $bad_recip = 1;$note.="<font color=red>No Follow</font><br>"; } } fclose($file); // end rlink search
So, it looks for noindex/nofollow mentioned anywhere on teh page.. which could be a sneaky webmaster up to no good. It also checks for the existance of "hrefSOMETHING$sitenameSOMETHINGa" in the file. First, make sure $sitename is correctly defined in /include/config.php The two big drawbacks of this method are .. 1. fopen is horribly slow at opening/closing multiple sockets. 2. The preg_match method will only detect your link if the "href", sitename and closing </a> tag are all on the same line. To address these problems, I hope to have new versions of linkcheck_main.php and linkcheck_top.php available for download in a couple days. If you would be so kind to try them out, your feedback would be greatly apreciated. And if they are just really superiffic, maybe consider buying me a cup of coffee via the paypal donate button to the left.
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/05/15 12:51 By Dewed.
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
      Topics Author Date
    emo
link check problems
Sullivan 2008/04/30 13:32
    thread link
thread linkthread link Re:link check problems
Dewed 2008/05/02 09:04
    thread link
thread linkthread linkthread link Re:link check problems
jnasta 2008/05/15 10:42
    thread link
thread linkthread link Re:link check problems
Dewed 2008/05/15 12:38
    thread link
thread linkthread linkthread link Re:link check problems
jnasta 2008/05/15 21:22
    thread link
thread linkthread link Re:link check problems
Dewed 2008/05/15 21:54
    thread link
thread linkthread linkthread link Re:link check problems
jnasta 2008/05/15 22:03
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Newsflash

Sign up for PayPal and start accepting credit card payments instantly.
Copyright Dew-Code 2008