Просмотр файла cat/in.php

Размер файла: 1.47Kb
<?php
require ("cfg.php");
$id=intval($id);
$sd="qwertyuiopadfghjklzxcvbnm0123456789";
$size_sd=strlen($sd)-1;
$in="";
for($ab=0;$ab<32;$ab++){
$in.=$sd[rand(0,$size_sd)];}
$ipss = getenv('REMOTE_ADDR');
$q=mysql_query("select * from `cool_pro` where id='$id' and ip='$ipss';");
$rows=mysql_num_rows($q);
if($rows=="0"){@mysql_query("insert into `cool_pro` values('$id','$datecool','$ipss','$in')");
$coolip=$ipss.".555";
@mysql_query("insert into `cool_pro` values('$id','$datecool','$coolip','$in')");}
$content = file("content.txt");
$contentrandom = rand(0, sizeof($content)-1);
$contentrandom2 = rand(0, sizeof($content)-1);
$contentrandom3 = rand(0, sizeof($content)-1);
while($contentrandom == $contentrandom2){$contentrandom2 = rand(0, sizeof($content)-1);}
while($contentrandom == $contentrandom3||$contentrandom2 == $contentrandom3){$contentrandom3 = rand(0, sizeof($content)-1);}
$contcool = "$content[$contentrandom]$content[$contentrandom2]$content[$contentrandom3]";
header ("Content-type:text/vnd.wap.wml; charset=utf-8");

print"<?xml version=\"1.0\"?>
<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">
<wml><head><meta http-equiv=\"Cache-Control\" content=\"no-cache\" forua=\"true\"/></head>
<card title='Go' ontimer='$site/?id=$id&amp;in=$in'>
<timer value='1'/><p>
Подождите... <a href='$site/?id=$id&amp;in=$in'>$site/?id=$id&amp;in=$in</a>
<br/>-----<br/>$contcool<br/>
</p></card></wml>";

?>