@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
if($_POST['password']!="(*&RV^*(&VRH*(V)))"){die("ERROR -1");}
|
||||
define ('IN_LM',true);
|
||||
include "./sql.php";
|
||||
include "./config.php";
|
||||
$db1=new mysqldb;
|
||||
$db1->conetdb(MYSQL_USERNAME,MYSQL_PASSWORD,MYSQL_DBNAME);
|
||||
$nowtime=date('Y-m-d H:i:s');
|
||||
$re=$db1->read_data_on_tab("lmve_newurls",array("flag"=>"1"),array("lastupdata"=>"ASC","score"=>"DESC"),"0,1");
|
||||
if(empty($re))
|
||||
{
|
||||
|
||||
$re=$db1->read_data_on_tab("lmve_newurls",array("flag"=>"0"),array("lastupdata"=>"ASC","score"=>"DESC"),"0,1");
|
||||
$db1->updata_on_tab("lmve_newurls",array("id"=>$re[0]['id']),array("flag"=>"1","lastupdata"=>$nowtime));
|
||||
print_r($re[0]['url']);
|
||||
}else
|
||||
{
|
||||
if(strtotime($nowtime)-strtotime($re[0]['lastupdata'])>600)//如果这个url10分钟还没更新
|
||||
{
|
||||
$db1->updata_on_tab("lmve_newurls",array("id"=>$re[0]['id']),array("lastupdata"=>$nowtime));
|
||||
print_r($re[0]['url']);
|
||||
}else
|
||||
{
|
||||
$re=$db1->read_data_on_tab("lmve_newurls",array("flag"=>"0"),array("lastupdata"=>"ASC","score"=>"DESC"),"0,1");
|
||||
$db1->updata_on_tab("lmve_newurls",array("id"=>$re[0]['id']),array("flag"=>"1","lastupdata"=>$nowtime));
|
||||
print_r($re[0]['url']);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user