Pages:
Author

Topic: PHP Bitcoin Development Kit | v0.0.46_pre15 | Alpha | BitcoinDevKit.com (Read 16305 times)

legendary
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
While you wait for updates and further progress of the BDK library: I have started the scripts for sale back up again go to the following link and then scroll down and click "Show practical source" and you will be able to purchase some scripts for 0.01 BTC Cheesy enjoy http://bitcoindevkit.com/examples/example1.php
legendary
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
Just pinging in for the lurkers, I will be resuming progress for the BDK website and library improvements in Aug 2013. Along with kicking the preorder page back into gear.
legendary
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
Question Xenland...  Is the data from the blockchain stored in SQL tables of any kind from this?  Or does it just directly interact with the bitcoind process via RPC commands?  Specifically, I am wondering if the Bitcoin transactions for each block would be available to query from a SQL database or not.

The BDK for php currently does not have any plans to integrate any type of databases of anykind until a non-db working BDk version has been tested and debugged. Then once officially stable, we look towards options of integration of databases and properly informing the user on some security implications that could be involved with using a db with the BDK. As of now the only storate there is for the BDK is receipts and that uses BTC address labels in json format (with sha256/checksums for data verification)
legendary
Activity: 1400
Merit: 1005
Question Xenland...  Is the data from the blockchain stored in SQL tables of any kind from this?  Or does it just directly interact with the bitcoind process via RPC commands?  Specifically, I am wondering if the Bitcoin transactions for each block would be available to query from a SQL database or not.
legendary
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
SPOTLIGHT Looks like someone generously added the bitcoin_get_balance function Cheesy
which i have added to the official library after review.

https://github.com/SteButler/Bitcoin-Development-Kit/commit/0e8e4857857193ff3662bc1bb1acebfae86c977f

Thanks mate!
legendary
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
I want to get my scripts shop tested more and post up more script examples so I lowered the cost to 0.01 Bitcoins for 3 scripts (6 scripts total) in one download. Heck if you don't need the scripts and want to donate just purchase the scripts and delete'em. All purchases help me collect data about using Bitcoin with websites, It shows that you want to support the project, and all data compiled together helps me produce a better library.
legendary
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
Okay so finally i got bitcoin client to run stable in the background so now you should be able to purchase the scripts the url again is
http://www.bitcoindevkit.com/examples/example1.php
scroll down and click "show practical code" only costs you 0.05 BTC for 3 scripts (alt versions of with out comments so you don't need to waste time to delete the comments everytime you need to copy and paste and we also give you "with comments" too so its like about 6 scripts)
newbie
Activity: 14
Merit: 0
Great to hear these inspiring words Keeps me going!!


I'd also like to announce that I've been working on a project/contract that involves BTC and LTC and utilizes a variant of the BDK for php well it seems its difficult to use multiple coins with the BDK even if they are the same API so I'm working out the details but the next updates should expect to have concurrency built into it some how.

That's great news!  Easy LTC integration to existing BTC applications is the way to go at the moment.
legendary
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
Cool man lots of features it's missing but it's looking great so far.

It's true it's not hard to develop with bitcoin without a dev kit but it's nice to see that someone is taking the time to properly handle all possible requests and responses.  Once every API call is added it won't be "why do I need this?" it will be "why wouldn't you use this?"

Once every API call is added I could see the higher level functions growing into something very useful as well.

You can count on a donation from me once it hits version one.

Great to hear these inspiring words Keeps me going!!


I'd also like to announce that I've been working on a project/contract that involves BTC and LTC and utilizes a variant of the BDK for php well it seems its difficult to use multiple coins with the BDK even if they are the same API so I'm working out the details but the next updates should expect to have concurrency built into it some how.
newbie
Activity: 14
Merit: 0
Cool man lots of features it's missing but it's looking great so far.

It's true it's not hard to develop with bitcoin without a dev kit but it's nice to see that someone is taking the time to properly handle all possible requests and responses.  Once every API call is added it won't be "why do I need this?" it will be "why wouldn't you use this?"

Once every API call is added I could see the higher level functions growing into something very useful as well.

You can count on a donation from me once it hits version one.
legendary
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
Okay full sync has occurred, Bitcoin should be fully accessable including the example pages and the "unlock practical code" page you my now purchase your first script at http://bitcoindevkit.com/examples/example1.php
and scrolling down and clicking "Show Practical Source Code" under the "Unlock Practical Source Code" pages.
legendary
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
The first sync is almost done I say one more day it needs about 10,000 more blocks to finish.
legendary
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
It seems Bitcoin is constantly shutting down when it hits the memory limit (512mb) I think its becuase it is still syncing, I hope there won't be any problems after the full first sync happens.
legendary
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
The NGinx transfer has been completed the examples work and the script shop (Unlock practical scripts) seem to be working on my end, let me know if any problems arise! and I think I like NGinx now that I've gotten use to it coming from a apache2 background.


I'm saddened by the fact developers on here need RPC calls compiled into a fancy package for them.
Why?  Do people have to be experts in programming to program a Bitcoin website?  I would say yes, if they are handling other people's Bitcoins for them, but otherwise, why not develop tools that make working with Bitcoin easier?

I am thankful that Xenland has taken it up on himself to develop this set of tools.

SgtSpike Gets it!  Grin
legendary
Activity: 1400
Merit: 1005
I'm saddened by the fact developers on here need RPC calls compiled into a fancy package for them.
Why?  Do people have to be experts in programming to program a Bitcoin website?  I would say yes, if they are handling other people's Bitcoins for them, but otherwise, why not develop tools that make working with Bitcoin easier?

I am thankful that Xenland has taken it up on himself to develop this set of tools.
legendary
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
Also I'm moving from apache2 to ngix so if you can't reach the website don't worry your purchase is safe as long as you save the url link of your receipt you'll be able to download it once the website is back up.
legendary
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
Okay so I have updated the website, fixed some spelling errors, and uploaded the first purchasable example script pack for example 1. It's nothing too fancy but after all you can't display a whole lot with "Generating a Bitcoin address". So the idea is I sell a few examples, you let me know how you like or dislike them all constructive criticism is welcomed(although sometimes I'm not sure how to respond to some of these criticisms around here sometimes hehe). Anyways if you want to know how to properly use the "Bitcoin Generate Address function" with the BDK php library then go to the following link
http://www.bitcoindevkit.com/examples/example1.php

scroll down and click "unlock practical source code" and purchase your first example scripts for 0.05 BTC ($3 at current price of $68/1Bitcoin)

*Future updates for scripts
---Example scripts for every API function of the Bitcoin/BDK library
---Advanced scripts for the higher level functions that will include fully deployable demos complete with everything you would expect HTML, PHP, BDKphp, and Bitcoin

If you even feel the need that you liked my library and don't need the source code examples and feel like donating, just purchase the scripts instead it helps with testing and you know your Bitcoins "are" going some where. Thanks for everyone supporting me and contributing, We as a BTC community are doing great, lets' show'em what "The People" really means!
legendary
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
Upgraded the Bitcoin client to 0.8.1, to the new hosting server at BitcoinDevKit.com and now the examples work Wink (I only tested example #1 for the upgrade)
http://www.bitcoindevkit.com/examples/example1.php


Edit Update:
Looks like all the examples work!

Some updates coming later today are:
*A purchasable example scripts for example 1
comes with 3 scripts(Not counting the complementary script and the "with out comments" versions of these scripts)
One script is an advanced script
The other two are simpler usages but highly informative.
legendary
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
Did I mention a receipt system that holds product ids and does data verification through check sums WITHOUT a database?
https://github.com/Xenland/Bitcoin-Development-Kit/wiki/BDK-Generate-Receipt Smiley
legendary
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
I'm not talking about CPU cycles, I'm concerned about network traffic.  Not everyone is going to have their RPC server hosted on the same machine as their site.  I'm willing to best most actually go the 3rd-party route, and outsource their RPC server.
I'm assuming your saying that doing a global connection object would be less networking and more efficient but it wouldn't be for a few reasons:

Unless I force developers to "prerender" their data (like obstart and obflush) for example "call" all Bitcoin queries in one swoop instead of "as needed on the page" basis, the reasoning is JSONRPC libraries for php are not "socket" based, only http so even forcing them to prerender at this point is just making things difficult and confusing for the gain of nothing.

If i had socket based json php library this could work and with out forcing pre render scenario too, so I'll say it again I agree with you it just needs to be done right, I can't just set the connection object to global and expect HTTP requests spanned out in different areas of a logical PHP to execute in a continuous stream like TCP and expect to get greater networking efficency... nope not with out TCP sockets or a consistent stream.

Also if a user is executing more than 5 bitcoin commands in 1 second you probably should hire a developer to develop a larger scale system or don't use BDKphp for cronjob type tasks use python or C++ or some other choice of language built for that sort of thing.

As for "creating an object", the jsonRPC library already returns the connection as a class object.  All you need to do is have it set as public at the top of the script (after including jsonRPCClient.php and config.php, of course).


See the following...


Code:
//Open connection
try{
$output["connection"] = new jsonRPCClient($btcclient["https"].'://'.$btcclient["user"].':'.$btcclient["pass"].'@'.$btcclient["host"].':'.$btcclient["port"]);
}catch(Exception $e){
$output["return_status"] = -1;
$output["connection"] = null;
}

if($output["connection"] != null && $output["connection"] != false){
                                        //Keep running multiple bitcoin commands
                                        for($i=0;$i<100;$i++){
//Connection successful run query to Bitcoin
//Yes BTC client has been successfully opened
//Attempt to query a new address....
$tmp_new_address = '';
try{
$tmp_new_address = $new_btcclient_connection["connection"]->getnewaddress($new_address_label);
}catch(Exception $e){
$tmp_new_address = '';
}


$generated_address_is_valid = bitcoin_validate_address($tmp_new_address);
if($generated_address_is_valid["isvalid"] == 1){
echo "new address".$tmp_new_address;

}else{
echo "FAILED";
}
                                        }

}

In comparison to just doing the following...
Code:
include_once("./BDKp_library.php");
$new_address_details = bitcoin_generate_new_address();

Now if your saying that setting the connection script to global and doing JSON commands one right after another instantaneously will save networking resources then you should look into the JSON libraries for PHP more closely on how each call is made I guarantee you none of them have a queuing system that say "Hey is ther another command coming so I can finally send this HTTP request?" that would bottle neck things.
Pages:
Jump to: