Solved

getting url

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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 …
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

707 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now