Jump to content

Recommended Posts

There's a website that I want to parse for links, but the site employs a AgeGate, to prevent underage people from downloading the videos.  They're game videos, I'll clarify that, NOT adult-related videos.  The game is simply rated M so the AgeGate is for legal reasons.

 

As I said, I want to be able to parse the pages for links to these videos.  The way the AgeGate works is, I assume, if you don't have a cookie with a certain value, then you're presented with a page containing a form.  In this form you enter your birthdate in this format: MM/DD/YYYY and click "Confirm Age."  This shoots off a bunch of Javascript and does some doPostBack() stuff, then lets you download the video.  If you already HAVE the cookie on your computer, clicking the page will just automatically download the video file.  I've managed to figure out exactly what's happening with the Javascript and make a bookmarklet out of it, this is the Javascript being run in that bookmarklet:

 

javascript: (function () {
    options = new WebForm_PostBackOptions('ctl00$mainContent$ageSubmit', '', true, '', '', false, true);
    document.getElementById('ctl00_mainContent_userAge').value = '08/17/1989';
    __doPostBack(options.eventTarget, options.eventArgument);
})();

 

Basically what's happening is I'm setting up my PostBack options array into the options variable.  I then set the text field of the form to my birthdate, then I fire off the __doPostBack() function.  I'd like to know how to bypass this form and just get at the direct link to the video file (which is provided for me once I've filled out the form, I just want to automate it on my server with PHP.)  I'm trying to find if there's a way to pass the age value to the page via a url parameter but I don't think there is.

 

So basically, is there any way to run this Javascript on this page using my server?  Can I fetch the page (using something like file_get_contents()) and then run this Javascript on it so I can get at the link?

 

Btw, I tried running get_headers() on the video link, this was my result:

 

Array
(
    [0] => HTTP/1.1 200 OK
    [Connection] => close
    [Date] => Thu, 25 Mar 2010 09:26:26 GMT
    [server] => Microsoft-IIS/6.0
    [P3P] => CP="BUS CUR CONo FIN IVDo ONL OUR PHY SAMo TELo"
    [X-Powered-By] => ASP.NET
    [X-AspNet-Version] => 2.0.50727
    [X-Blam] => Frog blast the vent core!
    [set-Cookie] => BlamDotNet=EDM=312449634; domain=bungie.net; path=/
    [Cache-Control] => no-cache, no-store
    [Pragma] => no-cache
    [Expires] => -1
    [Content-Type] => text/html; charset=utf-8
    [Content-Length] => 47417
)

 

If I could figure out the cookie value being set by the page, could I spoof that on my server when I request the page?

 

EDIT: By the way, it's a session cookie being used to remembe the birthdate entered, because using Developer Tools in IE8 to clear session cookies, or closing and reopening the browser, resets the page and I have to enter my birthday again (or use my bookmarklet.)  If this helps at all...

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.