Jump to content


cURL, Screenshot, URL Tracking, Mochigames

curl screenshot url

  • Please log in to reply
2 replies to this topic

#1 digitalpurpose

  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 08 January 2013 - 10:48 PM

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 by digitalpurpose, 08 January 2013 - 10:50 PM.

#2 DarkerAngel

  • Members
  • PipPipPip
  • Advanced Member
  • 330 posts

Posted 08 January 2013 - 11:04 PM

cURL isn't designed to render HTML, only mimic browser traffic and transfer data.

http://php.net/manua...egrabscreen.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):
If it was easy for me I gained confidence...

If it was hard for me I gained knowledge...

It's a win, win, situation...

#3 Christian F.

Christian F.
  • Staff Alumni
  • Advanced Member
  • 3,106 posts
  • LocationNorway

Posted 11 January 2013 - 09:11 AM

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.
Keeping it simple.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users