PHP
  Home arrow PHP arrow Page 2 - Commercial Break (A phpAds 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? 
Google.com  
PHP

Commercial Break (A phpAds Primer)
By: Harish Kamath, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 1
    2002-07-30


    Table of Contents:
  • Commercial Break (A phpAds Primer)
  • Getting Started
  • The Toy Store
  • Different Strokes
  • Room With A View()
  • The Advanced Course
  • Access Denied
  • The Number Game
  • Endgame

  • 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


    Commercial Break (A phpAds Primer) - Getting Started
    ( Page 2 of 9 )

    Let's start with the basics - what the heck is phpAds, anyhow?

    phpAds, in the words of its author, is "a banner management and tracking system" for Web sites. It allows Web administrators to manage advertisers and advertiser banners on a Web sites, display them in a random or pre-defined arrangement, and deliver reports based on user impressions per banner. It's also pretty popular, and quite a few Web sites use it to manage their online advertising activities.

    The first thing is to make sure that you have everything you need for a successful installation of phpAds. Typically, you'll need a PHP-compliant Web server (I'm using Apache), and a MySQL database server. Most Web hosting providers already offer these three components; however, in case yours doesn't, you can get Apache from http://www.apache.org, PHP from http://www.php.net and MySQL from http://www.mysql.com.

    Once you've got all three packages configured and installed, download a copy of phpAds from the official Web site at http://www.phpwizard.net/, and uncompress it to a location under your server root.

    $ tar -xzvf phpAds_1.4.0.tar.gz
    Next, create a MySQL database to store all the application information. Drop to a command prompt, and start up the MySQL client.

    $ mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 7311 to server version: 3.23.39 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql>
    Create a new database for the application (I've called mine "phpads").

    mysql> CREATE DATABASE phpads;
    With the database created, it's time to set up all the required tables. This isn't as hard as it sounds - the phpAds distribution comes with a single SQL file, "all.sql", which contains all the SQL commands needed to set up the application's database tables. All you need to do is execute these commands via the MySQL's server's client program.

    $ mysql -D phpads -u root -p < /usr/local/apache/htdocs/phpAds/all.sql
    Once the tables have been created, you need to set some configuration parameters so that the application knows where to find the database. Locate the "config.inc.php3" file in the application directory, pop it open it in your favourite text editor and modify the following parameters:

    // MySQL hostname $phpAds_hostname = "localhost"; // MySQL username $phpAds_mysqluser = "root"; // MySQL password $phpAds_mysqlpassword = ""; // The database phpAds lives in $phpAds_db = "phpads"; // phpAds' database tables $phpAds_tbl_adclicks = "adclicks"; $phpAds_tbl_adviews = "adviews"; $phpAds_tbl_banners = "banners"; $phpAds_tbl_clients = "clients"; $phpAds_tbl_session = "session"; $phpAds_tbl_acls = "acls"; // The URL to your phpAds-installation $phpAds_url_prefix = "http://www.melonfire.com/phpAds";
    Most of these parameters are self-explanatory - the database name, username and password, and the URL of the location the application is installed to. Once you've made the necessary changes, save the file, and attempt to access the application URL through your browser. If phpAds has been successfully installed and configured, you should see something like this:



    Aaaaaand you're done! Flip the page to find out how you can begin using the application.

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

       

    PHP ARTICLES

    - Adding Ordering and Grouping Clauses to the ...
    - 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...





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