|
|
Randomizing
PHP » Tips and Tutorials » Randomizing
A D V E R T I S E M E N T
Want free Oracle Magazine? Apply here now!
Flip a Coin - freewareEasily make a quick random choice between two options. This php script works by seeing if the current server time seconds is even or odd. The code snippet also extends the basic principle to let you flip a 3-sided coin (for choosing among 3 options). Use this for deciding banners, style sheets or any random choice between a very limited number of options. Random password generator - GPLThere are many password generators out there ranging from the very simple, to the downright insane. This tutorial will walk you through why each line of code exists, and how these simple techniques can be adapted into other functions you may write. random image - freeThis beginners example shows how to display a random image on a web page from an entry in a text file. random password - freeThis shows how to generate random passwords, these could be added to more complex scripts to create a login system. Random Quotes - FreewareMany people email wondering how the heck we make the random quotes on the title bar at the main page of Spoono.com. Well, we're finally releasing the secret, and its not as hard as you think :) Simple Random HTML Emitter - FreewareA simple and quick random HTML emitter that you can easily integrate into your web site. There's no need for an overly complex solution here.
Generate a random passwordA function that generates a password randomly from a set of characters. The length of the password and the characters to choose from can be altered. Programmatic random image & hyperlink scriptThis script uses a MySQL database and PHP to produce random images and associated hyperlinks. Great for producing random 88x31 buttons. Using PHP to create random numbers - FreeThis tutorial explains how to create random numbers in PHP using rand() and mt_rand(). The second part of the tutorial explains how to weight random numbers to favor a given outcome. Very handy for ad rotation, or game design. PHP Freaks: Randomize Images, Quotes and MySQL ResultsLearn how to randomize just about anything you need on your website. Great for Random Quotes, Images and MySQL Results. Fetching random recordEver wanted to place the random line of text or random image on the page There are two basic methods for fetching random records from the database. The frist method is to generate a random number when outputting data and the second method is to form a proper MySQL query. Go to a random URL - FreeA code snippet to redirect the visitor to a random URL, choosen from a list of urls that you define. How to place a random imageThis tutorial will teach you how to open a folder and how to read it contents. The sample code here does all the work to output random image located in the specified directory into your page. Random password generatorThis script uses only one cycle to generate random size password sequences filled with valid random characters. Good tutorial for PHP beginners. Shuffled dataDisplays the contents of an array suffled, for example list of URLs. Can be easily modified to suit your needs. Working demo aviable. Generate Random QuotesStep by step tutorial on how to display random quotes on your web page. This can also be used for displaying macromedia flash files as well. Random Image with a Database - FreeThis tutorial will show you a sample of how to generate a random number and how to use that number to get a random item from a list. This example uses a MySQL database to store the image names and URLs. Random Numbers in PHP - FreeIn this tutorial you will learn how to generate random numbers using PHP. It illustrates three helpful examples that uses random numbers: Generating a random number between 0 and 9, Simple slots script that generates multiple random numbers, and random text link ads. Generating Random Numbers - FreeThis short one-page tutorial explains how to generate random numbers using PHP.
|
A D V E R T I S E M E N T
|
Subscribe to SourceCodesWorld - Techies Talk |
| |
|