php对接短链接接口

function url($url){
	$url=urlencode($url);
	$html = file_get_contents("http://suo.im/api.php?key=XXXXXXXX&format=json&url=" . $url);
	$result = json_decode($html, true);
	$url2=$result['url'];
	return $url2;
}
发布了70 篇原创文章 · 获赞 25 · 访问量 3685

猜你喜欢

转载自blog.csdn.net/weixin_43993175/article/details/104888836