eric@lucii.org on Wed, 19 Jun 2002 10:53:44 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] capture browser request


I'm not a web programmer - I have just enough knowledge to be dangerous.
Hopefully, somebody here can provide me with the clues to answer to this 
question!

I've got a web service that I pay for.  They require me to log in on one web
page and then click a button on the next page to download a file.  Since I'd
like to put this download in a script, I want to use curl or some similar
program.  Unfortunately, I cannot see the request that the browser sends to the
site to initiate the download.  I've examined the source for the web page and 
I see following code in the source:

-----code excerpt------

<form action=http://www.site.com/cgi-bin/download.cgi method=post>
<input type=hidden name="action" value="download">
<input type=hidden name="file" value="20020610">
<input type=hidden name="area" value="1">
<input type=hidden name="login" value="userlogin">
<input type=hidden name="PIN" value="password">
<tr align=center><td><input type=submit value="20020610.zip"></td>
</form>

-----end code excerpt------

I'm not exactly sure what I'm looking at but I believe that the input(s)
that are hidden are transmitted to the site along with the request.  The
input with type=submit actually initiates the request.

Is there a way for me to capture the request that the browser sends?  
I run SuSE 7.3 - KDE 2.2.1.  The browser is Knoqueror.  

I believe that, eventually, I'll have to write a perl program to simulate
the browsers actions (if it cannot be done simply using curl).

Any help greatly appreciated.

Eric
-- 
# Eric Allan Lucas 
#-------------------
# Support Ken Krawchuk - Libertarian for Governor of Pennsylvania!
# Find out how YOU can help -> http://www.kenk.org     
#------------------- 

______________________________________________________________________
Philadelphia Linux Users Group       -      http://www.phillylinux.org
Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce
General Discussion  -  http://lists.phillylinux.org/mail/listinfo/plug