how to retrieve the header information from a html page ???

S

senthilS

Here is the sample scenario :

A cgi request is going to a server say a webserver or a application
server, that server is configured to redirect this request to a
"sample.html" page.

This html page is just a test page just to get this request.

Now I want to retrieve the header information of this sample.html page.

Is there anyway we can script to get header information from
sample.html whenever the server redirects all request to this
sample.html page

Thanks,
 
S

Sherm Pendley

senthilS said:
A cgi request is going to a server say a webserver or a application
server, that server is configured to redirect this request to a
"sample.html" page.

Start with LWP. Create a user agent and submit a POST requst to the form.

When a response comes back, it will be a redirect to the sample page.
Examine the response to get the URL of the sample page, then do a second
HEAD request to that URL.

That's the general idea. For details, see the LWP module on CPAN. For higher
level automation - session tracking, form parsing, etc. - have a look at
WWW::Mechanize, also on CPAN.

sherm--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top