bored
Posted: Wed Jul 04, 2007 6:18 am
got bored so wrote this
Code: Select all
<html>
<head>
<script>
setTimeout(redirect,70);
function redirect(){
top.location='tables.php';
}
</script>
</head>
<body>
<?php
function rand_string($len, $chars = 'ABCDEF0123456789')
{
$string = '';
for ($i = 0; $i < $len; $i++)
{
$pos = rand(0, strlen($chars)-1);
$string .= $chars{$pos};
}
return $string;
}
for($i=0;$i<30;$i++){
$bg_color = rand_string(6);
?><table width="100%" cellpadding="5" cellspacing="5" border="5" bordercolor="#<?php echo $bg_color;?>">
<tr>
<?
$bg_color = rand_string(6);
?>
<td bgcolor="#<?php echo $bg_color;?>">
<?php
}
for($i=0;$i<30;$i++){
?></td>
</tr>
</table><?php
}
?>
</body>
</html>