Solved

getting url

Posted on 2004-09-23
3
160 Views
Last Modified: 2010-03-05
Hi,
i'd like to monitor a website, the script gets the http response using LWP::UserAgent,
fine so far but the webiste gives trouble because it first connects to a sql which takes
time, after the request the site gets redirected provided with a session id, this id is
needed for the monitoring.
Is there a nice way to do that ?

thanks
0
Comment
Question by:MKrauss
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 8

Expert Comment

by:davorg
ID: 12140888
You'll need to look at the data returned in the HTTP response and either grab the session id from there or make another request following the redirection.

All of the data is available using methods on the HTTP::Response class (which is what to get back from the LWP::UserAgent request method).
0
 
LVL 20

Accepted Solution

by:
jmcg earned 125 total points
ID: 12201858
It might also be worth looking at the WWW::Mechanize module.

http://search.cpan.org/~petdance/WWW-Mechanize-1.04/

which is built on top of LWP::UserAgent. It sets things up so cookie-based session keys and redirects should be handled naturally.

Also see: http:Q_21083770.html
0
 
LVL 1

Author Comment

by:MKrauss
ID: 12260506
Thats should make it, many thanks.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Perl strange behaviour 5 79
Perl script to parse xml file 2 144
Perl Script - Remove row of data based on column value 3 78
add a syntax to a csv file 8 101
On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question