Strict Standards: Declaration of RSS::DoAction() should be compatible with CMSModule::DoAction($name, $id, $params, $returnid = '') in /home/xandaorg/public_html/modules/RSS/RSS.module.php on line 0

Strict Standards: Non-static method PageInfoOperations::LoadPageInfoByContentAlias() should not be called statically in /home/xandaorg/public_html/index.php on line 154

Warning: Cannot modify header information - headers already sent by (output started at /home/xandaorg/public_html/modules/RSS/RSS.module.php:0) in /home/xandaorg/public_html/index.php on line 299
Xanda - /dev/project - Convert Shorten URL (, tinyurl, to Full URL in Ruby

You might worry to visit directly to a shorten URL because who knows it may contain some malicious script/code

I’ve found a solution “Python: Convert those TinyURL (, tinyurl, to full URLS” in but the code is in Python.

Here is how you can perform the conversion in Ruby

require 'net/http'

def ConvertToFull(tinyurl)
   url = URI.parse(tinyurl)
   host, port =, url.port if && url.port

   req =
   res = Net::HTTP.start(host, port) {|http|  http.request(req) }

   return res.header['location']
puts ConvertToFull('') #here is how you can call the function. Thank you Captain Obvious!