$res=file_get_contents('http://api.t.sina.com.cn/short_url/shorten.json?source=3271760578&url_long=http://www.test.com/note/249723561/');
$res=json_decode($res,true);
print_r($res[0]['url_short']);exit;
返回的是一个JSON格式:
[
{
"url_short": "http://t.cn/RfHSwCm",
"url_long": "http://www.test.com/note/249723561/",
"type": 0
}
]