Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTTP Headers and CGI

Status
Not open for further replies.

dcusick

Technical User
Aug 9, 2000
271
US
Hello all! I know very little CGI, but I think it might be useful for what I plan on doing, so I might know it very well at the end of this project(or hopefully!). Anyway, I go to a website that has a mess of information in frames and tables. I would like to be able to view this on my cellphone, but cannot becuase the HTML seems all mangled. So what I figured I'd do, was to grab the HTML content from that site and create my own WML version of it. This way, I'll have all the data, but in a viewable form.

First problem: I have to log into the site. Is there a way that I can emulate typing in my username/password and hitting submit? Can't I somehow do this be POSTing the correct HTTP Header? If so, how do I know the correct format for the headers?

Second Problem: How do I get the HTML content. I was looking at HTTP Viewer from And that is very similar to what I want, but his source code isn't freeware. So, anyone know how he did this? or how it can be done? Thanks in advance...

Doug
 
Thanks for the response... Looks pretty good so far.. gonna look into this a little more... Thanks mbrooks. Much Appreciated!

Doug
 
use LWP;

$browser = LWP::UserAgent->new();

$browser->credentials(
"???",
'??????????',
'login' => 'password' # <- login / password
);


Kind Regards
Duncan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top