Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

getting url

Posted on 2004-09-23
3
Medium Priority
?
172 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 375 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
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…
Six Sigma Control Plans

926 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