Solved

getting url

Posted on 2004-09-23
3
153 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
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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

772 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