EDITED BETTER VERSION OF MY QUESTION:
1) I want to be able to take a screenshot of a URL at two different times, compare the images, and highlight the differences, if any. Has to be done via a PHP-based web app.
2) I also want a user to be able to submit a URL, which then takes a screenshot, and then using a drawing tool, highlight the section of the URL that they wish to be monitored - much like VisualPing.io.
ORIGINAL QUESTION: I want to be able to monitor just a specific section of a web page (rather than entire page). So essentially, this is what what I want a user to be able to do in an app I'm creating:
1) Enter the URL of any web page in a form field and submit. 2) A snapshot of that URL is taken and image is shown on page. 3) They can then highlight just a section of that screenshot using an overlay (the part that they wish to monitor 4) System then stores that, then using cron, pings that URL, downloads source, compares ONLY the code of the section that user highlighted, then emails user if there's a change in that specific section.
Now, the parts that I'm not sure of, is...
a) How to let someone draw on an image on the website b) Then store that section and somehow connect it back to the source of the page, so that... c) later when a file_get_contents or curl of that URL is done and source is retrieved, then same section of source is compared to highlighted part of image.
See VisualPing.io - they already do this. I want similar functionality. There are already a couple of websites like VisualPing that do this, and I need to implement that for my project.
Sorry about the complex requirement. And this has to be done in PHP.
Thanks!
2 Answers
Answers 1
I do not think that you will find a ready solution to your problem.
But I can suggest what you should do.
Parse web pages via CLI. I usually used PhantomJS, but project development is stopped now. I used this solution in my pet project. So, you can install PhantomJS, implement .js script and call it from your PHP script. Then you can use output image as you wish. For example, you can compare this with a reference picture pixel by pixel.
Answers 2
It seems like you already found the solution at VisualPing.io.
I'm guessing you're looking for a free option and that's why you don't want to use VisualPing.
Wachete does the same thing. You can have them monitor up to 5 web pages on the free plan. And yes, you can select specific parts to of the page to watch for. Some other honorbale mentions if you will are (https://changetower.com/ and https://versionista.com/).
0 comments:
Post a Comment