Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Get redirected URL

by LTjake (Prior)
on Aug 11, 2009 at 14:49 UTC ( #787659=note: print w/ replies, xml ) Need Help??


in reply to Get redirected URL

c.f. requests_redirectable

use strict; use warnings; use LWP::UserAgent; my $ua = LWP::UserAgent->new( requests_redirectable => [], ); my $res = $ua->get( shift ); print $res->status_line, "\n", 'Location: ', $res->header( 'location' +), "\n"; __END__ bricas@bricas-laptop:~$ perl red.pl http://bit.ly/gf4h1 301 Moved Location: http://github.com/rjbs/tpf-grant-history/blob/master/history +.txt

--
"No matter how much you push the envelope it'll still be stationary."


Comment on Re: Get redirected URL
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2014-11-29 00:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (200 votes), past polls