One easy way to manage the display ads on your website is by using phpAdsNew. This first article shows you how to quickly set up phpAdsNew to suit your needs. Read on to find out how this simple tool can help you keep track of those revenue-producing ads and advertisers.
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"):
</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!