![]() |
Adrotator
Hello all,
Can someone tell me how to use an adrotator in php. In asp you can use <asp:adrotator:............................. /> I need to do the same in php. Please help. Thanks all. |
Re: Adrotator
You could make one very easily yourself. In fact, it's already been done. http://www.phpbuddy.com/article.php?id=4
If it doesn't fit your needs, just modify/extend it. Or search "php adrotater" on Google. |
Re: Adrotator
Thanks alot Sane.
I have tried but for some reasons its not working. |
Re: Adrotator
Could you post the code? What exactly is the problem?
|
Re: Adrotator
Thanks Sane. I think the code is okey. I tested it in a different page and it works okey. The thing is i'm trying to use it in a templated website and that is where its not working. I think i have to create another function to handle this. I honestly don't know how to do it but im still trying to look for ways. Im not an expert in PHP but just started to learn it a month ago.
|
Re: Adrotator
You could wrap the code I linked to, into a function, and save it as a separate PHP script.
adrotater.php :
Place the above file, adrotater.php, in the same directory as your other scripts. This would allow you to use the function, in your main PHP file, like so: index.php :
Make sure to include the adrotater.php file in every file you want to use the adrotater function. Then the argument passed to it, 'banner_ads.txt', is the text file with the advertisements inside. |
Re: Adrotator
Does PHP's
rand function return numbers uniformly? If it doesn't, it's probably a poor choice for this sort of thing.As an aside, it's spelt "rotator." No offence, Sane. ;) |
Re: Adrotator
It would return it uniformly enough. Anything random would be good enough for an adrotator.
And wow, I had no clue I was spelling that incorrectly. Thanks for the correction. :$ |
Re: Adrotator
Ooble
Any alternatives. |
Re: Adrotator
Sane
Im still trying to figure this out. I have to incorperate the function in other functions list where it will be called from. |
| All times are GMT -5. The time now is 2:17 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC