Aloha,
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" http://google.com
-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!