require_once './include/common.incs.php';
$nwlng=$_GET['nwlng'];
$nwlat=$_GET['nwlat'];
$selng=$_GET['selng'];
$selat=$_GET['selat'];
$timestamp=$_GET['$timestamp'];
$token=$_GET['token'];
$str='fds_sd2rrdx';
$token2=md5($str.$timestamp);
function createCode_yqm($user_id) {
static $source_string = '5FDCG3HQ84UNPEJ2RSBTV67MWX9AKLZY';
$num = $user_id;
$code = '';
while ( $num > 0) {
$mod = $num % 32;
$num = ($num - $mod) / 32;
$code = $source_string[$mod].$code;
}
if(empty($code[3]))
$code = str_pad($code,4,'0',STR_PAD_LEFT);
return $code;
}
if(time()-$timestamp>1800){
echo 'forbidden';
exit();
}
if($token==$token2){
global $db,$tablepre;
if($nwlng>0){
$sql= "SELECT * FROM `{$tablepre}video` where isstate=1 and lng !=0 and lat !=0 and lng>=$nwlng and lng<=$selng and lat >=$nwlat and lat<=$selat and copyright!=3 order by hits asc limit 0,50";
}else{
$sql= "SELECT * FROM `{$tablepre}video` where isstate=1 and lng !=0 and lat !=0 and copyright!=3 order by hits asc limit 0,50";
}
$result=$db->sql_query($sql);
$json="";
while($bd=$db->sql_fetchrow($result)){
$url=get_video_url($bd['id'],'FD转码');
$cover=get_cover($bd['id']);
$yqmid=createCode_yqm($bd['id']);
$json.="{\"id\":\"{$yqmid}\",\"videourl\":\"{$url}\",\"poster\":\"{$cover}\",\"title\":\"{$bd['title']}\",\"duration\":\"{$bd['Duration']}\",\"lng\":\"{$bd['lng']}\",\"lat\":\"{$bd['lat']}\"}@";
}
$json=substr($json,0,strlen($json)-1);
echo($json);
unset($sql,$result,$bd);
}else{
echo 'forbidden';
}
?>
一键复制
编辑
Web IDE
原始数据
按行查看
历史