Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: determine url redirection

by vinoth.ree (Monsignor)
on Feb 18, 2015 at 09:04 UTC ( [id://1117077]=note: print w/replies, xml ) Need Help??


in reply to determine url redirection

Hi sylph001

Here is the sample code from one of my project, it prints the redirected URL,

use LWP::UserAgent; my $UA_Obj = LWP::UserAgent->new; my $request = HTTP::Request->new( GET => 'your_URL_Here' ); my $response = $UA_Obj->request($request); if ( $response->is_success and $response->previous ) { print $request->url, ' redirected to ', $response->request->uri, " +\n"; }
Update: More on this refer node Get redirected URL

All is well

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1117077]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-04-20 04:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found