In this second part of a three-part tutorial covering phpAdsNew, you will learn more about the features of the "Publishers" and "Advertisers" module, as well as a convenient way to integrate phpAdsNew with multiple websites, and more.
In the first part, I showed you how to display banners on your website using the "local" mode. This works well when you have installed phpAdsNew at a location relative to the root folder of your website. Needless to say, this doesn't work under our new set up!
Navigate to the "Zone overview" sub-section of phpAdsNew under the "Publishers & zones" section. Here youíll notice that there is a link titled "Invocationcode" for each zone in the listing.
Letís assume that you have two zones for a particular "publisher" (a.k.a. website), a horizontal "IAB Leader Board (728 x 90)" zone and a vertical "IAB Skyscraper (120 x 600)" zone.
Click on the link for each zone to view the following screen:
Next, click on the "Generate" button to generate the code snippet that you need to insert into your PHP scripts or HTML code. Take a peek at the following code listing that integrates the code snippet in a sample PHP script (say "index.php"):
Load this example in your browser to view the following output:
As you can see, this was pretty easy; a simple cut-copy-paste operation was all that was required to integrate the banners with your website. Furthermore, you do not need to worry about some complex PHP code, as was the case with the "local" mode of invocation.
In the concluding part, I promise, I will throw light on the less attractive - but more important - "Statistics" and "Reports" sections of the tool. I will also show you how to reconfigure phpAdsNew from the "Settings" section.
Till then, stay healthy!
Note: All examples in this article have been tested on Linux/i586 with Apache 1.3.12, MySQL 3.23 and PHP 4.3.1. Examples are illustrative only, and are not meant for a production environment. YMMV!