I get the file size from the index of the page, it's 1024KB and I want it to print 1MB stead of 1024KB, what should I do? (completely noob here)
I got this:
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\n";
logstr("log-c.txt","bad link\n");
}
else
{
preg_match("**/([^\/\|\#\<\(\>\;\s][0-9]*[\s][KB]{2})/**",$index,$match);
$fsize=$match[1];
print $fsize."\n";
logstr("log-c.txt","bad link\n");
//logstr("log-c.txt","$caption | $fsize\n");
mysql_query("UPDATE `v2links` SET `checked`='1',`fsize`='$fsize',`lastcheck`=NOW() WHERE `id`=".$row[0]);
unset($match);
}
}
Thanks