Give a player points 1 time. |
Give a player points 1 time. |
FrostTaco |
May 14 2016, 11:09 PM
Post
#1
|
Member Group: Members Posts: 47 Joined: 26-April 16 Member No.: 24,193 |
Hi guys, today I was coding away with everything working until I noticed a problem. Players can refresh a link I give them to give them extra points. Basically, I have gleam.io giveaways, and one of the ways to enter is to use a link to my website, which allows you to gain 1, and only 1 point. However, if the user saves the link, they can just refresh the page and do anything and keep earning points. Points are stored in a file: useridcustom.json Of course, userid is replaced with the users id. How can I make a player use the link only once? Link example: corndog.corticalcafe.com/index.php?gid=1&pts=1 gid is the giveaway id, and pts of course is the points the player earns(The player cannot see the link until its been used so they cant change pts=1). Does anyone know of an easy way to allow players to use it once?
Note: It would be best if I don't have to store it in a file, as their will be a lot of giveaways, meaning the file would get real messy quickly. |
Lo-Fi Version | Time is now: 27th April 2024 - 04:46 AM |