Bitcoin Forum
April 23, 2024, 07:23:31 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: PHP script to create private key & public address  (Read 5306 times)
PrintCoins (OP)
Hero Member
*****
Offline Offline

Activity: 533
Merit: 501


View Profile
December 22, 2011, 02:28:38 AM
 #21

0.6 doesn't exist.

1713857011
Hero Member
*
Offline Offline

Posts: 1713857011

View Profile Personal Message (Offline)

Ignore
1713857011
Reply with quote  #2

1713857011
Report to moderator
1713857011
Hero Member
*
Offline Offline

Posts: 1713857011

View Profile Personal Message (Offline)

Ignore
1713857011
Reply with quote  #2

1713857011
Report to moderator
TalkImg was created especially for hosting images on bitcointalk.org: try it next time you want to post an image
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
Red Emerald
Hero Member
*****
Offline Offline

Activity: 742
Merit: 500



View Profile WWW
December 22, 2011, 02:31:36 AM
 #22

0.6 doesn't exist.
yet... https://bitcointalk.org/index.php?topic=55310.msg657914#msg657914

bitfreak!
Legendary
*
Offline Offline

Activity: 1536
Merit: 1000


electronic [r]evolution


View Profile WWW
December 30, 2011, 01:54:12 AM
Last edit: December 30, 2011, 02:05:35 AM by bitfreak!
 #23

I created a php library that uses "bitcoin-off-the-grid" (BOTG) (source: https://bitcointalk.org/index.php?topic=23081.20) which is a bash script.

Here is the library:
https://github.com/RobKohr/PHP-Bitcoin-Address-Creator

I trimmed out a bunch of stuff from BOTG to make it more script friendly, and wrapped a php exec call to it. It seems to work pretty well.
Awesome idea, I didn't think of that. It's still not working on my server though, I must be missing some packages. It's just outputting a bunch of 1's for me. And I don't really have the ability to install new packages on my server, that's another reason I wanted to find a way to generate bitcoin addresses without installing bitcoind on the server. I tried grondilu's Perl modification which removes some dependencies, but no luck. I must be missing the dc/bc package. Looks like I might have to read up on the process for creating bitcoin addresses and write a pure PHP script.

XCN: CYsvPpb2YuyAib5ay9GJXU8j3nwohbttTz | BTC: 18MWPVJA9mFLPFT3zht5twuNQmZBDzHoWF
Cryptonite - 1st mini-blockchain altcoin | BitShop - digital shop script
Web Developer - PHP, SQL, JS, AJAX, JSON, XML, RSS, HTML, CSS
PrintCoins (OP)
Hero Member
*****
Offline Offline

Activity: 533
Merit: 501


View Profile
December 30, 2011, 04:32:32 AM
 #24

I created a php library that uses "bitcoin-off-the-grid" (BOTG) (source: https://bitcointalk.org/index.php?topic=23081.20) which is a bash script.

Here is the library:
https://github.com/RobKohr/PHP-Bitcoin-Address-Creator

I trimmed out a bunch of stuff from BOTG to make it more script friendly, and wrapped a php exec call to it. It seems to work pretty well.
Awesome idea, I didn't think of that. It's still not working on my server though, I must be missing some packages. It's just outputting a bunch of 1's for me. And I don't really have the ability to install new packages on my server, that's another reason I wanted to find a way to generate bitcoin addresses without installing bitcoind on the server. I tried grondilu's Perl modification which removes some dependencies, but no luck. I must be missing the dc/bc package. Looks like I might have to read up on the process for creating bitcoin addresses and write a pure PHP script.
Go into lib and
chmod 777 botg.sh

then do this:
./botg.sh

Tell me what happens.


bitfreak!
Legendary
*
Offline Offline

Activity: 1536
Merit: 1000


electronic [r]evolution


View Profile WWW
December 30, 2011, 05:24:49 AM
Last edit: December 30, 2011, 05:39:35 AM by bitfreak!
 #25

I've already set the permissions on the botg.sh file correctly. At first it wasn't outputting anything so I fixed the permissions and it started giving me a string of 1's for both the keys. The output looks like this:

PrivateKey
1111111111111111111111111111111111
PublicKey
1111111111111111111111111111111111

I did a quick Google search and found that someone else using the BOTG script was getting the same type of output. It was because they were missing certain packages, so I assume that's my problem.

XCN: CYsvPpb2YuyAib5ay9GJXU8j3nwohbttTz | BTC: 18MWPVJA9mFLPFT3zht5twuNQmZBDzHoWF
Cryptonite - 1st mini-blockchain altcoin | BitShop - digital shop script
Web Developer - PHP, SQL, JS, AJAX, JSON, XML, RSS, HTML, CSS
PrintCoins (OP)
Hero Member
*****
Offline Offline

Activity: 533
Merit: 501


View Profile
December 30, 2011, 03:13:19 PM
 #26

If you are on ubuntu, try:

sudo apt-get install bc

I had to do this on one of my servers to get it to work.

Also, just check each of the commands executed in the script (it isn't too long). Check to see that you have each installed.

Let me know the results, and I will update the readme if you have a solution.

Ascension
Sr. Member
****
Offline Offline

Activity: 457
Merit: 250



View Profile
June 14, 2013, 02:47:03 AM
 #27

I am having issues getting this script to run. I can run it fine from the server but when I try to run it from the php function that i got from here: https://github.com/RobKohr/PHP-Bitcoin-Address-Creator/blob/master/lib/botg.sh

I get this output:
Code:
Array ( [0] => PrivateKey [1] => 111111111111111111111111111FXjQL6s [2] => PublicKey [3] => 1HT7xU2Ngenf7D4yocz2SAcnNLW7rK8d4E ) 
Eric Muyser
Full Member
***
Offline Offline

Activity: 224
Merit: 100


You can't kill math.


View Profile
June 14, 2013, 03:23:39 AM
 #28

I am having issues getting this script to run. I can run it fine from the server but when I try to run it from the php function that i got from here: https://github.com/RobKohr/PHP-Bitcoin-Address-Creator/blob/master/lib/botg.sh

I get this output:
Code:
Array ( [0] => PrivateKey [1] => 111111111111111111111111111FXjQL6s [2] => PublicKey [3] => 1HT7xU2Ngenf7D4yocz2SAcnNLW7rK8d4E ) 

Still man? Sucks...

@EricMuyser | EricMuyser.com | OTC - "Defeat is a state of mind; no one is ever defeated until defeat has been accepted as a reality" - Bruce Lee
Pages: « 1 [2]  All
  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!