How can I take a screenshot of a web page on a site in jpg using php to a file named 1.jpg, to a folder on the site, for example / var / www / 1 /, and if it exists, overwrite it.

  • 2
    you are confusing CO with freelancing... more specifically ask a question. - Naumov
  • Corrected - maix
  • it is not about what to put the ass, but about what you need to try yourself and if something is not received lay out the code. If you need some kind of solution, but you don’t know php, then you’ll go to freelancers, and not on stackoverflow here you don’t solve free tasks, here programmers help the programmer. This is a learning resource and not a freelancing resource. - Naumov
  • That's the question, I rummaged through all Google and could not find anything like that. Therefore, I asked here - maix
  • If you are given an exhaustive answer, mark it as correct (tick the selected answer). - Mihanik71

2 answers 2

There is an s-shot service that allows you to take screenshots of URLs.

You need to pick up the picture at the address and save it in the desired folder.

Also on this service, it is possible, for example, to add a get parameter that will not affect the appearance of the page, for example, with a date, and the service will take it as another page, and you will have an actual screenshot

Sample image

  • Their caching is disabled only after payment. And I need to take screenshots once a day. Apparently not suitable. Found more similar services only that are put on a local server. But I just can not figure it out. It seems for Linux but for some reason in the inside there is an exe file. - maix
  • It is possible, for example, to add a get parameter that will not affect the appearance of the page, for example, with the date and time - the service will take it as another page, and you will have an actual screenshot. For example - Mihanik71

by means of php or as much as you need to implement one thing:

  1. a browser that will parse and render the page markup to the graphics buffer and then upload to the picture

It is easier to take ready-made solutions in other languages, for example Ruby, launch a browser to make a screen and upload it to a picture.

  • Understood thanks .. - maix
  • Not quite right. You can use the services that they can do - Mihanik71