--http://www.google.com.hk/url?sa=t&rct=j&q=%E6%B2%A1%E9%82%A3%E4%B9%88%E7%AE%80%E5%8D%95&source=web&cd=2&ved=0CDkQFjAB&url=http%3A%2F%2Fwww.xiami.com%2Fsong%2F1769274193&ei=FvkDT_DSOo2uiQen1bTPAQ&usg=AFQjCNFllkTB7NfRh5jdGfYN1HMwHcAWLA&sig2=yARP6gPPlaSzog6nNTDvqg&cad=rja
function issupport(url)
    if url:match("^http://www.google.com/url") then return true end
    if url:match("^http://www.google.com.%w+/url") then return true end
    if url:match("^https://www.google.com/url") then return true end
    if url:match("^https://www.google.com.%w+/url") then return true end
    return false
end

function analyze(url)
    require('common')
    local json = require('json')
    local params = urlparamdecode(url)
    local result = {}
    if params.url then
    result.Location = params.url
    else
    result.Location = params.q
    end
    return 301, json:encode(result)
end