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  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Moblin 
JMSL Numerical Library 
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? 
PHP

Commercial Break (A phpAds Primer)
By: Harish Kamath, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 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:
      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


    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

    - Validating Web Forms with the Code Igniter P...
    - Output Buffering
    - Paginating Database Records with the Code Ig...
    - HTTP Headers in Web Development
    - Project Management: Administration
    - Building a Database-Driven Application with ...
    - User Authentication for a Project Management...
    - Introduction to the CodeIgniter PHP Framework
    - Adding Users for a Project Management Applic...
    - Migrating Class Code for a MIME Email to PHP...
    - Login and Logout Authentication for a Projec...
    - Composing Messages in HTML for MIME Email wi...
    - Project Management: Authentication
    - A Better Way to Determine MIME Types for MIM...
    - Project Management Overview





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