Bitcoin Forum
December 09, 2016, 09:46:03 AM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Where to Start? PHP + BitCoin  (Read 1655 times)
philipk
Newbie
*
Offline Offline

Activity: 28


View Profile WWW
July 14, 2011, 06:30:11 PM
 #1

I'm a PHP developer(1 year experience) looking to learn how to work with BitCoin.

I don't have that much experience with APIs.

Any suggestions appreciated.

Coin Canyon (http://CoinCanyon.com/) | Twitter (http://Twitter.com/CoinCanyon)
1481276763
Hero Member
*
Offline Offline

Posts: 1481276763

View Profile Personal Message (Offline)

Ignore
1481276763
Reply with quote  #2

1481276763
Report to moderator
1481276763
Hero Member
*
Offline Offline

Posts: 1481276763

View Profile Personal Message (Offline)

Ignore
1481276763
Reply with quote  #2

1481276763
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481276763
Hero Member
*
Offline Offline

Posts: 1481276763

View Profile Personal Message (Offline)

Ignore
1481276763
Reply with quote  #2

1481276763
Report to moderator
SgtSpike
Legendary
*
Offline Offline

Activity: 1344



View Profile
July 14, 2011, 06:55:33 PM
 #2

Google bitcoin-php, and then ask any questions you have about it.  I have a decent amount of experience with the library now.
philipk
Newbie
*
Offline Offline

Activity: 28


View Profile WWW
July 14, 2011, 07:36:51 PM
 #3

I'm taking a look the following post

http://forum.bitcoin.org/index.php?topic=9304.0

Can you explain the following variables

Code:
$rpcUser = "username";
$rpcPass = "password";
$url = "http://localhost:8332";

Do you set this up to access an online BitCoin Client? Existing at what ever url you choose?

Coin Canyon (http://CoinCanyon.com/) | Twitter (http://Twitter.com/CoinCanyon)
SgtSpike
Legendary
*
Offline Offline

Activity: 1344



View Profile
July 14, 2011, 08:23:57 PM
 #4

I'm taking a look the following post

http://forum.bitcoin.org/index.php?topic=9304.0

Can you explain the following variables

Code:
$rpcUser = "username";
$rpcPass = "password";
$url = "http://localhost:8332";

Do you set this up to access an online BitCoin Client? Existing at what ever url you choose?
Close, but no.  You have to have a bitcoind instance running.  Go to bitcoin.org, and download the client for whatever OS you are using.  Inside one of the subfolders, you'll find bitcoind.  In the same folder as bitcoind, you need to create a file called bitcoin.conf, and in it place:

rpcuser=user
rpcpassword=password

Also, to allow external access via PHP, you'll have to add the IP address of the PHP server (wildcard * allowed).  If bitcoind is running on your PHP server, you shouldn't have to do anything (as 127.0.0.1 is allowed by default).

rpcallowip=1.1.1.1

Then, in your PHP file, change "username" and "password" to whatever un/pw you wrote in the .conf.  Leave $url alone if bitcoind is running on your PHP server, or change the localhost to your external bitcoind IP.  Start up bitcoind, then you should be able to connect to it via PHP.
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2002



View Profile
July 15, 2011, 10:43:49 AM
 #5

I'm a PHP developer(1 year experience) looking to learn how to work with BitCoin.

I don't have that much experience with APIs.

Any suggestions appreciated.

For reference:
 - http://en.bitcoin.it/wiki/PHP_developer_intro

philipk
Newbie
*
Offline Offline

Activity: 28


View Profile WWW
July 19, 2011, 03:06:53 PM
 #6

Still having problems right for the starts.

I have the bitcoin application running.

Then I go to terminal and input

Quote
./bitcoind

No such file or directory

Coin Canyon (http://CoinCanyon.com/) | Twitter (http://Twitter.com/CoinCanyon)
SgtSpike
Legendary
*
Offline Offline

Activity: 1344



View Profile
July 19, 2011, 03:09:45 PM
 #7

Still having problems right for the starts.

I have the bitcoin application running.

Then I go to terminal and input

Quote
./bitcoind

No such file or directory

If you already have it running, why are you trying to start it again?
philipk
Newbie
*
Offline Offline

Activity: 28


View Profile WWW
July 19, 2011, 03:13:45 PM
 #8

I am just trying to follow the instructions but I have tried it running and not running.

Same results.

Coin Canyon (http://CoinCanyon.com/) | Twitter (http://Twitter.com/CoinCanyon)
SgtSpike
Legendary
*
Offline Offline

Activity: 1344



View Profile
July 19, 2011, 04:07:11 PM
 #9

If you were on windows, I could tell you exactly what to do... but I'll try to explain what needs to be done on linux.

You need to run the GUI client with the -server switch OR run bitcoind.  They both do the same thing.  I liked to run the GUI while I was developing, because I could easily see the transactions I was making in realtime.

If you want to run bitcoind from the terminal, instead of the GUI client with the -server switch, then you'll have to navigate to the directory where bitcoind is stored.  It should be /yourbitcoindirectory/bin/32, if I remember correctly.
philipk
Newbie
*
Offline Offline

Activity: 28


View Profile WWW
July 19, 2011, 05:04:56 PM
 #10

On a Mac.

Library/Application Support/Bitcoin

Quote
__db.001   __db.004   addr.dat   blkindex.dat   debug.log
__db.002   __db.005   bitcoin.conf   database   wallet.dat
__db.003   __db.006   blk0001.dat   db.log
Philip-Kirkbrides-MacBook-Pro:Bitcoin philipkirkbride$

Doesn't seem to be a 'bitcoind' file anywhere on my computer. Have tried running the app and don't see any options or switches to do with server interaction.

Any ideas?

Coin Canyon (http://CoinCanyon.com/) | Twitter (http://Twitter.com/CoinCanyon)
SgtSpike
Legendary
*
Offline Offline

Activity: 1344



View Profile
July 19, 2011, 05:14:34 PM
 #11

Ah, sorry, I thought you were on linux.  I'm even more unfamiliar with a Mac.

A switch, at least on Windows, is where you add "-server" after the target path in the shortcut properties.  I have no idea what the equivalent is on a mac, or how to use it.  Someone else will have to jump in here...
pent
Hero Member
*****
Offline Offline

Activity: 490



View Profile
July 19, 2011, 07:48:26 PM
 #12

Still having problems right for the starts.

I have the bitcoin application running.

Then I go to terminal and input

Quote
./bitcoind

No such file or directory


Is there any file named 'bitcoind' in a current directory? ))

You have to change directory where bitcoind is located first.

not familiar with mac's too... but it is a general unix command

"./somescript" = run a somescript, located in current dir.
error
Hero Member
*****
Offline Offline

Activity: 574



View Profile
July 19, 2011, 10:42:25 PM
 #13

Still having problems right for the starts.

I have the bitcoin application running.

Then I go to terminal and input

Quote
./bitcoind

No such file or directory

Provide the full path to wherever you installed bitcoind.

15UFyv6kfWgq83Pp3yhXPr8rknv9m6581W
philipk
Newbie
*
Offline Offline

Activity: 28


View Profile WWW
July 20, 2011, 12:36:36 AM
 #14

I have looked in all bitcoin related folders. As well as a system wide search for "bitcoind".

It doesn't exist on the computer.

Coin Canyon (http://CoinCanyon.com/) | Twitter (http://Twitter.com/CoinCanyon)
philipk
Newbie
*
Offline Offline

Activity: 28


View Profile WWW
July 20, 2011, 12:50:26 AM
 #15

I will make another thread titled "How to Use BitCoin on local server with Mac OSX".

But in this thread lets move on. If I can't play around with BitCoin on my local server what about installing it on my live server?

I use GoDaddy Embarrassed and usually only interact via FTP & MySQL.

Coin Canyon (http://CoinCanyon.com/) | Twitter (http://Twitter.com/CoinCanyon)
error
Hero Member
*****
Offline Offline

Activity: 574



View Profile
July 20, 2011, 01:26:07 AM
 #16

I have looked in all bitcoin related folders. As well as a system wide search for "bitcoind".

It doesn't exist on the computer.

Very strange. Did you use the official Mac OS X build or did you build it yourself?

I will make another thread titled "How to Use BitCoin on local server with Mac OSX".

But in this thread lets move on. If I can't play around with BitCoin on my local server what about installing it on my live server?

I use GoDaddy Embarrassed and usually only interact via FTP & MySQL.

Shared hosting providers rarely permit running background processes. GoDaddy is no exception. Now if you have a VPS or a dedicated server, you are fine and you can run pretty much whatever you want.

15UFyv6kfWgq83Pp3yhXPr8rknv9m6581W
philipk
Newbie
*
Offline Offline

Activity: 28


View Profile WWW
July 20, 2011, 02:03:35 AM
 #17

Using "bitcoin-v0.3.23".

I have Grid Hosting with GoDaddy. Its suppost to let you run Rails Apps which isn't standard with the lower end hosting.

Assuming I have a hosting service that will let me run a process. Do I just upload a folder and run a script?

Coin Canyon (http://CoinCanyon.com/) | Twitter (http://Twitter.com/CoinCanyon)
error
Hero Member
*****
Offline Offline

Activity: 574



View Profile
July 20, 2011, 02:12:56 AM
 #18

Using "bitcoin-v0.3.23".

Did you use the official Mac OS X build or did you build it yourself?

I have Grid Hosting with GoDaddy. Its suppost to let you run Rails Apps which isn't standard with the lower end hosting.

Assuming I have a hosting service that will let me run a process. Do I just upload a folder and run a script?

Is that what they call "4GH" now? If so, then bitcoind is still not permitted.

15UFyv6kfWgq83Pp3yhXPr8rknv9m6581W
philipk
Newbie
*
Offline Offline

Activity: 28


View Profile WWW
July 20, 2011, 01:01:43 PM
 #19

Yes its the official build.

As for hosting your probably right.

'Hosting - Web - Deluxe - Linux - 1 year (recurring)'

I still want to know what service I need to run Bitcoin on server. I have had good luck calling them in the past for upgrades. 

Coin Canyon (http://CoinCanyon.com/) | Twitter (http://Twitter.com/CoinCanyon)
Xenland
Legendary
*
Offline Offline

Activity: 980


I'm not just any shaman, I'm a Sha256man


View Profile
July 24, 2011, 06:14:37 AM
 #20

Yes its the official build.

As for hosting your probably right.

'Hosting - Web - Deluxe - Linux - 1 year (recurring)'

I still want to know what service I need to run Bitcoin on server. I have had good luck calling them in the past for upgrades. 

You need Root Access to a hosting server, usually Virtual Private Server hosting or Dedicated Hosting comes standard with this... I don't know why you can't find the bitcoin application but you will need Root Access enabled on your hosting in order to run basically anything bitcoin related.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!