配置文件
[php]
主要代码
[php]
0){
//$url = http://1dnet.net/index.php?api=1&return_url_text=1&longurl=.$_get['url'];
$url=http://qita.in/app.php?api=.api_key.&type=noad&url=.$_get['url'];
$ch = curl_init();
$timeout = 5;
curl_setopt($ch, curlopt_url, $url);
curl_setopt($ch, curlopt_returntransfer, 1);
curl_setopt($ch, curlopt_connecttimeout, $timeout);
//在需要用户检测的网页里需要增加下面两行
//curl_setopt($ch, curlopt_httpauth, curlauth_any);
//curl_setopt($ch, curlopt_userpwd, us_name.:.us_pwd);
$contents = curl_exec($ch);
eregi('http://qita.in/(.*)',$contents,$new);
curl_close($ch);
if(strlen($contents)$shorturl=请输入正确的短网址;
}
$shorturl=site./$new[1];
//echo [统计];
//echo '';
}
?>
7898.org免费短地址
免费短地址
缩短、分享及监测你的链接
短链接
原始网址
作者:liangxunli
http://www.bkjia.com/phpjc/478059.htmlwww.bkjia.comtruehttp://www.bkjia.com/phpjc/478059.htmltecharticle[php] 配置文件 [php] ?php /*网址设置*/ define(site,http://xxx.com);//域名后面不要加/ /*api设置*/ define(api_key,);//api,申请地址:http://qita.in/reg.php /*高级...
