PHP
  Home arrow PHP arrow Page 7 - Clicking Through: A phpBanner Primer
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Clicking Through: A phpBanner Primer
By: Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 16
    2004-04-21


    Table of Contents:
  • Clicking Through: A phpBanner Primer
  • Start Me Up
  • Client Server
  • Of Pictures and Words
  • Hits And Misses
  • Hooking Up
  • Different Strokes
  • Clicking Through

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Clicking Through: A phpBanner Primer - Different Strokes
    ( Page 7 of 8 )

    While using the "client" keyword selection makes sense if you get an exclusive advertiser, the truth is that you will have many advertisers vying for the prime spots on your site. And you're interested in satisfying as many clients as possible so that you can buy your own island and retire. Which is why you might prefer this:


    <?
    $banner=get_banner("keyword","kids");
    ? >


    In this case, phpBanner will display a random banner containing the keyword kids.

    You can even display a banner on the basis of its dimensions. Consider the following example, which displays a random banner of size 400x60:


    <?php
    <?
    $banner=get_banner("size","400x60");
    ? >


    And if you're wondering if you can call this function more than once in your PHP script, no sweat. Take a look at the next example, which contain two banners, one at the top and one at the bottom of the page, and see how you can get rich twice as fast:


    <?
    require
    ("/www/htdocs/phpbanner/require/config.php");
    require
    ("/www/htdocs/phpbanner/require/banner.php");
    ? >
    <html>
    <head>
    <basefont face="Arial">
    </head>
     
    <
    body>
     
    <
    table height="100%" width="100%" border="0" cellspacing="5"
    cellpadding
    ="5"> <tr>
     
    <td align="center"><? $banner=get_banner("client","1");? >
     
    <a href="http://www.mysite.com/phpbanner/link.php?banner_id=<?echo
    $banner[id];? >"
    >
    <img border=0
    src
    ="http://www.mysite.com/phpbanner/view.php?banner_id=<?echo
    $banner[id];? >" 
    alt="<?echo $banner[alt];? >">
    </a></td>
    </tr>
    <tr>
     
    <td height="100%" width="100%" valign="top" bgcolor="silver"
    align
    ="left">
     
    <h2>Sample page</h2>
     
    <center>
     Content here
     
    <p>
     Content here
     
    <p>
     Content here
     
    <p>
     
    </center>
     
    </td>
    </tr>
    <tr>
     
    <td align="center"><? $banner=get_banner("keywords","Oracle");? >
     
    <a href="http://www.mysite.com/phpbanner/link.php?banner_id=<?echo
    $banner[id];? >"
    >
    <img border=0
    src
    ="http://www.mysite.com/phpbanner/view.php?banner_id=<?echo
    $banner[id];? >" 
    alt="<?echo $banner[alt];? >">
    </a></td>
    </tr>
    </table>
     
    </
    body>
    </html>

    Here's how this looks:

    phpBanner

    In case you're wondering if the same banner can appear more than once on the page, the developer clearly states that "...you may call get_banner() as many as you want, it won't be return any similar banner_id..."

    Finally, the most important feature, at least as far as your advertisers are concerned: the reports which demonstrate how many eyeballs have seen their banners, and how many clicks have resulted. In order to assist you in generating these reports, phpBanner comes with a fairly simple report generating module.

    All your clients can access banner statistics by clicking on the "My Banner" option in the menu. After entering their credentials, the Banner Manager will appear on the screen.

    phpBanner

    The above screen give the advertiser a quick overview of the number of hits and clicks of each and every banner uploaded to the application.



     
     
    >>> More PHP Articles          >>> More By Harish Kamath, (c) Melonfire
     

       

    PHP ARTICLES

    - Building Dynamic Queries with Chainable Meth...
    - PHP Encryption and Decryption Methods
    - Building a MySQL Abstraction Class with Meth...
    - Completing a Sample String Processor with Me...
    - Mastering WHILE Loops for PHP and MySQL
    - Method Chaining: Adding More Methods to the ...
    - Method Chaining in PHP 5
    - The Role of Interfaces in Applying the Depen...
    - Dependency Injection: Using a Setter Method ...
    - Using a Model Class with the Dependency Inje...
    - Injecting Objects Using Setter Methods with ...
    - Injecting Objects by Constructor with the De...
    - The Dependency Injection Design Pattern in P...
    - Performing Inferential Statistical Analysis ...
    - Performing Descriptive Statistical Analysis ...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    Stay green...Green IT