5
I have a little doubt in a project that I’m developing.
Here’s the thing, I have two buttons on the page, like these ( identical at different positions ):
Top of the page:
<a target="_blank" class="btn-primary" href="http://localhost/exemplo/"> Clique Aqui </a>
End of page:
<a target="_blank" class="btn-primary" href="http://localhost/exemplo/"> Clique Aqui </a>
I need to make sure that each time the page containing these buttons is accessed, increase the number in the folder. Example:
A person accessed this page the first time: ( Note that the link contains /01/ )
http://localhost/exemplo/01/
When a another person accesses for the second time: ( Note that the link contains /02/ )
http://localhost/exemplo/02/
And so consecutively: (/03/, /04/, /05/, /06/, etc....)
Each new access increases the value on the link, increasing.
Also, is it possible to implement something that can tell me what number it is at the moment? I have no idea, maybe something like a file that is updated (txt maybe), telling me which number you stopped at.
I can show you a way to do it, it’s simple. But if possible, explain the reason for it. It doesn’t sound good to me. Before judging or even posting an answer, I would like to understand why.
– Daniel Omine
I updated the question so there’d be no misunderstandings.
– Alexandre Lopes
I didn’t understand the correlation of this with these numbers. It got more confused.
– Daniel Omine
You are from Maranhão?
– Sampaio Leal
I am a friend @Sampaio Leal
– Alexandre Lopes
Sorry @Daniel Omine but it wasn’t that "answer" I expected from you. I hope other users can answer this question.
– Alexandre Lopes
I will try to edit this question in a more "community" way as you say.
– Alexandre Lopes
Now let’s make the question cleaner by deleting these comments. :)
– Alexandre Lopes
your idea is to know how many people accessed the page?
– Sr. André Baill
This would be just a friendly add-on @André Baill, the main thing is that at each access, increase that little number after the folder "/example/ to each new access. : ) It turns out that I would like to know which number stopped at, because then I would not need to access the page, and be +1 of those who accessed.
– Alexandre Lopes
Make a file and write to txt, then each time, recovers what has +1
– Sr. André Baill
I edited my comment :) You could make a reply?
– Alexandre Lopes
Do you use any development framework or
php
pure?– Kenny Rafael
Pure PHP friend use @Kenny Rafael :D
– Alexandre Lopes
In that case it takes more work...
– Kenny Rafael
You will have to create a route in . htaccess and save one
JSON
with the countdown to keep updating, I can’t develop any code now to help, but the way is this...– Kenny Rafael
I see something so simple. It makes of accounts that it is an HTML page in which has this button that has a link that needs to be changed with each new access, as I put in the question :)
– Alexandre Lopes
Please avoid long discussions in the comments; your talk was moved to the chat
– Maniero