Main Menu

HOME

.Net
ASP
Assembly
C
C++
Delphi
HTML
Java
JavaScript
MySQL
PC interface
Powershell
Perl
PHP
VBScript
Visual Basic
XML

Sedo - Buy and Sell Domain Names and Websites project info: programmershelp.co.uk Statistics for project programmershelp.co.uk etracker® web controlling instead of log file analysis

   Misc

   Amazon

   Links

    


Random image example

 

  This example uses an array to store images and then produces a random number and display the image on the screen . In real life you could display different banners , images etc

Here is the code for this example

<?php
//an array of 4 images in the same direcory as the script
$images = array("a1.gif","a2.gif","a3.gif","a4.gif");
//generate a random number
srand((double)microtime()*1000000);
$randomno = (rand()%4);
//display image
echo ("<img src=\"$images[$randomno]\">");
?>

 

 

 

 

 




   Sponsors
 

   Software
500 Java Tips E-book
PHP editor
PERL editor
Beginning Java
Beginning Visual Basic
Learn VB.net
Learn VB 6
VB and databases
ASP image library
C++ builder programming
C++ fundamentals

   Source Code
rectangular form example(VB)
Create a file(C Sharp)
start notepad from powershell(Powershell)
Preload images(Javascript)
VBScript supported(ASP.net)
Power calculator(C)
getprotobynumber function(PHP)
radians to degrees conversion(C Sharp)

    




Copyright © 2003 by programmershelp.co.uk