【PHP源码】短网址
<?php
error_reporting(0);
$text=$_REQUEST["url"];
if($text==null){
echo "不完整";
exit();
}
$curl=curl_init();
$url="https://sa.sogou.com/gettiny?url=".$text."";
curl_setopt($curl,CURLOPT_URL,$url);
curl_setopt($curl,CURLOPT_SSL_VERIFYPEER,false);
curl_setopt($curl,CURLOPT_SSL_VERIFYHOST,false);
curl_setopt($curl,CURLOPT_RETURNTRANSFER,1);
curl_setopt($curl,CURLOPT_TIMEOUT,20);
$ret=curl_exec($curl);
if($ret==null){
echo "失败";
exit();
}
echo $ret;
?>

 

© 版权声明
THE END
喜欢就支持以下吧
点赞0
分享
评论 抢沙发

请登录后发表评论