phpAds is a banner management and tracking system written in
PHP.
Homepage: http://phpwizard.net/phpAds/
General Information
Please read the INSTALL file for installation instructions.
phpAds is split into three parts:
- An administration interface, accessible through http://<yourdomain>/<PathToPhpAds>/admin/
- A web interface for your clients, accessible through http://<yourdomain>/<PathToPhpAds>/client/
- A backend, which handles banner display and logging and sends
statistics to your clients via email
The Admin Interface
Through this web based control center, you can manage your clients
and their banners. It also allows to view statistics for individual
clients.
The Client Interface
Usually, you'll give the URL of the client interface to your clients
so that they can track the adviews/adclicks of their banners. As
you can associate a username/password with each client, a client
is only able to view information belonging to her banners.
The Backend
As an adminstrator you need to familiarize yourself with phpAds'
backend structure. phpAds gives you two options to include a banner
on your site: local mode and remote invocation. It is recommended
to use the first method where possible.
Local Mode
This is the tradtional style of a including a banner within a PHP3-powered
website. On every page you want to have a banner, you have to include
config.inc.php3 and view.inc.php3. These files are in your phpAds-installation-directory
(which should be in your include_path). Banner are displayed using
the view()-function. This function has the following syntax:
string view (mixed what [, int clientID [, string target [, bool
withText = 0]]]);
- The argument "what" is currently one of the
following:
- [int]: Display the banner with this bannerID. Example:
view(1);
- "[width]x[height]: Display a randomly selected banner
with this width/height. Example: view("468x60");
- "html": Display a randomly selected HTML-banner
- "[keyword]": Display a randomly selected banner
with this keyword associated to it. Example: view("maingroup");
Note: Banners with the special keyword "global"
associated to them, are also considered when using this syntax.
- The optional argument clientID allows you to retrieve
only banners by a specific client. Specify "" to view
banners from all clients (in case you need the third or fourth
argument, else don't specify it at all). Example: view("468x60",
1).
- The optional argument "target" allows you to
specify a frame target (may be one of "[framename]",
"_blank", "_parent" and "_top").
Example: view("maingroup", 0, "_blank");
- The optional argument withText allows you to show a banner with
its associated line of text below it (for example, "Suport
our sponsor" is a common line of text). Example: view("maingroup",
"", "", 1);
Some examples:
- view(1); - Displays the banner with the bannerID of 1.
- view("html"); - Displays a randomly selected HTML
banner
- view("468x60", 0, "_blank");
- Displays a randomly selected banner with a width of 468 pixels
and a height of 60 pixels. If user clicks on it, the target destination
will be opened in a new window.
- view("Websites/Business/New_Media/"); - Displays a
randomly selected banner from the group "Websites/Business/New_Media/"
(in other words: with that keyword).
A sample HTML file could look like this:
<?
require("/usr/local/etc/phpAds/config.inc.php3");
require("/usr/local/etc/phpAds/view.inc.php3");
?>
<html>
<head>
<title>phpAds demo</title>
</head>
<body>
<?
view("468x60");
?>
</body>
</html>
Remote Invocation
It is also possible to use phpAds on sites which lack PHP3-support.
Random or pre-defined banners can be shown using a standard <img>-construct.
Just like in Local Mode, you can use the "what" argument
to select the banner. It wouldn't make sense to use "html" though.
Examples:
- <a href="click.php3"><img src="phpads.php3?what=468x60"></a>
- Show a randomly selected banner of the size 468x60.
- <a href="click.php3"><img src="phpads.php3?what=main"></a>
- Show a randomly selected banner fro the "main" group.
Remote Invocation currently supports only one banner per page.
The mail.php3 File
This file is responsible for sending statistics to your clients
(via email) and for disabling banners which have no adviews left.
You should execute it daily, for example from Cron. For more instructions,
please refer to INSTALL.
|