Call us Toll-Free:
1-800-218-1525
Live ChatEmail us

 Sponsors

8 Ball

Code Wizard, 12-30-2006

Just a plain eightball, with random answers. Can be used for other misc. things. Go to: http://php.betatracer.com/8ball/8ball.php3 for a example of what it looks like. all you have to do is save this, with a .php3 extension, and it works!

<?php
echo "<center><form action='$PHP_SELF?action=answer' method='post'>
Question: <input type='text' name='question'> <input type='submit' value='Ask..'>
</form></center>";

if($action == "answer"){
echo "<br>
<hr color='black' size='3' width='99%'>
<br>
<center>";

srand((double)microtime()*1000000);
$shake = rand(0,6);

if($shake == "0"){
echo "Definately";
} elseif($shake == "1"){
echo "Yes";
} elseif($shake == "2"){
echo "Sometimes";
} elseif($shake == "3"){
echo "Possibly";
} elseif($shake == "4"){
echo "Sorry, No";
} elseif($shake == "5"){
echo "Probably";
} elseif($shake == "6"){
echo "Not Likely";
}
echo "</center>";

}
?>
Enjoyed this post?

Subscribe Now to receive new posts via Email as soon as they come out.

 Comments
Post your comments












Note: No link spamming! If your message contains link/s, it will NOT be published on the site before manually approved by one of our moderators.



About Us  |  Contact us  |  Privacy Policy  |  Terms & Conditions