Hope you did not forget me! i am the one from question :
I was talking about a strange script that i saw.... which prints a number dinamically and randomly into the screen, as soon as executed!
This is interesting because it will make some visitors, feel that my site has alot of visitors.
As soon as the visitors come in, he/she finds a statement in the page that says something like: there are 34 visitors on this site right now.
and if he reload he will find another number (as if there are people coming in or out) and so on. I belive that this should be done by a cgi script NOT java, for many reasons: java code will be seen by the visitors if they view the source, but not the .cgi file! also Java is embedded into the page which will make it heavier, where the cgi is NOT actually inside the page, it is just executed somewhere.
But, they did that script in such a "dump" way... the script says 5 visitors, and if i reload within 2 seconds it says 512 visitors , then reload, then 37 visitors, then 419 then 600 then 701 then 41
Which does not make sense... I am SURE that they are not getting these kind of dynamic traffic in their whole life :) i would die to remember that site again, thought i bookmarked it ... but i didn't :(
Anyway, your code:
$random = int( rand( $upper-$lower+1 ) ) + $lower;
Is a VERY good start, but as we agreed it needs some work to "neutralize" the operation .... i.e. make it look normal.
I need your opinion about how can we do this? your thoughts are VERY important for me.
Here are some ideas that surly needs to be refined:
1) We can set several groups of numbers..... each group contains a few numbers ....the script will randomly select a group.... then randomly select a number from inside that group.... then STICKS to the numbers in the selected group ONLY as much reloads it will only display random numbers form the originally selected group!
so group A "12,13,14,15,16,17,18"
group B "215,216,217,218,219,220" and so on..... each group represents an assumed amounts of trafic and load.
Also, instead of selecting the "group" randomly, it can depend on the users clock ... if the time is between 00:00 and 04:00 group number XX will be chosen then , numbers inside it will be randomly displayed...
2) The random number can be "calculated" based on the user's clock! if it says 11:38 , we can take the 38 (the mutinies) and add/deduct (randomly) some other numbers .... or multiply by 1.1 so the new number become 42 then when reload (within a minute) no change will be viewed, but when reloading after a minute , the new number will be another number (cuz, of the change of the user's minutes!)
3)I need some innovated ideas from you! :-)