NameSilo

Php problem! Please help!

SpaceshipSpaceship
NamecheapNamecheap
Namecheap AuctionsNamecheap Auctions
Watch

domain4u

We Buy We SellVIP Member
Impact
125
Hi

I want to make 1 banner appear on my site 50% of the time, the rest to appear RANDOMLY!

Anyone help me with this scrip in php please ?

Thanks.
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
I'd do a simple rand() function imo..

Like making it rand(1, 100) and if the random number is above 50 then show the banner you want to show most, else show the all different random banners..
 
0
Close
i dont want to use the random function for the main banner, what i am looking is SHOW banner 1 50 % , Then show rest Randomly other 50% . There must be a way to do that!!??!
 
0
Close
domain4u said:
i dont want to use the random function for the main banner, what i am looking is SHOW banner 1 50 % , Then show rest Randomly other 50% . There must be a way to do that!!??!

he just told you how

think about the rand function, then incorporate into your code.
 
0
Close
You will get to do it using the rand function... like I said if the random number is over 50 then display the banner, else display any other banner.. if you make the rand(1, 100) then the main banner has a 50% chance of coming out.. ;)
 
0
Close
Working thanks.
 
0
Close
AIVikingsAIVikings

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

New: watch any domain
You can now watch domains on NamePros. We check each one and notify you when something changes. Search for a domain and press Watch on...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back