Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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 surveying the Monastery: (7)
As of 2014-07-11 00:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (217 votes), past polls