mr_mind Posted December 2, 2007 Share Posted December 2, 2007 I have the standard LAMP set-up on my server and i need a script which will capture a screenshot of a page when information is submitted to the server. So far all i have gotten off of google is GhostScript which will work for PDF documents Or PCL documents but not PHP documents. I do know of couple php image functions but they only work on windows servers. Any help on this subject would be great. Quote Link to comment Share on other sites More sharing options...
btherl Posted December 3, 2007 Share Posted December 3, 2007 The page is displayed in the user's browser .. so in that sense, it doesn't matter what OS the server is running when it comes to taking a screenshot. Is it really a screenshot you want, or just a record of what was displayed? Quote Link to comment Share on other sites More sharing options...
mr_mind Posted December 3, 2007 Author Share Posted December 3, 2007 I am not generating the screenshot when the user views a page. I think you misunderstood. I want to basically take a snapshot of the generated page as the information is submitted. and PHP functions are server side and have nothing to do with the users browser. This i want to then convert to an icon to display what something is going to look like to a user who is browsing along. I have seen this done before i just want to know how they did it. Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted December 3, 2007 Share Posted December 3, 2007 If you own your own server maybe. You need to execute a exec() command to run a vmware or some sort of script that will screen shot it (In a browser on your server, not the client) and then your server will figure out that image based on it being the newest image in the folder, and set the association to the physical page. I know how to do it in vmware using its internet explorer library, but this isn't a vmware forum its a php help, I am saying it can be done. For a unix version I don't know if there is a vmware for unix, I haven't looked into that Quote Link to comment Share on other sites More sharing options...
helraizer Posted December 3, 2007 Share Posted December 3, 2007 There are 2 php functions that can take a screenshot. imagegrabscreen(); -and- imagegrabwindow(); but I tell you now, they only on a Windows Server, so not UNIX. Quote Link to comment Share on other sites More sharing options...
mr_mind Posted December 3, 2007 Author Share Posted December 3, 2007 I mentioned that i am using a linux coputer in the first post and i mentioned that i knew of those functions and that they only work on a windows server. I have my desktop as my server right now and i think that a window popping up everytime someone submits something may be a little tedious. Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted December 3, 2007 Share Posted December 3, 2007 well this is obviously a job for cron, and like i said you need to (why I say vmware I meant autoit v3) find a unix sub for autoit v3 and then simply take the list of pages to be screened and run them in a batch action. You can't do this without some sort of xhtml phaser on your computer (like Firefox or Internet Explorer) because otherwise it can't read the file. Quote Link to comment Share on other sites More sharing options...
mr_mind Posted December 3, 2007 Author Share Posted December 3, 2007 I have every available web browser on my machine (inter net explorer does exist for linux but i will never use it) so i dont have to worry about that. i thought there would be a way of doing it with php though i dont much care which language is used just that it gets done without interrupting my computer usage Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted December 3, 2007 Share Posted December 3, 2007 well php can't phrase xhtml so you need to use a phraser like the browsers I said, then from that load it printscreen and then because you know the resolution of the server you can then back track what you should crop the image to all using php. the trick is getting the image to create automatically Quote Link to comment 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.