我从该页的索引中拿到档案尺寸,该指数为1024KB,我希望它印刷1MB,而不是1024KB。 (此处完全是注解)
我这样做:
if($row[2]==1) // Rapidshare Check
{
$index=getpage($row[1]);
if(strpos($index,"FILE DOWNLOAD")===false) //check if page contains the word file download if not = bad link
{
mysql_query("UPDATE `v2links` SET `checked`= -1 ,`lastcheck`=NOW() WHERE `id`=".$row[0]);
print "bad link
";
logstr("log-c.txt","bad link
");
}
else
{
preg_match("**/([^/|#<(>;s][0-9]*[s][KB]{2})/**",$index,$match);
$fsize=$match[1];
print $fsize."
";
logstr("log-c.txt","bad link
");
//logstr("log-c.txt","$caption | $fsize
");
mysql_query("UPDATE `v2links` SET `checked`= 1 ,`fsize`= $fsize ,`lastcheck`=NOW() WHERE `id`=".$row[0]);
unset($match);
}
}
增 编