开发者

how i can make the Revenue Sharing system by php

How can I show something on 75% of requests, so that on average, every four page requests would result in three pages showing it, and one开发者_C百科 not.

this is a translation of this question!...

i dont know how it working with 70%

now how i can show in example echo iam; in a page in 70% percent

this mean it will appear 3 times and one not


The only fool proof way I can think to do this is:

if (($pageHits % 10) < 7)
    echo 'iam';


I don't know whether I got you correctly but you can do this:

$i = rand(0,3);
if($i < 3) {
    echo 'foo';
}

This will echo foo in 75% of all visits.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜