Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 examining the Monastery: (8)
As of 2015-07-31 10:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (276 votes), past polls