Not logged in. · Lost password · Register
Forum: General Help and Support Plugins Plugin Wishlist RSS
Dead link checker and link status
Plugin request :)
krang #1
User title: Awesome
Member for a week · 2 posts · Location: Dimension X
Group memberships: Members
Show profile · Link to this post
Subject: Dead link checker and link status

I am looking for someone who could create a plugin for me. I offer 40 USD (Please provide a price for this kind of customization if you think it is too low) (payment in Bitcoins).

I would like to have a status indicator after each external link on my wiki.
Each link need to be checked after the page is fully loaded. So checking status of external link cannot delay page loading.
Once wiki page is fully loaded each external link is checked and got own status.

First status is "checking" (once page is loaded, this status shows, next to external link symbol, till page is checked, so this is first temporary status, default one, before we get main info about offline or online) - this status icon should be yellow dot -
Second is "online" - page status ok, server response 200 - icon green dot -
Third is "offline" - broken link, server response 404 - red dot -

I think php curl or php wget function can be used for this.
I just know that in standard curl it can be done by running command:
curl -s -o /dev/null -I -L -w "%{http_code}\n"
-s - Silent or quiet mode.
-o - Write output to <file> instead of stdout.
-I - Fetch the headers only.
-L - If the server reports that the requested page has moved to a different location (indicated with a Location: header and a 3XX response code), this option will make curl redo the request on the new place.
-w - Make curl display information on stdout after a completed transfer.

I was looking for some info about php-curl and maybe this function could be helpful:

curl_getinfo — Get information regarding a specific transfer
curl_getinfo ( resource $ch [, int $opt ] ) : mixed
where parameter
opt may be one of the following constants:
CURLINFO_RESPONSE_CODE - The last response code.

Thanks in advance!
andi (Administrator) #2
User title: splitbrain
Member since May 2006 · 3374 posts · Location: Berlin Germany
Group memberships: Administrators, Members
Show profile · Link to this post
check… to find someone to commission a custom plugin.

However it will be more expensive than you think. I guess implementing what you want would take about 4 hours for someone familiar with DokuWiki and Javascript. With typical market rates this would be something between 250 to 500 Euro.
Read this if you don't get any useful answers.
Lies dies wenn du keine hilfreichen Antworten bekommst.
krang #3
User title: Awesome
Member for a week · 2 posts · Location: Dimension X
Group memberships: Members
Show profile · Link to this post
Ok. Thank you for the link. That is expensive. I will need to find other solution. Anyway. Thanks.
cziehr #4
Member since Jan 2011 · 495 posts · Location: 10119 Berlin
Group memberships: Members
Show profile · Link to this post
I wrote a bash script for me which is based on…

I added some code before the code from the link, which crawls the wiki-pages and isolates external links from them. This list of urls is given to the mentioned script.

Important: My script doesn't write the output to the wiki-page where the link was found, but writes it to a text-file or sends an email. But it would be possible to create the output from the script in a way that it is wiki-code an can be pasted on a wiki-page for further inspection.

Because you wrote

curl -s -o /dev/null -I -L -w "%{http_code}\n"

I assume you're using some kind of a linux/unix-based OS, which is required for executing the script.
If you're interested, I would change my script that it can be used by everyone, and add some comments to understand whats going on ;-)
This post was edited on 2019-01-20, 23:00 by cziehr.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-01-22, 18:52:57 (UTC +01:00)