For an address get the code details see the Post
For example, the video address of the potato is: http://www.tudou.com/a/OpofdZOE_mI/&iid=131686432&resourceId=0_04_05_99/v.swf
After direct access is:
http://js.tudouui.com/bin/player2/olc_8.swf?iid=131686432&swfPath=http://js.tudouui.com/bin/lingtong/ socialplayer_79.swf&youkuid=xnjc0mte5mdky&vcode=xnjc0mte5mdky&tvccode=-1&tag=null&title=% e7%ac%ac07%e8%af%9d+%e8%80%8d%e9%98%b4%e9%99%a9%e2%80%a6%e2%80%a6%21%21&mediatype=vi&totaltime=1434760 &hdtype=3&haspassword=0&nwidth=512&isoriginal=0&channelid=9&nheight=288&banpublic= False&videoowner=102599789&tict=2&tvccode=-1&channelid=9&cs=6_480|482&k=&totaltime =1434760&panelrecm=http://css.tudouui.com/bin/lingtong/panelrecm_9.swz&paneldanmu=http:// Css.tudouui.com/bin/lingtong/paneldanmu_1.swz&panelend=http://css.tudouui.com/bin/lingtong/panelend_11.swz &pepper=http://css.tudouui.com/bin/binder/pepper_17.png&panelshare=http://css.tudouui.com/bin/lingtong /panelshare_7.swz&panelcloud=http://css.tudouui.com/bin/lingtong/panelcloud_8.swz&prd=&autoplay= false&listtype=3&rurl=&Amp;resourceid=0_04_05_99&autostart=false&lid=0&aid=228258&acode=opofdzoe_mi&code=jh-1k_ Odtwe&snap_pic=http%3a%2f%2fr1.ykimg.com%2f054104085301e3696a0a4f52041d537c&aoprate=0.001&p2prate= 0.95&adsourceid=81000&yjuid=1392279724827k3i&yseid=1392887009649tqcvcx&yseidtimeout= 1392898462767&yseidcount=4&uid=null&juid=018h4v26uu19ca&vip=0
How to use PHP to get the address after access and output
------Solution--------------------
$url = ' http://www.tudou.com/a/OpofdZOE_mI/&iid=131686432&resourceId=0_04_05_99/v.swf ';
$ch = Curl_init ($url);
curl_setopt ($ch, curlopt_followlocation, false);
curl_setopt ($ch, Curlopt_returntransfer, true);
curl_setopt ($ch, Curlopt_header, true);
Curl_exec ($ch);
$response = curl_exec ($ch);
Preg_match_all ('/^location: (. *) $/mi ', $response, $matches);
Curl_close ($ch);
Echo!empty ($matches [1])? Trim ($matches [1][0]): ' No redirect found ';