View Full Version : finding dead links

01-10-2004, 05:34 PM

the problem that i got is not actually about phpdig i guess, but perhaps phpdig can help solve it.
i got quite a big site of about 1500 urls. unfortunately there are some dead links in it. first i manually deleted them after using the phpdig-spider, but after the next time of indexing, they were there again.
now that's getting on my nerves and i just can't find out where these dead links come from.
so now i thought phpdig at least has to "know" on which pages are some dead links. does anyone have an idea how to use phpdig to find out where they are?

01-11-2004, 03:47 PM
Hi. I'm not sure if this is what you are looking to do, but you could echo the URL of the page. In robot_functions.php find the following code and try adding the line indicated below.

if (ereg("HTTP/[0-9.]+ (([0-9])[0-9]{2})", $answer,$regs)) {
if ($regs[2] == 2 || $regs[2] == 3) {
$code = $regs[2];
elseif ($regs[1] >= 401 && $regs[1] <= 403) {
$status = "UNAUTH";
else {
$status = "NOFILE";
echo "<br>No File: " . $url . "<br>"; // add this line

01-14-2004, 03:00 PM
hey charter!

thanks for the code but that doesn't help me. i know the urls that are broken, because i see them in phpdig's admin menu.
anyway, thank you.