Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
1 + 4 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
   

Re: Anyone got a script to go through and mass-verify links?
by Wayne on 2004/4/30 17:23:00

What I need is something like this. It needs to be paginated, and it needs help with the SQL Insert clause (it isn't inserting into the DB like it should) but you get the idea.

<?php /* Connecting, selecting database */ $link = mysql_connect("localhost", "user", "password") or die("Could not connect : " . mysql_error()); echo "Connected successfully<br /><br />"; mysql_select_db("xoops") or die("Could not select database"); /* Performing SQL query */ $query = "SELECT lid, title, url FROM x_mylinks_links"; $result = mysql_query($query) or die("Query failed : " . mysql_error()); /* Printing results */ while ($line = mysql_fetch_array($result)) { $sitename = $line[url]; echo "Checking $sitename<br />n"; $file = fopen ($sitename, "r"); if ($file) { // echo "$sitename : Exists<br />n"; fclose($file); } if (!$file) { echo "$sitename : <font color='red'>Does not exist</font><br />n"; $sql = mysql_query("INSERT INTO x_mylinks_broken (lid, sender, ip) VALUES ($line[lid], 1, 192.168.0.1)"); } } /* Free resultset */ mysql_free_result($result); /* Closing connection */ mysql_close($link); ?>
Re: Anyone got a script to go through and mass-verify links?
by Society on 2004/4/30 15:28:07

Wayne:
all links are dead :) -> amiga, too :) *joke* <- i like my amiga 12oo :)

i search for such script, too!
maybe someone did something like that allready?
Anyone got a script to go through and mass-verify links?
by Wayne on 2004/4/30 14:56:43

Hi,

At Amiga.org, I've got several hundred links to Amiga sites on the Web. I'm not sure however how many of them are still physically in operation. What I'd like, if anyone has it or is interested in a challenge, is a script to go through and verify that all the links are still answering. Something like;

1) Open $link
2) if $link doesn't open, create broken link report.

That way, at least, I could go through and manually verify a few broken link reports as opposed to manually hitting hundreds of links.

I'd appreciate any help anyone might be able to offer.

Wayne

Who's Online

107 user(s) are online (70 user(s) are browsing Support Forums)


Members: 0


Guests: 107


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits