Bitcoin Forum
December 15, 2024, 06:55:08 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 [5] 6 »  All
  Print  
Author Topic: PHP Bitcoin Development Kit | v0.0.46_pre15 | Alpha | BitcoinDevKit.com  (Read 16305 times)
Xenland (OP)
Legendary
*
Offline Offline

Activity: 980
Merit: 1003


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


View Profile
March 18, 2013, 02:57:38 AM
 #81

https://github.com/Xenland/Bitcoin-Development-Kit/blob/master/BDKp_library.php
has been updated to better work work with windows (Although not recommended to publish anything serious on a windows server)

https://github.com/Xenland/Bitcoin-Development-Kit/commit/b986e9f33718806b7af44c2963b69091dd209bec
Xenland (OP)
Legendary
*
Offline Offline

Activity: 980
Merit: 1003


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


View Profile
March 19, 2013, 03:50:46 AM
Last edit: March 19, 2013, 04:39:26 PM by Xenland
 #82

Getting started with BDK for PHP on Windows 7 (XAMPP)
http://youtu.be/cAA0-95hQzE


These videos are to help me gather research data to provide quality videos for the purchasable packs Cheesy
ABitBack
Hero Member
*****
Offline Offline

Activity: 524
Merit: 502



View Profile
March 19, 2013, 12:39:23 PM
 #83

The website has been updated and there should be absolutely no broken links and no more "redirects to HTML pages".

Not quite, the logo leads to http://bitcoindevkit.com/index.html not .php (404)

Xenland (OP)
Legendary
*
Offline Offline

Activity: 980
Merit: 1003


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


View Profile
March 19, 2013, 03:34:28 PM
 #84

The website has been updated and there should be absolutely no broken links and no more "redirects to HTML pages".

Not quite, the logo leads to http://bitcoindevkit.com/index.html not .php (404)

Thanks fixing it Cheesy
Xenland (OP)
Legendary
*
Offline Offline

Activity: 980
Merit: 1003


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


View Profile
March 20, 2013, 07:55:10 PM
 #85

The video wasn’t that popular (in views) so I'll have to guess that the scripts are more a necessity then videos, but that goes with out saying that videos are helpful complement to scripts.
Xenland (OP)
Legendary
*
Offline Offline

Activity: 980
Merit: 1003


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


View Profile
April 09, 2013, 09:39:48 PM
 #86

It seems my donated server is down I'm purchasing new servers it should be back up in a bit.
Xenland (OP)
Legendary
*
Offline Offline

Activity: 980
Merit: 1003


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


View Profile
April 12, 2013, 03:31:21 AM
 #87

Server is back up and for the downtime I've decided to give away "complementary scripts" for each example. The first free script is example one cheers mates!
http://bitcoindevkit.com/examples/example1.php
DarkPunk
Member
**
Offline Offline

Activity: 182
Merit: 10



View Profile
April 12, 2013, 03:39:59 AM
 #88

I'm saddened by the fact developers on here need RPC calls compiled into a fancy package for them.
Xenland (OP)
Legendary
*
Offline Offline

Activity: 980
Merit: 1003


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


View Profile
April 12, 2013, 06:56:44 AM
Last edit: April 13, 2013, 07:28:03 AM by Xenland
 #89

I'm saddened by the fact developers on here need RPC calls compiled into a fancy package for them.

There's nothing fancy about it. It has a function.

For example encouraging integer math, but most importantly error codes are already built in and caught, no need to reinvent the wheel. The reason why I built it is because I kept rewriting PHP functions per client when i ended up writing the same thing over and over but not only that... The way RPC error handling happens in PHP is if you don't catch the "known" error the whole page wont render at all so that was another major issue.. Which was to catch all the errors instead of rendering a blank page; With the BDK the page actually computes/renders and spits out an error status code instead (which the developer can actually choose to display professional looking messages instead of error codes or blank pages).

Now if this was a C or C++ library I'd agree with you, but in PHP there is some issues that I have personally faceplamed the solutions some of these newbie developers are passing around, so in a way its meant to encourage less open holes for hackers to exploit due to the ignorance from newbie programmers. If you would like to reinvent the wheel I would say that's probably a waste of time unless your improving it... which in that case there should be some kind of record to "improve" upon or nobody will get any where as a "whole" and will just make the same mistakes over and over(Hence another reason to start this project and continue it is record keeping of failures of Bitcoin + PHP integration).

Well that's the end of my rant.
DarkPunk
Member
**
Offline Offline

Activity: 182
Merit: 10



View Profile
April 12, 2013, 07:16:26 AM
 #90

Looking over your sourcecode.

I have to ask, doesn't it make more sense to open the connection once as a public object when the library is included, instead of every time a function is called?  For small projects it's not that big a deal, but if someone were to use your kit for a high-traffic site, those are just extra RPC calls that could be cut back on.

Food for thought.
Xenland (OP)
Legendary
*
Offline Offline

Activity: 980
Merit: 1003


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


View Profile
April 12, 2013, 07:22:27 AM
 #91

I personally think it would be quite more difficult becuase then you'd have to create an "object" then call your function; why make everything so complex for less than 20 cpu cycles saved here?

As far as I know JSON rpc is usually HTTP type requests by default so no there shouldn't be any CPU cycles saved here just more typing and confusion of "object handlers". if I could enable TCP mode for sure, I'd implement the global "object handling" feature infact I'm writing that down in the "TO DO" list "Research how to enable TCP mode in the BDKs' current JSON library".

https://github.com/Xenland/Bitcoin-Development-Kit/wiki/%28%29-To-Do-Features-%28Notes-to-contributing-developers%29
DarkPunk
Member
**
Offline Offline

Activity: 182
Merit: 10



View Profile
April 12, 2013, 07:29:42 AM
 #92

I personally think it would be quite more difficult becuase then you'd have to create an "object" then call a function why make everything so complex for less than 20 cpu cycles saved here?

As far as I know JSON rpc is usually HTTP type requests by default so no there shouldn't be any CPU cycles saved here just more typing and confusing of "object handlers" if I could enable TCP mode for sure, I'd implement the global "object handling" feature infact I'm writing that down in the "TO DO" list "Research how to enable TCP mode in the BDKs' current JSON library".

https://github.com/Xenland/Bitcoin-Development-Kit/wiki/%28%29-To-Do-Features-%28Notes-to-contributing-developers%29

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.

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).
Xenland (OP)
Legendary
*
Offline Offline

Activity: 980
Merit: 1003


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


View Profile
April 12, 2013, 08:12:52 AM
Last edit: April 13, 2013, 07:30:29 AM by Xenland
 #93

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.
Xenland (OP)
Legendary
*
Offline Offline

Activity: 980
Merit: 1003


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


View Profile
April 12, 2013, 09:09:40 PM
 #94

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
Xenland (OP)
Legendary
*
Offline Offline

Activity: 980
Merit: 1003


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


View Profile
April 13, 2013, 07:23:58 AM
Last edit: April 13, 2013, 07:41:50 AM by Xenland
 #95

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.
Xenland (OP)
Legendary
*
Offline Offline

Activity: 980
Merit: 1003


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


View Profile
April 16, 2013, 11:00:58 PM
 #96

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!
Xenland (OP)
Legendary
*
Offline Offline

Activity: 980
Merit: 1003


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


View Profile
April 16, 2013, 11:10:44 PM
 #97

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.
SgtSpike
Legendary
*
Offline Offline

Activity: 1400
Merit: 1005



View Profile
April 16, 2013, 11:14:08 PM
 #98

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.
Xenland (OP)
Legendary
*
Offline Offline

Activity: 980
Merit: 1003


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


View Profile
April 16, 2013, 11:57:33 PM
 #99

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
Xenland (OP)
Legendary
*
Offline Offline

Activity: 980
Merit: 1003


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


View Profile
April 17, 2013, 02:59:31 AM
 #100

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.
Pages: « 1 2 3 4 [5] 6 »  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!