Administration
  Home arrow Administration arrow Page 7 - Banner Management With phpAdsNew (Part...
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
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? 
ADMINISTRATION

Banner Management With phpAdsNew (Part One)
By: Harish Kamath
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 15
    2005-03-15

    Table of Contents:
  • Banner Management With phpAdsNew (Part One)
  • Getting Started
  • phpAdsNew Installation Wizard
  • phpAdsNew Administration Overview
  • Setting Up A Publisher
  • Setting Up An Advertiser
  • Putting It All Together
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb 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

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Banner Management With phpAdsNew (Part One) - Putting It All Together
    (Page 7 of 8 )

    In the last two sections, I showed you how to create "publishers" and "advertisers." All that remains is get the two of them to "tango" together. Not surprisingly, this versatile tool provides several ways to integrate them.

    Log on to phpAdsNew as a "publisher" - you could use your "administrator" credentials also - and navigate to the "Inventory" section. Here, you should view all the "zones" that you've created for this "publisher":

    Click on the "Invocationcode" option to view the following:

    you'll notice a drop down  that allows you select the type of "banner invocation" that you would like to use. For your current set-up in which you've installed phpAdsNew under the root folder of the website, the "Local mode" option is the best way to go as it requires a simple API call to display the banner.

    Coming back to the "Invocationcode" Web form: here you'll notice that there are some parameters for which you need to provide values. The first is "Target frame" - set it to "_self" if you wish to display the target website in the same browser (not advisable) or "_blank" if you wish to open a new window (advisable).

    Next, you have a set of radio buttons that allow you to set flags for various parameters, which control the banner(s) to be displayed for the current zone on the website. The parameters are pretty self-explanatory and I suggest that you leave them at their default values.

    Click on the "Generate" button to generate the code snippet that you have to insert in the PHP scripts that drive your website. Take a peek at the following code listing that integrates the code snippet in a sample PHP script (say "index.php"):

    <HTML>
    <HEAD>
     <TITLE>My Site</TITLE>
     <BASEFONT face="Arial">
    </HEAD>
    <BODY>
    <TABLE width="100%" border="2" cellpadding="10" cellspacing="0">
     <TR>
      <TD width="25%">
       LOGO
      </TD>
      <TD align="center" valign="middle">

      <?php
           if (@include(getenv('DOCUMENT_ROOT').'mysite/phpads/phpadsnew.inc.php')) {
               if (!isset($phpAds_context)) $phpAds_context = array();
               $phpAds_raw = view_raw ('zone:2', 0, '', '', '0', $phpAds_context);
               echo $phpAds_raw['html'];
           }
      ?>


      </TD> 
     </TR>
     <TR height="80%"`>
      <TD align="center" valign="center" colspan="2">
       Content comes here
      </TD>
     </TR> 
    </TABLE>
    </BODY>
    </HTML>

    Load this example in your browser to view the following output:

     

    As you can see, this was pretty easy - just a simple cut-copy-paste operation was all that was required to integrate the two together. Yes, there is a lot more to the code snippet listed above, but I'll leave the gory details for later.

    For the moment, you can bask in the glory of having successfully integrated this powerful banner management software with your website and laugh your way to the bank, when the dollars (from your paying advertisers) start rolling in!

    More Administration Articles
    More By Harish Kamath


       · Nice article, I really liked it - please keep it up!
       · Thanks for the article. Its upto the point and easy to understand. Will be reading...
     

       

    ADMINISTRATION ARTICLES

    - Configuring Load-Balanced Clusters
    - Load-Balanced Clusters
    - UNIX Time Format Demystified
    - Making Changes in the CVS
    - Building Your First CVS Repository
    - CVS Quickstart Guide
    - Authorizing Users in Samba
    - Handling User Accounts in Samba
    - Authentication in Samba
    - Accounts, Authentication, and Authorization
    - Advanced Concepts on Dealing with Files and ...
    - Dealing with Files and Filesystems
    - More Hacks for the User Environment in BSD
    - Personalizing the User Environment in BSD
    - Customizing the User Environment in BSD

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway