-
-
Save trevorturk/179263 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# how to follow bit.ly style urls to get at the real url | |
require 'rubygems' | |
require 'curb' | |
client = Curl::Easy.new('http://bit.ly/fleakr') do |config| | |
config.follow_location = true | |
config.max_redirects = 5 | |
end | |
client.http_head | |
puts client.last_effective_url |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment