Author Topic: php code for changing avast logo  (Read 2859 times)

0 Members and 1 Guest are viewing this topic.

gersom

  • Guest
php code for changing avast logo
« on: December 30, 2005, 05:21:59 PM »
I was placing avast logo's on my site and then I thought of something cool :)...
I made 1 file with the following source
<?
$rand=rand(1,11);
   if($rand == 1)
   {
      echo "<A href='http://www.avast.com/eng/avast_4_server.html' title='Description of avast! server edition'><IMG height=41 alt='avast! Server' src='http://www.avast.com/eng/pic/server.gif' width=100 border=0></A>";
   }
      elseif($rand == 2)
      {
         echo "<a href='http://www.avast.com/eng/avast_for_kerio.html' title='Description of avast! for Kerio'><img alt='avast! for Kerio' src='http://www.avast.com/eng/pic/kerio.gif' border=0></a>";
      }
         elseif($rand == 3)
         {
            echo "<a href='http://www.avast.com/eng/avast_for_linux.html' title='avast! for Linux'><img src='http://www.avast.com/eng/pic/linux.gif' width='100' height='41' border='0' alt='avast! for Linux'></a>";
         }
            elseif($rand == 4)
            {
               echo "<a href='http://www.avast.com/eng/avast_for_linux.html' title='avast! for Linux'><img src='http://www.avast.com/eng/pic/linux.gif' width='100' height='41' border='0' alt='avast! for Linux'></a>";
            }
               elseif($rand == 5)
               {
                  echo "<a href='http://www.avast.com/cze/avast_4_pda.html'><img src='http://www.avast.com/eng/pic/pda.gif' width='100' height='41' border='0' alt='avast! pro PDA'></a>";
               }
                  elseif($rand == 6)
                  {
                     echo "<a href='http://www.avast.com/eng/avast_bart_cd.html' title='avast! BART CD'><img src='http://www.avast.com/eng/pic/bart.gif' width='100' height='41' border='0' alt='avast! BART CD'></a>";
                  }
                     elseif($rand == 7)
                     {
                        echo "<a href='http://www.avast.com/eng/avast_4_professional.html' title='avast! Professional'><img src='http://www.avast.com/eng/pic/prof.gif' width='100' height='41' border='0' alt='avast! Professional'></a>";
                     }
                        elseif($rand == 8 )
                        {
                           echo "<a href='http://www.avast.com/eng/avast_4_home.html' title='avast! Home'><img src='http://www.avast.com/eng/pic/home.gif' width='100' height='41' border='0' alt='avast! Home'></a>";
                        }
                           elseif($rand == 9 )
                           {
                              echo "<a href='http://www.avast.com/' title='avast! antivirus'><img src='http://www.avast.com/eng/pic/homepage2.gif' width='100' height='41' border='0' alt='avast! antivirus'></a>";
                           }
                              elseif($rand == 10)
                              {
                                 echo "<a href='http://www.avast.com/' title='avast! antivirus'><img src='http://www.avast.com/eng/pic/homepage1.gif' width='100' height='41' border='0' alt='avast! antivirus'></a>";
                              }
                                 elseif($rand == 11)
                                 {
                                    echo "<a href='http://www.avast.com/' title='avast! antivirus'><img src='http://www.avast.com/eng/images/logo_reseller.gif' width='100' height='41' border='0' alt='avast! reseller'></a>";
                                 }
?>
The code is simple... $rand gets a different value everytime this script is loaded. So that means you get a different logo on the page.
And that migth be usefull :)
edit: (Only works in php sites ;))
« Last Edit: December 30, 2005, 05:23:54 PM by gersom »