Print Thread
Banner rotator
Dzonson
As the name says, this is a banner rotator made ??in php and html.

We create two files php and css

The first is the php file (Save to reklamy.php)
Download source  Code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl">
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
      <meta name="robots" content="none"/>

      <link rel="stylesheet" type="text/css" href="style.css"/>
   </head>
   <body>
<?php
   $reklama[] = '<a href="http://www.nfszone.pl" target="_blank"><img src="http://host.nfszone.pl/images/15265212066509942356.png" alt="NFSZone.pl - Twoje centrum NFS w Polsce" width="468" height="60" border="0"></a>';
   
      
   $reklama[] = '<a href="http://www.e-nfs.eu/" title="e-NFS.eu - Need for Speed, Shift, Nitro, World Online, Undercover, ProStreet, Carbon, Most Wanted, Underground 2, Underground" target="_blank"> <img src="http://www.e-nfs.eu/buttons/eNFSeu_468x60_01.jpg" alt="e-NFS.eu - Need for Speed, Shift, Nitro, World Online, Undercover, ProStreet, Carbon, Most Wanted, Underground 2, Underground" style="border:none;" /> </a>';
   
   
   
   $reklama[] = '<a href="http://www.needforspeed.pl" target="_blank" title="nfs, need for speed, shift, world online, nitro, undercover"><img src="http://www.tkk.pl/~bryg/baner04.gif" alt="nfs, need for speed, shift, world online, nitro, undercover" border="0"></a>';
   
      
   
   
   echo $reklama[rand(0,count($reklama)-1)];
?>
   </body>
</html>





The second image is a style (Save to styler.css)
Download source  Code
*{
   padding:0;
   margin:0;
}

body{
   text-align:center;
}

img{
   border:solid 1px #000;
}

img:hover{
   border-color:#f00;
}




All put in the same directory with the name reklamy.

[fpnotice=info]I would recommend the application includes[/fpnotice]
Edited by Dzonson on 04-10-2013 23:28
 
Jump to Forum: