Bitcoin Forum
May 21, 2024, 07:00:26 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Using curl in the Bitcoin Source  (Read 761 times)
ncsupanda (OP)
Legendary
*
Offline Offline

Activity: 1628
Merit: 1012



View Profile
July 17, 2014, 01:44:45 AM
 #1

Hey all,

I've been working for a while now to learn more about the Bitcoin source, and I'm trying to create an implementation where a number is pulled from a website and added to the wallet.

I can't seem to get this to happen any way, and I'm hoping that from a high level someone can give me some guidance.

I would love to be able to use curl, but it doesn't seem to be supported in the Bitcoin source; As well as any http retrieval method that I'm trying.

Any help is much appreciated!
coinsolidation
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250

Bitmark Developer


View Profile WWW
July 17, 2014, 01:47:17 AM
 #2

I'm trying to create an implementation where a number is pulled from a website and added to the wallet.

and added to where exactly?


Bitmark (reputation+money) : Bitmark v0.9.4 (release)
ncsupanda (OP)
Legendary
*
Offline Offline

Activity: 1628
Merit: 1012



View Profile
July 17, 2014, 02:00:37 AM
 #3

I'm trying to create an implementation where a number is pulled from a website and added to the wallet.

and added to where exactly?



I've got two different things I'd like to do - display a value for the current price of Bitcoin (this is similar to what you see in MultiBit) either in the toolbar or directly on the wallet itself.

Also, save the value so that an RPC can display the information in the console.
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5208
Merit: 12998


View Profile
July 17, 2014, 02:08:43 AM
 #4

See GetMyExternalIP and GetMyExternalIP2 in net.cpp, which uses an HTTP API to get your external IP. You can mostly copy GetMyExternalIP2 for your use.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
coinsolidation
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250

Bitmark Developer


View Profile WWW
July 17, 2014, 02:19:44 AM
 #5

there are also some http helper functions in rpcprotocol.cpp which may help you read the http headers and messages

Bitmark (reputation+money) : Bitmark v0.9.4 (release)
ncsupanda (OP)
Legendary
*
Offline Offline

Activity: 1628
Merit: 1012



View Profile
July 17, 2014, 02:50:13 AM
 #6

there are also some http helper functions in rpcprotocol.cpp which may help you read the http headers and messages
See GetMyExternalIP and GetMyExternalIP2 in net.cpp, which uses an HTTP API to get your external IP. You can mostly copy GetMyExternalIP2 for your use.

Thanks, will do!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!