unknown1 Posted September 15, 2009 Share Posted September 15, 2009 I would like to create a script that will take screen shots of a sites home page and then create a thumb nail image of the screen shot. The issue is I can't seem to find any information on this at all and not even sure if this can be done in php. does anyone know if it can be done and is so point me in the right direction... Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/174381-screen-shots-with-php/ Share on other sites More sharing options...
MadTechie Posted September 15, 2009 Share Posted September 15, 2009 Yes it can be done, it depends on your server, do you have a Linux, Mac or PC server ? do you have full control over the server ? Quote Link to comment https://forums.phpfreaks.com/topic/174381-screen-shots-with-php/#findComment-919202 Share on other sites More sharing options...
unknown1 Posted September 16, 2009 Author Share Posted September 16, 2009 No control over server... it's hosted on godaddy. Any other ideas or options you can think of?? Quote Link to comment https://forums.phpfreaks.com/topic/174381-screen-shots-with-php/#findComment-919267 Share on other sites More sharing options...
sug15 Posted September 16, 2009 Share Posted September 16, 2009 No control over server... it's hosted on godaddy. Any other ideas or options you can think of?? Can't you access shell with godaddy? Quote Link to comment https://forums.phpfreaks.com/topic/174381-screen-shots-with-php/#findComment-919269 Share on other sites More sharing options...
unknown1 Posted September 16, 2009 Author Share Posted September 16, 2009 I don't think I have shell access but not 100% sure... In the case that I do how would I go about making this script? Quote Link to comment https://forums.phpfreaks.com/topic/174381-screen-shots-with-php/#findComment-919275 Share on other sites More sharing options...
dreamwest Posted September 16, 2009 Share Posted September 16, 2009 I looked into this a while back when i was trying to snapshot swf files - like ffmpeg does with videos. It can be done, i was playing with a script that could do it beggining of this year , ill dig it out for you Quote Link to comment https://forums.phpfreaks.com/topic/174381-screen-shots-with-php/#findComment-919375 Share on other sites More sharing options...
MadTechie Posted September 16, 2009 Share Posted September 16, 2009 It can't be done, unless you have full control, you need to use a COM control over a browser, to open the URL then you change to full screen and do a screen shot, of course the screen shot look different depending on the browser user. however you need to give apache user level control instead of system Quote Link to comment https://forums.phpfreaks.com/topic/174381-screen-shots-with-php/#findComment-919455 Share on other sites More sharing options...
unknown1 Posted September 16, 2009 Author Share Posted September 16, 2009 It can't be done, unless you have full control, you need to use a COM control over a browser, to open the URL then you change to full screen and do a screen shot, of course the screen shot look different depending on the browser user. however you need to give apache user level control instead of system I have found a script that will work fine but just wont work fine for me =) It works great if you have windows hosting and the ability to run .exe files... But I don't, my hosting is linux so I need to find a way to do this on a linux box and limited access. If anyone has an idea of how I can do this on a linux hosting plan, it sure would help... I maybe able to get shell access if that helps at all. Quote Link to comment https://forums.phpfreaks.com/topic/174381-screen-shots-with-php/#findComment-919463 Share on other sites More sharing options...
MadTechie Posted September 16, 2009 Share Posted September 16, 2009 if you can't get the access you need then as a last resort (apart from changing hosts) you could probably find a site that provide this service. for a windows platform its very simple 1. open services and change Apache service to "Interact with the desktop". <?php $browser = new COM("InternetExplorer.Application"); $handle = $browser->HWND; $browser->Visible = true; $browser->Fullscreen = true; $browser->Navigate("http://www.phpfreaks.com"); /* Still working? */ while ($browser->Busy) { com_message_pump(4000); } $im = imagegrabwindow($handle, 0); $browser->Quit(); imagepng($im, "iesnap.png"); imagedestroy($im); ?> Quote Link to comment https://forums.phpfreaks.com/topic/174381-screen-shots-with-php/#findComment-919476 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.