Re: [PHP] AdRotator for PHP?

2002-07-04 Thread Liam Gibbs

> I'm wondering if anyone has found or ended up
> writing something similar to
> the MSWC AdRotator object in ASP, but for PHP?  Or
> is there already a module
> on apache.org that I missed?

(Figre I should pull my weight on this list here.)

Hmm. Not sure exactly what MSWC AdRotator is, but
here's one I developed. Is it what you want? It checks
a specific directory and grabs a random file from that
directory, then displays it.

if($file = GetRandomPicture($BannerAdsDirectory)) {
$seriescode = substr($file, 0, 2);
print("   \n");
}

function GetRandomPicture($sourcedirectory) {
if($directory = @opendir($sourcedirectory)) {
while($file = @readdir($directory)) {
if(($file != ".") && ($file != ".."))
$files[count($files)] = $file;
}
$randomfile = rand(0, count($files) - 1);
$returnvalue = $files[$randomfile];
} else {
$returnvalue = NULL;
}

return $returnvalue;
}

If anyone can improve on it, let me know. Thanks to
the two guys who posted the links, though. I'll be
sure to check them out once I get a couple of minutes
of free time.

Liam

__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] AdRotator for PHP?

2002-07-04 Thread Latex Master

Hello Patrick,
  Try to look at hotscripts.com there are lots of scripts there.
  Personally i prefer to write ones by myself.
Thursday, July 4, 2002, 3:31:20 PM, you wrote:

PT> Hey,

PT> I'm wondering if anyone has found or ended up writing something similar to
PT> the MSWC AdRotator object in ASP, but for PHP?  Or is there already a module
PT> on apache.org that I missed?

PT> Thanks for any help :)

PT> Patrick






-- 
Best regards,
 Latexmailto:[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] AdRotator for PHP?

2002-07-04 Thread joakim . andersson

I'm pretty sure you'll find what you are looking for here:
http://www.hotscripts.com/PHP/Scripts_and_Programs/Ad_Management/

/Joakim

> -Original Message-
> From: Patrick Teague [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 04, 2002 1:31 PM
> To: PHP-General
> Subject: [PHP] AdRotator for PHP?
> 
> 
> Hey,
> 
> I'm wondering if anyone has found or ended up writing 
> something similar to
> the MSWC AdRotator object in ASP, but for PHP?  Or is there 
> already a module
> on apache.org that I missed?
> 
> Thanks for any help :)
> 
> Patrick
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] AdRotator for PHP?

2002-07-04 Thread Patrick Teague

Hey,

I'm wondering if anyone has found or ended up writing something similar to
the MSWC AdRotator object in ASP, but for PHP?  Or is there already a module
on apache.org that I missed?

Thanks for any help :)

Patrick



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php