function issupport(url)
	if url:find('^http://d.1tpan.com/') then return true end
	return false
end

function analyze(url)
	local json = require('json')
	require('common')
	print('-----------------------Enter analyze-----------------------')
	print('url:'..url)
			
	page = idown.requesturl(url)
	tpandata = page:match("WebApp.data.link='([^']+)")
	tpandata = json:decode(tpandata)
	ip, addr = getmyip()
	print('ip:'..ip..'addr:'..addr)
	network = {'u', 't'}
	url2 = string.format('http://d.1tpan.com/tfs3/servlet/link?cmd=readlink&extraCode=%s&network=%s&filename=%s&size=%s', tpandata.extra_code, network[addr], tpandata.tdiskFile.name, tpandata.tdiskFile.size)
	print(url2)

	result = {}
	result['verb'] = 'POST'
	result['realurl'] = url2
	result['title'] = tpandata.tdiskFile.name
	result['realname'] = tpandata.tdiskFile.name
	result['encode'] = 65001
	result['postdata'] = ''

	retstr = json:encode(result)
	print('ret:'..retstr)
	
	return 1, retstr	
end