Search code examples
javascriptphpscreenshotwebpage-screenshot

Server A need to make a screenshot of website B


I want to make a screenshot from another page on different domain/server and display it on the current page.

I thought to do it with an iframe but get problems with the viewport (doesn't fit the whole page in it, say 350px width). So I can't use canvas HTML5 because the solutions I found only make a screenshot of the current page.

I think I need to have something in PHP. I found some third-party service but I don't like it and don't want to use it.

The server is only a shared hosting server it's not a VPS so I can't install WebKit or PhantomJS on it. Does anybody have an idea what to do?


Solution

  • conclusion:

    This is not possible on shared hosting server with out a 3de part service

    If you want to use PhantomJS or Webkit you need to have a VPS server or a server where you have root access to