Heim > php教程 > php手册 > 获取新浪微博的Tiny网址链接

获取新浪微博的Tiny网址链接

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Freigeben: 2016-06-07 11:41:21
Original
1629 Leute haben es durchsucht

///////////////////////////////////////////////////////////////////////获取新浪微博的T网址链接
//http://open.weibo.com/wiki/2/short_url/shorten
//http://open.weibo.com/wiki/Help/error
//http://open.weibo.com/wiki/2/account/rate_limit_status 新版
    ///////////////////////////////////////////////////////////////////////获取新浪微博的T网址链接<br>     //http://open.weibo.com/wiki/2/short_url/shorten<br>     //http://open.weibo.com/wiki/Help/error<br>     //http://open.weibo.com/wiki/2/account/rate_limit_status 新版<br>     function GetTurl($url=''){<br>         <br>         set_time_limit(0);    <br>         //$tApi="https://api.weibo.com/2/short_url/shorten.json?access_token=[你的token]&url_long=";<br>         $tApi="https://api.weibo.com/2/short_url/shorten.json?source=[你的appkey]&url_long=";<br>         $tApi=$tApi.urlencode($url);        <br>         $ret=file_get_contents($tApi);<br>         $ret=json_decode($ret,true);<br>         if($ret['error']) return $url;<br>         if(is_array($ret['urls'])){<br>             $r= $ret['urls'][0]['url_short'];<br>             return $r;<br>         }<br>         return $url;        <br> <br>     }<br> <br> 来自: http://www.55lm.net/

AD:真正免费,域名+虚机+企业邮箱=0元

Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Beliebte Empfehlungen
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage