我在此站点的快捷链接中遇到问题:http: //smileshort.com/short-anonymous-links-api.html
使用api:http ://smileshort.com/api.php?key=534287562&url=google.com
告诉我这个问题
Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively in Unknown on line 0
当我使用这个功能
<?php
function get_vgd($url)
{
$apiurl = "http://smileshort.com/api.php?key=890479270&url=$url";
$ch = curl_init();
$timeout = 3;
curl_setopt($ch,CURLOPT_URL,$apiurl);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
echo get_vgd("http://www.google.com");
?>