Bitcoin Forum

Economy => Micro Earnings => Topic started by: JaredFogle on May 27, 2016, 11:18:29 PM



Title: Need some faucetbox help.
Post by: JaredFogle on May 27, 2016, 11:18:29 PM
I want to make it so when someone clicks on the claim button they get redirected to a adf.ly link then back to the site
How can I do this


Title: Re: Need some faucetbox help.
Post by: minifrij on May 27, 2016, 11:40:30 PM
This would require some extra PHP coding to be done properly. It would all be pretty simple stuff, but can be complicated to implement should you not know PHP/the FaucetBox script too well. The process of it would probably go something like this however:

User Presses Claim Button -> Script checks whether the Captcha has been solved correctly -> A CSRF token is created by the script to prevent abuse -> The script redirects to the Adf.ly page which redirects back to the claim page -> The page checks the HTTP_REFERRER to see if it is Adf.ly (However this is unreliable as HTTP headers can be changed manually) -> CSRF token is checked to be sure that the user did actually come from the original claim page (and perhaps checked against a timestamp to stop abuse) -> Faucet pays satoshi to user.

There are a lot of steps to doing something like this in order to make it all work nicely and secure. If you're not too confident at PHP I would recommend hiring someone to do the job for you or be prepared for your funds to be stolen if a bug is found. It would also be pretty annoying for users to have to deal with for users, so your rewards would probably have to be higher to compensate.