Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

getting url

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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

730 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