Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Hey,
I just upgraded and I was running a PHP banner rotation in the footer include on my site.
Since upgrading, it no logner displays the banner ads.. just the coding. Has this been disabled in version 6... it worked fine in 5.5.1. Work arounds?

-----Here's my footer file----

<p align = center>
<?
/*


PLEASE KEEP THE CREDITS INTACT WHEN DISTRIBUTING THIS SCRIPT
USE AT YOUR OWN RISK WITH NO SUPPORT OR GUARANTEES
USE IT FOR PUBLIC, PRIVATE, PROFIT AT NO CHARGE

AD_ROTATOR IN PHP3
BY: MARK DONCHEK
E: [][email protected][/]
W: www.MARKDONLINE.COM

This script is ideal for rotating a few ads on a small site without comittiing to an elaborate
database system. Since each ad is stored in its own include file,
it can contain HTML, quotes, semicolons, etc which may throw other scripts off.


1. Simply cut and paste all of this code in a php doc where you want your ad to appear.
2. create an include file for each ad.
3. copy all necessary code for the ad into its respective include.
4. change the var $randomnumber to accomodate the number of ads you have.
where 'x' = one less than the number of ads you have:
*/

srand((double)microtime()*1000000);
$randomnumber = rand(0,20); // change the second number if need be (see number 4 above)

/*
5. change "your_path/any_ad.inc" for each ad you have
6. alter the number of elseifs to accomodate the number of includes if necessary (ads).
*/



$include0 = "/home/measurection/htdocs/banners/ad0.inc";
$include1 = "/home/measurection/htdocs/banners/ad1.inc";
$include2 = "/home/measurection/htdocs/banners/ad2.inc";
$include3 = "/home/measurection/htdocs/banners/ad3.inc";
$include4 = "/home/measurection/htdocs/banners/ad4.inc";
$include5 = "/home/measurection/htdocs/banners/ad5.inc";
$include6 = "/home/measurection/htdocs/banners/ad6.inc";
$include7 = "/home/measurection/htdocs/banners/ad7.inc";
$include8 = "/home/measurection/htdocs/banners/ad8.inc";
$include9 = "/home/measurection/htdocs/banners/ad9.inc";
$include10 = "/home/measurection/htdocs/banners/ad10.inc";
$include11 = "/home/measurection/htdocs/banners/ad11.inc";
$include12 = "/home/measurection/htdocs/banners/ad12.inc";
$include13 = "/home/measurection/htdocs/banners/ad13.inc";
$include14 = "/home/measurection/htdocs/banners/ad14.inc";
$include15 = "/home/measurection/htdocs/banners/ad15.inc";
$include16 = "/home/measurection/htdocs/banners/ad16.inc";
$include17 = "/home/measurection/htdocs/banners/ad17.inc";
$include18 = "/home/measurection/htdocs/banners/ad18.inc";
$include19 = "/home/measurection/htdocs/banners/ad19.inc";
$include20 = "/home/measurection/htdocs/banners/ad20.inc";

if ($randomnumber== "0") {
include ("$include0");

} else if ($randomnumber== "1") {
include("$include1");

} else if ($randomnumber== "2") {
include("$include2");

} else if ($randomnumber== "3") {
include("$include3");

} else if ($randomnumber== "4") {
include("$include4");

} else if ($randomnumber== "5") {
include("$include5");

} else if ($randomnumber== "6") {
include("$include6");

} else if ($randomnumber== "7") {
include("$include7");

} else if ($randomnumber== "8") {
include("$include8");

} else if ($randomnumber== "9") {
include("$include9");

} else if ($randomnumber== "10") {
include("$include10");

} else if ($randomnumber== "11") {
include("$include11");

} else if ($randomnumber== "12") {
include("$include12");

} else if ($randomnumber== "13") {
include("$include13");

} else if ($randomnumber== "14") {
include("$include14");

} else if ($randomnumber== "15") {
include("$include15");

} else if ($randomnumber== "16") {
include("$include16");

} else if ($randomnumber== "17") {
include("$include17");

} else if ($randomnumber== "18") {
include("$include18");

} else if ($randomnumber== "19") {
include("$include19");

} else if ($randomnumber== "20") {
include("$include20");

} else {

echo ("ERROR: A random num is being generated out of range, or not at all ");
}
?>

Sponsored Links
Entire Thread
Subject Posted By Posted
6.0.1 - PHP Disabled in the footer file? JoshPet 06/15/2002 8:57 AM
Re: 6.0.1 - PHP Disabled in the footer file? Rick 06/15/2002 7:20 PM
Re: 6.0.1 - PHP Disabled in the footer file? JoshPet 06/15/2002 7:59 PM
Re: 6.0.1 - PHP Disabled in the footer file? so01 06/19/2002 8:39 AM
Re: 6.0.1 - PHP Disabled in the footer file? Rick 06/19/2002 3:11 PM
Re: 6.0.1 - PHP Disabled in the footer file? so01 06/20/2002 12:07 PM
Re: 6.0.1 - PHP Disabled in the footer file? Rick 06/20/2002 3:01 PM
Re: 6.0.1 - PHP Disabled in the footer file? Wando 06/22/2002 2:25 PM
Re: 6.0.1 - PHP Disabled in the footer file? Wando 06/25/2002 3:07 PM
Re: 6.0.1 - PHP Disabled in the footer file? Astaran 06/25/2002 3:28 PM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)