Please Help My In My Project PHP ! :( | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6

Please Help My In My Project PHP ! :(

Hello ! :) --------------- I Need When I Enter To The Website And Give My Random Link And Any People In World Enter The Link I Get 1 Coin , The Coin is Save In My Account . Can Help My Please ?!

15th Jan 2018, 7:46 PM
Yousef Eabitan
Yousef Eabitan - avatar
6 Answers
+ 7
hello daniel fernández Hidalgo , i need make this web same some website , the idea people share link when get 100 coin he can buy free minecraft account , paypal , stream , like this . no bitcoin , thank you for replay in my quistion. :)
17th Jan 2018, 9:55 AM
Yousef Eabitan
Yousef Eabitan - avatar
+ 3
Do you want to generate a custom link for you which when you share it and somebody use it, increment in your website database your coin(for your user)? I want to think you dont refert to bitcoin right? its only an irreal money, yes?
17th Jan 2018, 2:19 AM
Daniel
Daniel - avatar
+ 1
or are you talking about some sort of visit counter ?
17th Jan 2018, 2:34 AM
Mason Neville
Mason Neville - avatar
+ 1
I think you might wanna look at some local blockchain implementation ( contract+local currency ? ) for integrity, and then, you provide the exchange service for your sovereign coin, to cash or whatever else gift cards, bonds, etc... you wish to deliver to your customers, perhaps an access code ? Maybe some sort of proof-of-work system could make sense ? For clicking and sharing ? I have no idea how to implement any of that by the way but the theory might be sound. Anyone ?
17th Jan 2018, 5:25 PM
Mason Neville
Mason Neville - avatar
+ 1
Yousef you must to follow guide from Mason if you want to play with real money. For the link properly you could generate a code and concatenate it with your website URL and save it in your database. Obviously, you must to do coding to check that when somebody do click in your link.
18th Jan 2018, 12:22 AM
Daniel
Daniel - avatar
+ 1
Alright, first you need a table in your database wich stores what code belongs to which user. Put the code on the end of the link after the ? so you can access it with $_GET. Then when somebody clicks on the link, you simply check your database for the user that belongs to the code and add one coin (just increment a number in the user table, insert a transaction into the database or even a new entry into a blockchain idk). Ofcourse you may also want to log which user clicked on the link so he can't just click twice
19th Jan 2018, 2:10 PM
Weedfrosch
Weedfrosch - avatar