Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Link / URL Status Checker Details »
Link / URL Status Checker
Mod Version: 1.01, by bairy (Member) bairy is offline
Developer Last Online: Aug 2014 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.6.0 Rating: (1 vote - 5.00 average) Installs: 43
Released: 17 Dec 2006 Last Update: 27 Dec 2006 Downloads: 374
Not Supported DB Changes Uses Plugins Template Edits Additional Files  

What does this do?
For anyone who has seen or got my Image Status Checker hack, this is exactly the same, but works on links ([url=], [url]) instead.

Basically it scans all your posts, extracts all the url tags, and scans each of the images to see if they're still valid.

The rest of this is basically the description of that hack reworded


Why?
I had a look at all the links on my site and was alarmed at how many were now gone. Since the only way you can check the links on your board is to manually read every post and click them, I decided to come up with a better way... and this is it.


How does it work?
The first part: In the AdminCP, under Maintenance and Update Counters... right at the bottom is this hack. It works by looking up every url tag, then requesting the image, and reading the http status code. So code 200 means 'image ok', 404/410 means 'image gone' etc. That then gets stored in a database table. A server has 15 seconds to reply to the request or the status is labelled as "Unknown"
The second part: The browsing element, linkstatuscheck.php (original filename huh!). This allows you to browse all the images found in the last scan using some powerful filtering (statuses to display, search, order by).


Hack features
  • General
  • Fully phrased.
  • Templates are grouped. Who's online handled.
  • Part 1 - Admin
  • Reads the post table, scans all the [url=] and [url] tags on demand and records the actual http status code returned.
  • If it gets stuck during the scan, you can restart the section it's currently doing.
  • If an link appears in more than one post, it's only checked once.
  • Start from, per page and timeout options for scanning.
  • Part 2 - Browser
  • Status codes are put into one of three descriptions for simplicity: Working, Dead, Unknown. Unknown is if the server didn't respond or similar - on the basis that a temporary timeout doesn't necessarily mean the image has gone.
  • In the browser, link urls are force wrapped. Unless people post using all caps, you have a low screen resolution, or the font size is big, the table should never stretch.
  • Filtering allows you to show just the working/dead/unknown images, and there's a search facility for a variety of fields.
  • Convenient link to edit the post (if a dead link is found). This works by can_moderate - edit links only appear for people who own the post, or can moderate the forum it's in.
  • Works by canview - if someone can't view a particular forum (e.g. staff forum) normally, they can't view the images within it.
  • Uses css for common stuff to reduce the size of the outputted pages.


Bad Things
It's far from a perfect hack, there are many things to do. Please be aware that I won't be doing them, but if anyone else wants a crack, feel free!
  • Only supports http://, not https://
  • Can only handle replies like: HTTP 1.x 200 as the first line.
  • Only supports [url] and [url=] tags. If you have HTML turned on in any forums it won't see <a href=> links.
  • Biggie: There's no way to update a single post or link without a full re-scan. That means if someone edits their post to update or remove a dead link, it will not change on the browser until a full re-scan is done. I did play with various update methods but most are flawed in one way or another.
  • No cron job.
  • No session variables. (People without cookies will be logged out a lot).


Footnotes
The code to the Image Status Check hack is very similar, so I pretty much copy pasted and adapted it. It is a little bigger due to handling the [url=] "option", but you may find references to images. Let me know if you do.


It will work on 3.6 and 3.5, though you'll need to remove the "executionorder=" from the .xml file to get it working on 3.5


Installation
Upload linkstatuscheck.php to your vB directory. Install the product, set overwrite to yes.


Customizing
  • By default it's set to only allow moderators, super-moderators and administrators to view the browser. This can be changed with the setting in AdminCP > vB Options.
  • The phrases all start with usc_ if you want to change them.
  • You can add a link to linkstatuschecker.php on the navbar (or anywhere) if you want your members to be able to view it.


Screenies
Exactly the same as the Image Status Checker, only with URL links rather than image links.
What? I'm feeling lazy.

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Administrative and Maintenance Tools vB Link Checker bot sarkar vBulletin 3.6 Add-ons 11 18 Jul 2010 09:35
URL Status Checker Slynderdale vBulletin 2.x Full Releases 30 23 May 2003 07:48

Comments
  #2  
Old 17 Dec 2006, 19:30
bashy bashy is offline
 
Join Date: Nov 2005
Hi

Great idea thanks, but in the Search for text area, what do i actually input there?

I cracked it now, Ya have to run the checker in the Maintenabce section in the update countser section
Then you use the browser part, is that correct?
__________________
Bashy

Bashys Place ~ Bashys Hosting

Last edited by bashy; 17 Dec 2006 at 19:46.
Reply With Quote
  #3  
Old 17 Dec 2006, 19:31
Veer Veer is offline
 
Join Date: Feb 2006
Thanks,
Its Very Useful for Me, Because My Site Have Lots n Lots of Images, Shared by Members.

Question / Suggestion: (for future update)
Is there any chance to check image / link status automatically and if a image link is dead then system auto send a PM to user who has the post with dead link?

Thanks again.
Reply With Quote
  #4  
Old 17 Dec 2006, 19:36
projectego's Avatar
projectego projectego is offline
 
Join Date: Feb 2006
Location: UK
Real name: Steve
Thanks, this sounds like a very helpful add-on!
__________________
Reply With Quote
  #5  
Old 17 Dec 2006, 19:40
bashy bashy is offline
 
Join Date: Nov 2005
looks like all my links are of unknown any ideas?
__________________
Bashy

Bashys Place ~ Bashys Hosting

Last edited by bashy; 17 Dec 2006 at 19:48.
Reply With Quote
  #6  
Old 17 Dec 2006, 19:49
bairy bairy is offline
 
Join Date: Oct 2005
Real name: Chris
Originally Posted by bashy View Post
I cracked it now, Ya have to run the checker in the Maintenabce section in the update countser section
Then you use the browser part, is that correct?
Yes, maintainence first, then the browser.


Originally Posted by Pehchaan View Post
Question / Suggestion: (for future update)
Is there any chance to check image / link status automatically and if a image link is dead then system auto send a PM to user who has the post with dead link?
There probably won't be a future update. It was really just a hack to fill a need, rather than something I plan to develop further.
Besides, auto PMing would add a lot of strain to the server, and people can just look at the linkstatuscheck.php if they want to see which of their posts are in trouble.


Originally Posted by bashy View Post
looks like all my links are of unknown any ideas?
Well, assuming you know at least one of them actually works, I'd guess the server can't communicate with the remote sites. Perhaps fopen is disabled in php?
Reply With Quote
  #7  
Old 17 Dec 2006, 20:08
bashy bashy is offline
 
Join Date: Nov 2005
allow_url_fopen is on just checked

Originally Posted by bairy View Post
Well, assuming you know at least one of them actually works, I'd guess the server can't communicate with the remote sites. Perhaps fopen is disabled in php?
__________________
Bashy

Bashys Place ~ Bashys Hosting
Reply With Quote
  #8  
Old 17 Dec 2006, 20:09
bashy bashy is offline
 
Join Date: Nov 2005
out of 3000+ links 3 are dead about 5 or 6 are working and the rest unknown!!
__________________
Bashy

Bashys Place ~ Bashys Hosting
Reply With Quote
  #9  
Old 17 Dec 2006, 20:11
bairy bairy is offline
 
Join Date: Oct 2005
Real name: Chris
I'm afraid I don't know then, I don't really know php's local/remote file commands all that well.
I can tell you it uses fsockopen to ping the server, then fwrite, fread to communicate.
Reply With Quote
  #10  
Old 17 Dec 2006, 20:14
bashy bashy is offline
 
Join Date: Nov 2005
Well, i just installed ya image one as well and get the same, 99% of unknown status!
What does duplicate / dealt with mean? i get a lot of them
Also in the update counters, the 1st page seems to work well, all the rest give the duplicate / dealt
__________________
Bashy

Bashys Place ~ Bashys Hosting
Reply With Quote
  #11  
Old 17 Dec 2006, 20:17
bairy bairy is offline
 
Join Date: Oct 2005
Real name: Chris
If someone makes a post with a url in, and they make another post with the same url in, then there's no point pinging the site twice. So it'll ping it once, and any occurance after that will be labelled as already dealt with.
It also happens if you manually restart pages, or start scanning from an id other than -1
Reply With Quote
  #12  
Old 17 Dec 2006, 20:18
bashy bashy is offline
 
Join Date: Nov 2005
Thats strange... cause i dont get it on the 1st page but all the rest i do!

Originally Posted by bairy View Post
If someone makes a post with a url in, and they make another post with the same url in, then there's no point pinging the site twice. So it'll ping it once, and any occurance after that will be labelled as already dealt with.
It also happens if you manually restart pages, or start scanning from an id other than -1
__________________
Bashy

Bashys Place ~ Bashys Hosting
Reply With Quote
  #13  
Old 17 Dec 2006, 20:20
Bounce's Avatar
Bounce Bounce is offline
 
Join Date: Mar 2004
Real name: J
Working fine here , thanks

Does the IMAGE checker work on 3.6 ?
__________________
Thanks for your help

J
Reply With Quote
  #14  
Old 17 Dec 2006, 20:24
bashy bashy is offline
 
Join Date: Nov 2005
Ah well, must be my site not wanting to play ball with both checkers, thanks anyway, but have removed now, the idea was there,, thanks again
__________________
Bashy

Bashys Place ~ Bashys Hosting
Reply With Quote
  #15  
Old 17 Dec 2006, 22:02
bairy bairy is offline
 
Join Date: Oct 2005
Real name: Chris
Originally Posted by hIBEES View Post
Working fine here , thanks

Does the IMAGE checker work on 3.6 ?
Yes. At least, on 3.6.0. I should imagine it working in the whole 3.6 range.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 08:10.

Layout Options | Width: Wide Color: