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

Discussion in 'Perl Misc' started by senthilS, Mar 24, 2005.

  1. senthilS

    senthilS Guest

    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,
     
    senthilS, Mar 24, 2005
    #1
    1. Advertising

  2. senthilS wrote:

    > 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--

    --
    Cocoa programming in Perl: http://camelbones.sourceforge.net
    Hire me! My resume: http://www.dot-app.org
     
    Sherm Pendley, Mar 24, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Federica
    Replies:
    0
    Views:
    580
    Federica
    Apr 18, 2004
  2. vaidas gudas

    retrieve all information from domain

    vaidas gudas, Jun 18, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    345
    Trevor Benedict R
    Jun 18, 2004
  3. Dan Avni

    Retrieve posted information

    Dan Avni, Jun 19, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    398
    [MSFT]
    Jun 22, 2004
  4. mlt
    Replies:
    2
    Views:
    861
    Jean-Marc Bourguet
    Jan 31, 2009
  5. Amit Bobade
    Replies:
    1
    Views:
    516
    7stud --
    May 27, 2011
Loading...

Share This Page