This is an extension of the thread: http://primeforums.net/Thread-Randomisers-in-programing-Tutorial lf you haven't read it, you probably should to understand the difference between PRN's and TRN's. In this extension of Randomisers in programing - I will be showing Prime Forums an example of a Pseudo-Random Number generator written in Pre-Hypertext Processor (PHP), which is a language used to add dynamic functions and database interaction to websites. Prerequisites: An environment designed to code and run PHP files.Highly recommended: Notepad++ to code, and a HTTP server (Apache, IIS, XAMPP, etc) with PHP configured. Any web host will have this. Let's start with the example in the original post: Rather than creating a button, I've decided it'd be easier if I were to just use a link that would refresh the page in order to re-run the randomiser - especially for those who aren't experienced in web development. So let's begin! Preparing the environment Find the root directory for your http server. Most are in the C: directory under a folder name 'www' or 'htdocs'. Create a file called 'randomiser.php' in this folder. Open Notepad++. Click the 'File' tab, then click 'Open' and find the "randomiser.php" file you just created. Creating the RandomiserPaste the following code, and I'll explain it piece by piece after. Code: <?php $getMilliseconds = round(microtime()*100); $randomiseMilliseconds = round((($getMilliseconds / 15) * 1.59) + 2); echo $randomiseMilliseconds; ?> <br><a href="/randomiser.php">Generate new number!</a> $getMilliseconds = round(microtime()*100); This is how we get the current time in milliseconds. $randomiseMilliseconds = round((($getMilliseconds / 15) * 1.59) + 2); This is the basic Pseudo-Random Number generator that is triggered every time the page loads. It takes the current time in milliseconds, divides it by 15, multiplies it by 1.59, adds 2, and uses "round()" to round it up! echo $randomiseMilliseconds; This displays the generated number on the page. <br><a href="/randomiser.php">Generate new number!</a> This basically is a link that refreshes the page, generating a new number. The numbers that pop up will seem pretty fucking random to the normal eye, and once again this is why it's known as a "Pseudo-Random Number". In the future I will post a downloadable example. Feel free to ask any questions! [hr] P.S. - I'd also like to add that PHP already has a built-in PRN, which is rand(); - the above method was created purely for educational purpose and is in no way more efficient than the built-in function. Although you could probably use this guide to make a much better randomiser than rand(), this is far from it.