| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| Account Closed | Rotator Hi, i was thinking of getting a script that can rotate banner ads i dont really want to use javascript bu they are the only scripts i can find im also pretty new to php so i dont mind giving it a try but if anything i prefer css (if its possible) or html (for simplicity) also if anyone knows of a fairly basic rotator script that has something built in where i can check my clickthrough and impression rates (this is incase im feeling brave )Cheers Tony |
| |
| | #4 (permalink) |
| Senior Member | your assuming he has cpanel Caveman this is not the only control panel people use
__________________ Manage your portfolio using my new Domain Portfolio Management script. Securing Your Domain Name From Theft |
| |
| | #6 (permalink) | |
| Forum Moderator Forum Moderator | Quote:
Many an option for cPanel. -Allan
__________________ I resolve to try to be more noob-friendly. | |
| |
| | #7 (permalink) | |
| NamePros Expert | Quote:
__________________ |www.vb-skins.com|- Quality Premade Vbulletin skins for Your VB forum makeover |www.Banjir.com|-Free image hosting?[B]For Sale!|AlphaScripts|Money Generating Scripts FREE VB Skins | |
| |
| | #8 (permalink) |
| Account Closed | ive got a script now Code: <!--
Created by Paul Janaway
Site: http://maddogsplace.co.uk
-->
<?php
///////////
// SETUP //
///////////
// State how many ads there are in total (max: 3)
$total_ads = 1;
// No need to edit
$rand_ban = rand(1,$total_ads);
// Banner size
$banner_width = 468;
$banner_height = 60;
// Decide on if you want it to create a new window or not when
// the ad is clicked.
// 1 = new window
// 2 = same window
$window = 1;
// Ad details, goes by: image url, site url, site description.
// If you have 1 ad, then fill in ad_1 only, if you have 2 ads
// then fill in ad_1 and ad_2 etc.
$ad_1 = array("http://maddogsplace.co.uk/includes/images/mdp_468x60.png",
"http://maddogsplace.co.uk",
"maddogsplace.co.uk | Home Is Where The Heart Is");
$ad_2 = array("image url here",
"site url here",
"site description here");
$ad_3 = array("image url here",
"site url here",
"site description here");
///////////////////////////////////////////////
// DO NOT EDIT BELOW UNLESS YOU KNOW HOW TOO //
///////////////////////////////////////////////
if($rand_ban == 1) {
$show_ad_image_url = $ad_1[0];
$show_ad_url = $ad_1[1];
$show_ad_description = $ad_1[2];
} elseif($rand_ban == 2) {
$show_ad_image_url = $ad_2[0];
$show_ad_url = $ad_2[1];
$show_ad_description = $ad_2[2];
} elseif($rand_ban == 3) {
$show_ad_image_url = $ad_3[0];
$show_ad_url = $ad_3[1];
$show_ad_description = $ad_3[2];
}
if($window == 1) {
echo "<a href=\"" . $show_ad_url . "\" target=\"_blank\">";
echo "<img src=\"" . $show_ad_image_url . "\" width=\"";
echo $banner_width . "\" height=\"" . $banner_height . "\" ";
echo "border=\"0\" alt=\"" . $show_ad_description ."\"></a>";
} else {
echo "<a href=\"" . $show_ad_url . "\"><img src=\"";
echo $show_ad_image_url . "\" width=\"" . $banner_width . "\" ";
echo "height=\"" . $banner_height . "\" border=\"0\" alt=\"";
echo $show_ad_description ."\"></a>";
}
|
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |