digitalpurpose Posted January 8, 2013 Share Posted January 8, 2013 (edited) Hello Everyone, My first post here, glad to find this community, down to business: What I am trying to do regards the website mochigames.com. Whenever you load up one of their flash games, there is an advertisement that displays as an overlay before it launches. I'd like to be able to screenshot the area of the browser that contains the game (a 640 x 480 div), and then click-through the ad and keep track of the URL(s) until the final advertisement URL is reached. Some ads go straight to the ad page when you click, while others redirect the URL a couple times before arriving at the final destination URL. So basically, I want to supply cURL with the URLs for various games, and get the script to create a respectable screenshot, and record the URL(s) to the destination advertisement. Any ideas? Pretty new to cURL. Thanks for any assistance in advance! Edited January 8, 2013 by digitalpurpose Quote Link to comment Share on other sites More sharing options...
DarkerAngel Posted January 8, 2013 Share Posted January 8, 2013 cURL isn't designed to render HTML, only mimic browser traffic and transfer data. http://php.net/manual/en/function.imagegrabscreen.php is probably the closest you are going to get with PHP (someone might have another method I might not know about) This is an example of how this could be used (although I was never able to successfully gain this functionality; got close once but never rendered the page): http://stackoverflow.com/questions/757675/website-screenshots-using-php Quote Link to comment Share on other sites More sharing options...
Christian F. Posted January 11, 2013 Share Posted January 11, 2013 This sounds very much like it's against someone's TOS. If you haven't already, I recommend that you make sure you're allowed to do this before even starting to write code. 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.