BitTalkyy (OP)
Newbie
Offline
Activity: 28
Merit: 0
|
|
October 16, 2015, 02:40:38 PM Last edit: October 19, 2015, 11:15:39 AM by BitTalkyy |
|
First go to http://www.blockchain.info/ and create a wallet. Copy down the identifier. Download the lite version of JSON-RPC PHP Client. http://jsonrpcphp.org/?page=download&lang=enInclude it in your php file, you want to use it. Write your connect script like this: Next, create some variables: $message = Your message; $address = Address; $signature = Signature Create another variable that will have a value of true or false. This indicates the validity of the message. $sig_valid = $bitcoin->verifymessage($address,$signature,$message) Now check the state: if($sig_valid) { //valid } else { //invalid } So, for the lazy people, here's the full code: <?php require_once 'jsonRPCClient.php'; $bitcoin = new jsonRPCClient(' http://user:password@rpc.blockchain.info/');$address; $message; $signature; $sig_valid = $bitcoin->verifymessage($address,$signature,$message); if($sig_valid) { //valid } else { //invalid } ?> You can do more things with this: https://blockchain.info/hu/api/json_rpc_apiHappy programming! I'll post more programming tutorials soon! Also, if you have an idea, PM me and we can team up on it. Tips are appreciated: 1Tipo4u5vkaNDjPd5A4wxPxmR4bEp8Bdb
|
|
|
|
|
|
If you want to be a moderator, report many posts with accuracy. You will be noticed.
|
|
|
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
|
|
|
shorena
Copper Member
Legendary
Offline
Activity: 1498
Merit: 1520
No I dont escrow anymore.
|
|
October 16, 2015, 05:47:11 PM |
|
Whats the benefit if you rely on an API anyway?
|
Im not really here, its just your imagination.
|
|
|
BitTalkyy (OP)
Newbie
Offline
Activity: 28
Merit: 0
|
|
October 16, 2015, 06:29:22 PM |
|
Whats the benefit if you rely on an API anyway?
You can save a lot of bandwidth and disk space. Also, it's much easier
|
|
|
|
shorena
Copper Member
Legendary
Offline
Activity: 1498
Merit: 1520
No I dont escrow anymore.
|
|
October 16, 2015, 07:24:49 PM |
|
Whats the benefit if you rely on an API anyway?
You can save a lot of bandwidth and disk space. Also, it's much easier https://chainquery.com/bitcoin-api/verifymessage
|
Im not really here, its just your imagination.
|
|
|
silverleafy
|
|
October 16, 2015, 07:28:06 PM |
|
Why use the blockchain.info api? Blockchain.info has a terrible track record and their service isn't all that great. I would not use their api.
|
|
|
|
QUEDOS
Newbie
Offline
Activity: 37
Merit: 0
|
|
October 16, 2015, 08:25:45 PM |
|
Whats the benefit if you rely on an API anyway?
You reduce stress on disk space and you can cut back on bandwidth usage at the same time
|
|
|
|
Abdussamad
Legendary
Offline
Activity: 3612
Merit: 1564
|
|
October 16, 2015, 09:58:00 PM |
|
|
|
|
|
BitTalkyy (OP)
Newbie
Offline
Activity: 28
Merit: 0
|
|
October 17, 2015, 09:55:35 AM |
|
That script requires some extensions, my version is pure PHP
|
|
|
|
coinableS
Legendary
Offline
Activity: 1442
Merit: 1179
|
|
October 18, 2015, 04:02:45 PM |
|
Gotta love it here, it's become as toxic as a children playground! You all need to grow up. A newb posts a how-to with good intentions to educate or help others. What's the response? BC.info sucks, why are you using API, you should do it with this library instead, you should host a full node on your server and do JSON RPC, etc. Who cares what you think about BC.info and their wallet service? He's not telling anyone to store coins there. Their API is a free service that is actually useful, but you all like to take the popular choice that BC.info sucks, no matter the usage or implementation.
It's easy to be a critic. Why you don't you create your own how to's or tutorials?
|
|
|
|
BitTalkyy (OP)
Newbie
Offline
Activity: 28
Merit: 0
|
|
October 18, 2015, 05:22:25 PM |
|
Gotta love it here, it's become as toxic as a children playground! You all need to grow up. A newb posts a how-to with good intentions to educate or help others. What's the response? BC.info sucks, why are you using API, you should do it with this library instead, you should host a full node on your server and do JSON RPC, etc. Who cares what you think about BC.info and their wallet service? He's not telling anyone to store coins there. Their API is a free service that is actually useful, but you all like to take the popular choice that BC.info sucks, no matter the usage or implementation.
It's easy to be a critic. Why you don't you create your own how to's or tutorials?
I don't know if you're hating on me, but I didn't say to anyone to use that wallet. It's required to log onto the RPC Server
|
|
|
|
coinableS
Legendary
Offline
Activity: 1442
Merit: 1179
|
|
October 18, 2015, 05:29:36 PM |
|
Gotta love it here, it's become as toxic as a children playground! You all need to grow up. A newb posts a how-to with good intentions to educate or help others. What's the response? BC.info sucks, why are you using API, you should do it with this library instead, you should host a full node on your server and do JSON RPC, etc. Who cares what you think about BC.info and their wallet service? He's not telling anyone to store coins there. Their API is a free service that is actually useful, but you all like to take the popular choice that BC.info sucks, no matter the usage or implementation.
It's easy to be a critic. Why you don't you create your own how to's or tutorials?
I don't know if you're hating on me, but I didn't say to anyone to use that wallet. It's required to log onto the RPC Server Not at all, I was hating on all the others that were bashing your tutorial. I sent you a tip.
|
|
|
|
BitTalkyy (OP)
Newbie
Offline
Activity: 28
Merit: 0
|
|
October 18, 2015, 05:30:55 PM |
|
Gotta love it here, it's become as toxic as a children playground! You all need to grow up. A newb posts a how-to with good intentions to educate or help others. What's the response? BC.info sucks, why are you using API, you should do it with this library instead, you should host a full node on your server and do JSON RPC, etc. Who cares what you think about BC.info and their wallet service? He's not telling anyone to store coins there. Their API is a free service that is actually useful, but you all like to take the popular choice that BC.info sucks, no matter the usage or implementation.
It's easy to be a critic. Why you don't you create your own how to's or tutorials?
I don't know if you're hating on me, but I didn't say to anyone to use that wallet. It's required to log onto the RPC Server Not at all, I was hating on all the others that were bashing your tutorial. I sent you a tip. Oh, thank you then!
|
|
|
|
fbueller
|
|
October 21, 2015, 11:38:57 PM |
|
That script requires some extensions, my version is pure PHP Your script requires extensions too - JSON and cURL support are extensions.
|
Bitwasp Developer.
|
|
|
avatar_kiyoshi
Legendary
Offline
Activity: 1106
Merit: 1000
|
|
October 22, 2015, 05:42:01 AM |
|
Nice tutorial, don't bashing a newbie guys, moreover he's not want to robbed your coin. nice works! That script requires some extensions, my version is pure PHP Your script requires extensions too - JSON and cURL support are extensions. Well this is right, op script is not pure php. but the script is simple I think, easy to understand.
|
|
|
|
lightenx
Member
Offline
Activity: 98
Merit: 10
|
|
October 30, 2015, 09:23:15 PM |
|
Nah, I think OP's script is good enough. Not perfect tho
|
|
|
|
|