-2

Is it possible to create an image of a website if given a url using php?

thank you

AnchovyLegend
  • 12,139
  • 38
  • 147
  • 231
  • I searched for a similar topic on this website and the results that I did find, did not for me... – AnchovyLegend May 09 '12 at 16:13
  • Using only PHP? No. There's not an HTML renderer written in PHP. Using hideous, hacky other approaches? Probably. – Corbin May 09 '12 at 16:16
  • 1
    [google](http://bit.ly/JUNnuo) -> http://stackoverflow.com/questions/10519232/creating-a-screenshot-image-of-a-website-if-given-nothing-other-than-a-url http://stackoverflow.com/questions/4550947/generating-a-screenshot-of-a-website-using-jquery http://stackoverflow.com/questions/757675/website-screenshots-using-php – Pavel Strakhov May 09 '12 at 16:16
  • Duplicate of post 10519232/ by same author 50 minutes earlier – Skizz May 09 '12 at 16:21
  • I apologize, the first post did not answer my question as I had hoped, and with this post I tried to make php the main area of focus b/c in the first post users notified me that this is not possible using jquery and javascript. – AnchovyLegend May 09 '12 at 16:34

2 Answers2

2

If you can make changes to your webserver, you can use the wkhtmltopdf: http://code.google.com/p/wkhtmltopdf/

Jeroen
  • 13,056
  • 4
  • 42
  • 63
0

There is not a standard way to do this in PHP. Any solution require additional libraries/files.

That being said there are a number of generators you can use to accomplish this using virtually any backend language - and the load to generate the image will be taken care of remotely without bogging down your server(s).

The downside of this approach is that you're dependent on an external service for your site to function properly. This may or may not be too terrible since there are many many such services you could move to.

Dutchie432
  • 28,798
  • 20
  • 92
  • 109