I am having a little problem setting something up.
Lets suppose i have this simple page:
<html>
<body>
<?php echo "hello"; ?>
</body>
</html>
And in my database, i have a table with a visitors counter, which is zeroed now.
What i want to do is, to show this Hello message only for some visitors, more exactly using a rule like:
Show for 5 persons, and skip 3 persons, then show for the next 5, and skip the next 3 again…
And keep going this way.
Sorry for the dumbness but i think i could do something with multiple numbers, i’m just having problems setting up the if, foreach, etc…
Well, if someone could help me, i will be really glad.
Thanks in advance.
Ok, seams you start learning, so I will give you a hint in pseudo php code what you can do:
Than you need to use a database like mySQL or SQLite to store the value.
And you should care about that if a user refreshes the page this does not count again using a cookie or storing the clients IP.