PHP
  Home arrow PHP arrow Page 2 - Implementing Ad Support Into Your Site With PHPAdsNew
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? 
Google.com  
PHP

Implementing Ad Support Into Your Site With PHPAdsNew
By: Mitchell Harper
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 10
    2004-04-15


    Table of Contents:
  • Implementing Ad Support Into Your Site With PHPAdsNew
  • What is PhpAdsNew?
  • Using PhpAdsNew
  • Stats and banner rotations
  • Conclusion

  • 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


    Implementing Ad Support Into Your Site With PHPAdsNew - What is PhpAdsNew?
    ( Page 2 of 5 )

    In my opinion, it is the best ad management system on the Internet. I am a little bias however, because I love open source software, so here's the "official" description, as seen on the PhpAdsNew page:

    "phpAdsNew is a banner management and tracking system written in PHP. Currently it can manage multiple banners (any size) per advertiser, view daily, overall and summary statistics and send statistics to advertisers via email."

    I think that description pretty much says it all. At the time of writing this article, PhpAdsNew was in mature development stage, was OS independent, and had a 99.8656% activity percentile on SourceForge, which means that it's one of SourceForge's most popular downloads... and with good reason! PhpAdsNew is maintained by a team of 9 developers from around the world.

    The current release of PhpAdsNew is version 2 beta 6.1, which you can download here. Grab either the tar (262k) or zip (378k) version, and extract it into a folder on your web server. By default, the folder will be called something like PhpAdsNew_2.61, but rename it to PhpAdsNew.

    Next off we need to configure the details of our database. Open the config.inc.php file in your PhpAdsNew directory and look for the following lines at the top of the file:

    /*********************************************************/
    /* Database configuration */
    /*********************************************************/

    // MySQL hostname
    $phpAds_hostname = "localhost";

    // MySQL username
    $phpAds_mysqluser = "mysqlusername";

    // MySQL password
    $phpAds_mysqlpassword = "mysqlpassword";

    // The database phpAdsNew lives in
    $phpAds_db = "phpads";


    You should change the variables shown above to match the details of your web server where MySQL is installed. For the $phpAds_db variable, a database with that name must exist on your MySQL server before PhpAdsNew will work, so fire up the MySQL console application and enter the following:

    create database phpads;
    exit;


    Next, find the administrator configuration section in config.inc.php and change the value of $phpAds_admin, which is the username we will use shortly to login to PhpAdsNew. You should also change $phpAds_admin_pw to a suitable password.

    Lastly, modify the variables under the phpAdsNew configuration section. Save config.inc.php and visit http://yourserver/phpadsnew in your web browser. Obviously, you need to replace "yourserver" in the web address above with either the name or IP address of the web server onto which you installed PhpAdsNew.

    Now that we've created our PhpAdsNew database, we need to import the table structures for it, which can be found in all.sql in PhpAdsNew's main directory. Jump onto your MySQL server and import the contents of all.sql, like this:

    mysql -uadmin -ppassword phpads < c:phpadsnewall.sql

    I've installed PhpAdsNew on my Windows 2000 server running Apache, so obviously if you're running Linux, then you'll need to change the path to all.sql. MySQL should respond with a blank line. If you get any errors, double check your login credentials as well as the name of your database and where you're telling MySQL to find all.sql.

    Now, load PhpAdsNew in your browser. I installed it locally on my web server, so I loaded up http://localhost/phpadsnew. Here's what it looked like:

    PhpAdsNew's login screen

    Enter the values for the user and password that you specified in the config.inc.php file and click on the login button. The PhpAdsNew stats screen will load:

    The PhpAdsNew stats screen

     
     
    >>> More PHP Articles          >>> More By Mitchell Harper
     

       

    PHP ARTICLES

    - Implementing Factory Methods in PHP 5
    - Merging a File Split for FTP Upload using PHP
    - Getting Data from Yahoo Site Explorer Inboun...
    - Method Chaining: Adding More Selecting Metho...
    - How to Split a File During an FTP Upload Usi...
    - Expanding a Custom CodeIgniter Library with ...
    - Using the Yahoo Site Explorer Inbound Links ...
    - Building a CodeIgniter Custom Library with M...
    - Building an E-mini Trading System Using PHP ...
    - Completing the MySQL Class with Method Chain...
    - 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





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek