Link to home
Start Free TrialLog in
Avatar of alberthendriks
alberthendriks

asked on

Is a request more than headers and get/post data?

There is a specific website with a lot of information. I want that information in my database.
The information on that site is organized as follows:

You start at one (the 1st) of the Main pages. From each Main page, you can click to the next Main page, or to one of the ten Sub pages belonging to that Main Page.

From each Sub page, you can click to one of its ten Leaf pages. The leaf pages contain the information I want.

When I said "click", I actually meant "submitting a form". Whereever you submit, you are always submitting the same form to the same location (an aspx file, don't know what that is), only the submitted data differs. This means that you can get any Main, Sub or Leaf page by submitting the same form, only the hidden data differs.
(I think it's no use trying to understand the data, because one important hidden value is 12k of alphanumerical characters and plus signs).

My first attempt, I think it's a dead end:
open the 1st Main page in a frame, change it's content and submit the form using javascript. Problem: For browser security reasons this won't work. Maybe it's possible to get the content from screen using Windows functions (in Delphi or C), please let me know if you know how.

Second attempt:
Save one of the pages on my hard disk. Change it's form.action so that it works correctly.
(This is a check that I can still get to any of the pages manually).
Now, change its action so that it posts to my PHP file. In the PHP, display $_REQUEST and $_SERVER. Use the $_REQUEST data to post using a library called Snoopy, sending the headers from $_SERVER using Snoopy's rawheader variable. (i remove the HOST and CONNECTION headers).

There are basically 3 things that can happen when you post the form:
1. You get the page you wanted
2. You get an error indicating that the submitted data or headers or whatever is malformed (it's always exactly the same error). it's a runtime error of the content management system application.
3. You get the 1st main page, which means that the data was not that malformed.

Posting with Snoopy, I can get the Main and Subpages, but when trying to access a leaf page I get happening 3.

This means that there is a difference between posting the above data and posting the form on my local drive by clicking on it with a mouse, although as I described I caught the headers and posted data from the mouse click and sent that almost exactly. Does this mean there's more information than Headers and Posted data?

I think the problem is not in Snoopy, which can be downloaded at http://sourceforge.net using the search form on the left.
ASKER CERTIFIED SOLUTION
Avatar of petoskey-001
petoskey-001

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of petoskey-001
petoskey-001

Do you still need help with this?
Avatar of alberthendriks

ASKER

It was difficult because it uses sessions. We worked it around the dirty way by creating a Windows macro that mouseclicks to all the data and copy-pastes it into a database.