Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Ad rotate PHP code how ?
Old 11-05-2010, 09:51 PM Ad rotate PHP code how ?
Experienced Talker

Posts: 38
Name: EarnGate
Trades: 0
Hello,
we have site, will add my ad code and users do also
but we need control percentage of ads impression, ex:

my ad code =" adsense code"
my ad code imp ="25%"

user ad code =" affilate code"
user ad code imp ="75%"

how we can do it with small and simple PHP code ?
earngate is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-05-2010, 10:44 PM Re: Ad rotate PHP code how ?
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
PHP Code:
$rand rand(1100);
if(
$rand <= 25)
{
     
//your ad
}
else
{
     
//their ad

__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is online now
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 11-06-2010, 11:19 AM Re: Ad rotate PHP code how ?
Physicsguy's Avatar
404 - Title not found

Posts: 920
Name: Scott Kaye
Location: Ontario
Trades: 0
I suppose you could use the PHP GD image library to change the text on the image...
__________________
Check out my
Please login or register to view this content. Registration is FREE
or my
Please login or register to view this content. Registration is FREE
!
Physicsguy is offline
Reply With Quote
View Public Profile
 
Old 11-22-2010, 04:24 PM Re: Ad rotate PHP code how ?
Experienced Talker

Posts: 38
Name: EarnGate
Trades: 0
thanks for help
__________________

Please login or register to view this content. Registration is FREE



Please login or register to view this content. Registration is FREE
earngate is offline
Reply With Quote
View Public Profile
 
Old 11-22-2010, 05:33 PM Re: Ad rotate PHP code how ?
Novice Talker

Posts: 11
Name: Grigoriy Sidelnikov
Location: San Francisco, CA
Trades: 0
Also note that when you do this, you probably confuse Google about what ads are shown on your page. Every time an ad is displayed on a web page, it is trained to be used specifically with the content on that page.

This is something you won't find information on the Internet about, or how exactly Google treats deliberate randomization of ads on your site, but it is certain that even changing ad format of 1 ad placed in one place on your site can change the way their algorithm decides what to show in that ad. Especially when there are other ads in different formats, or different order in your source code, present on the same page.

It's a theory that has a high % likelihood to be true. Just something to be aware of. They do keep an eye on things like that because even something as little as 0.5% increase in how often their ads are clicked can mean 1 million more in annual earnings.
__________________

Please login or register to view this content. Registration is FREE
Teaches you to make Google-safe websites and use your knowledge, your brain's inherent ability to reason, and creative-writing talent to produce great content that people will remember and want to return to over and over again.

Last edited by Greg Sidelnikov; 11-22-2010 at 05:37 PM..
Greg Sidelnikov is offline
Reply With Quote
View Public Profile Visit Greg Sidelnikov's homepage!
 
Reply     « Reply to Ad rotate PHP code how ?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.15053 seconds with 12 queries