Welcome to Great Excess arrow Website arrow php - website arrow PHP Random Image - Script Random Image
Saturday, 06 September 2008
 
 
English Language
Bahasa Indonesia
Computer
Website
Gallery
Health
Ebook
Tips
Movies
Add Site
Directory Listing

Visitor Data
Your IP
38.103.63.59
United States United States :
Browser
Unknown Browser Unknown Browser
Operating System
Unknown Operating System Unknown Operating System

PHP Random Image - Script Random Image | Print |
 

PHP Random Image - Random Banner
This code can use for Banner, or Style website.

 

Code: 

Example:
<html>
<HEAD>
  <link rel="stylesheet" href="excess.css" type="text/css" />
</HEAD>
<body leftmargin="0" topmargin="0">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr>
<td align="center">
<?php

$file ="banner.txt"; /* Where the file banner code? */
$x = file("$file");
$y = rand(0, sizeof($x)-1);
echo $x[$y];

?>
</tr>
</td>
</table>
</body>
</html>

Follow step by step how to make Random Banner!
1. Creat code bellow to random.php
<html>
<HEAD>
  <link rel="stylesheet" href="excess.css" type="text/css" />
</HEAD>
<body leftmargin="0" topmargin="0">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr>
<td align="center">
<?php

$file ="banner.txt"; /* Where the file banner code? */
$x = file("$file");
$y = rand(0, sizeof($x)-1);
echo $x[$y];

?>
</tr>
</td>
</table>
</body>
</html>

2. Create code bellow to excess.css
body {
  color: #000000;
  font-family: "Times New Roman", Times, serif;
  font-size: 11pt;
}

a {
  color: #000000;
  text-decoration: none;
}

a:visited {
  color: #0000FF;
}

a:hover {
  color: #C0C0C0;
}

3. Create code bellow to banner.txt
<embed allowScriptAccess="never" allowNetworking="internal" src="http://www.g-excess.com/partner/swf/ikan.swf" quality=high  wmode=Transparent  width="200" height="200"></embed>
<a href="http://wwww.g-excess.com/" target="_blank"><img src="http://www.google.co.id/logos/balloon08.gif" width="200" height="112"></a>
<a href="http://www.g-excess.com/" target="_blank"><img src="http://kahnews.net/Firefox-banner.png" width="180" height="60"></a>
<a href="http://www.g-excess.com/" target="_blank"><img src="http://toastytech.com/good/ffbanner.png" width="180" height="60"></a>

4. Save with same folder and upload to your webs hosting.
5. Try access it

PHP Random Image - Random Banner
 

This entry was posted on . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a comment.
Users' Comments (0)

Comment an article
  Name
  E-mail
   Title
Available characters: 600
This image contains a scrambled text, it is using a combination of colors, font size, background, angle in order to disallow computer to automate reading. You will have to reproduce it to post on my homepage
Enter what you see:

No comment posted

 
Top! Top!