tags:

views:

65

answers:

1

Hi folks,

I ran into this problem when scraping sites with heavy usage of javascript to obfuscate it's data.

For example,

"a href="javascript:void(0)" onClick="grabData(23)"> VIEW DETAILS

This href attribute, reveals no information about the actual URL. You'd have to manually look and examine the grabData() javascript function to get a clue.

OR

The old school way is manually opening up Live HTTP header add on for firefox, and monitoring the POST perimeters, which reveals the actual URL being POSTed.

So i'm wondering, is there a way to capture the POST parameters in a server side script or Javscript, as Live HTTP header does, for the outgoing and incoming POST parameters? This would make even the most javscript obfuscated web pages easily scrapable.

thanks.

+1  A: 

I'm not sure I understand the question but...

In PHP, incoming POST parameters are stored in the $_POST array, you can display them with print_r($_POST);.

jtbandes
seems like i missed the example.<a href="javascript:void(0)" onClick="grabData(23)"> VIEW DETAILS </a>i want to find out what is the URL param being sent out and capture it when you click on that link.
You can probably pull it off with javascript debuggers, like I think Firebug has... but what's wrong with LiveHTTPHeader?
jtbandes
well basically i am building a spider. so all of this needs to take place on the server side.
Do you mean client side? A spider would be a client, I think.
jtbandes
spider runs on a server. its coded in serverside script. but i mean, as long as it can capture the URL that it's following. the problem is when href="" contains javascript function, and no information about the actual URL. The actual URL is hidden by the javascript function.
I guess put it simply , what i mean is "dumping http headers in server-side script language"