Answer the question
In order to leave comments, you need to log in
Does anyone know a tool or script that can periodically check for a link on someone else's site?
I place an advertising link on the partner's website. I would like to somehow automatically check it once a week, and if it is not there, a letter would be sent to the soap. Link like goo.gl
Answer the question
In order to leave comments, you need to log in
1. None of the tags correspond to the question
2. They didn’t google, but immediately came to ask
3. They help to solve problems here and not give out solutions for free.
PS The first link in Google for the correct request will immediately take you to the information you need.
The easiest way, in order not to connect the parser libs, etc., is to get the html of the page: if file_get_contents allows, but not, then curl, and check the occurrence of a substring, for example strstr () or with a regular expression, see for yourself there.
But no, you can get confused with simpleHtmlDom, phpQuery or the like, but for the sake of one link, as for me xs, I would check if my domain exists through strstr and not take a steam bath :)
https://github.com/request/request
request('http://www.google.com', function (err, response, body) {
if (err) throw err;
var test = /https:\/\/github\.com/.test(body);
if (!test) throw new Error("Test failed");
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question