Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2007-11-26, 09:47 AM   #1
Licker4U
Mean people suck, nice people swallow, are you mean or nice?
 
Licker4U's Avatar
 
Join Date: Sep 2003
Location: Lower Alabama-The Redneck Riviera
Posts: 2,376
Send a message via ICQ to Licker4U Send a message via AIM to Licker4U
php Ad Rotator

I've been using this ad rotator script for 6 months and it worked fine. Now I notice the ads don't appear at all. Any ideas why it would just quit all of a sudden?

<?php



// TEST MODE - SET TO on OR off
$test_mode = "off";



// RESET ADS
$ads = "";

// AND PICK AN AD

// COUNT ADS

$dirhandle = opendir("ads/");
while($filename = readdir($dirhandle)) {
if (ereg ("htm", $filename)) {
$ads[]=$filename;
}
}
closedir($dirhandle);

$number_of_ads = count($ads);

if($test_mode == "on") {
print("There are <B>$number_of_ads</B> ads in the ads folder<BR>");
}

// SET THE RANDOM SEED
mt_srand(doubleval(microtime()) * 100000000);

// PICK A RANDOM NUMBER
$random_number = mt_rand(1, $number_of_ads);

if($test_mode == "on") {
print("I am going to show advert <B>$random_number</B> of <B>$number_of_ads</B><BR><BR>");
}

$array_number = $random_number -1;

include("ads/$ads[$array_number]");

?>
__________________
Submit to Girls That Squirt , Hairy Pussy Links and Best Wet Pussy
Licker4U is offline   Reply With Quote
Old 2007-11-26, 11:47 AM   #2
N J
Trying is the first step towards failure
 
Join Date: Oct 2004
Posts: 128
server setting seems most likely if you didn't change anything - sure php is allowed? Or even if html is executed as php if you sites are .htm(l)?

I'm no programmer, so best advice is to ask your host to check the logs.
N J is offline   Reply With Quote
Old 2007-11-26, 11:58 AM   #3
shunga
Operator! Give me the number for 911!
 
Join Date: Dec 2005
Location: Loveland
Posts: 131
Send a message via ICQ to shunga
With test mode on what's the output?
__________________

Got an Asian site?
ICQ: 355-26-288
shunga is offline   Reply With Quote
Old 2007-11-26, 12:34 PM   #4
Licker4U
Mean people suck, nice people swallow, are you mean or nice?
 
Licker4U's Avatar
 
Join Date: Sep 2003
Location: Lower Alabama-The Redneck Riviera
Posts: 2,376
Send a message via ICQ to Licker4U Send a message via AIM to Licker4U
Quote:
Originally Posted by N J View Post
server setting seems most likely if you didn't change anything - sure php is allowed? Or even if html is executed as php if you sites are .htm(l)?

I'm no programmer, so best advice is to ask your host to check the logs.
I was thinking it was a server issue and sent a trouble ticket to my host. Just can't believe they would change something to make the script stop after six months.

Quote:
Originally Posted by shunga View Post
With test mode on what's the output?
Nothing. I think that is a test so potential users can see how it works
__________________
Submit to Girls That Squirt , Hairy Pussy Links and Best Wet Pussy
Licker4U is offline   Reply With Quote
Old 2007-11-26, 01:43 PM   #5
shunga
Operator! Give me the number for 911!
 
Join Date: Dec 2005
Location: Loveland
Posts: 131
Send a message via ICQ to shunga
if($test_mode == "on") {
print("There are <B>$number_of_ads</B> ads in the ads folder<BR>");
}

I'm wondering what that outputs. Offhand either it can't find the ads, or it can't display them. If that test output comes back with $number_of_ads greater than 0 then the problem is narrowed down.
__________________

Got an Asian site?
ICQ: 355-26-288
shunga is offline   Reply With Quote
Old 2007-11-26, 02:22 PM   #6
Licker4U
Mean people suck, nice people swallow, are you mean or nice?
 
Licker4U's Avatar
 
Join Date: Sep 2003
Location: Lower Alabama-The Redneck Riviera
Posts: 2,376
Send a message via ICQ to Licker4U Send a message via AIM to Licker4U
I think the tech at my host is getting things fixed. Don't know what he's doing but "rotator1" is working on the index page but "rotator2" isn't working on the main page. He's on top of it.
__________________
Submit to Girls That Squirt , Hairy Pussy Links and Best Wet Pussy
Licker4U is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:53 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc