I have the following link:
<a target='_blank' class='btn-primary' href='exemplo/1/'> Clique Aqui </a>
I need every time the page containing this link is accessed by a different visitor ( IP ), change the link number.
I think it would be interesting to create a
.txt
file containing the numbers of each IP and the number that each IP will be responsible for.
Example ( numbers.txt ):
123.456.789.00 - 1
321.543.765.99 - 2
543.210.456.22 - 3
435.647.533.33 - 4
And so on ...
I need to be verified if the IP of the visitor is already in this list, if it is it takes the number that is responsible for this IP and places the link, if it is not, then the new IP is added in the list and added the number that it will be responsible and then placed on the link, thus:
Example: Visitor has an IP 321.543.765.99
that was responsible for the number 2
.
Then you will see:
<a target='_blank' class='btn-primary' href='exemplo/2/'> Clique Aqui </a>
Is it possible to do this? How?