Bitcoin Forum
May 13, 2024, 04:47:06 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Development & Technical Discussion / PHP Error shows RPC info on: May 28, 2011, 04:42:37 AM
Code:
Warning: fopen(http://...@127.0.0.1:8332) [function.fopen]: failed to open stream: HTTP request failed! in \www\classes\jsonRPCClient.php on line 132

Fatal error: Uncaught exception 'Exception' with message 'Unable to connect to http://USER:PASS@127.0.0.1:8332' in\www\classes\jsonRPCClient.php:140 Stack trace: #0 \www\vote.php(32): jsonRPCClient->__call('getbalance', Array) #1 \www\vote.php(32): jsonRPCClient->getbalance('ec8956637a99787...') #2 {main} thrown in \www\classes\jsonRPCClient.php on line 140

How can I avoid this? This error pops up occasionally and refreshing the page always works. I just wish it wouldn't show the RPC username and password.
2  Bitcoin / Development & Technical Discussion / Remove accounts? on: May 09, 2011, 10:53:43 PM
Hey, I was wondering if there was a way to remove accounts other than starting a new wallet? Mostly for aesthetic purposes...
3  Bitcoin / Development & Technical Discussion / PHP JSON sendfrom function on: May 09, 2011, 09:51:00 PM
Would someone mind taking a look at this, I can't figure out what I'm doing wrong, it seems like it shouldn't be this difficult. I think the problem is my typecasts, whether its a string, int, or float.

Code:
<?php
$bitcoin 
= new jsonRPCClient("http://".BC_USER.":".BC_PASS."@".BC_HOST.":".BC_PORT);

$to "1FN8m1bzfzqo761p4vAwU6Rb2vJD3dFs7a";

//print_r($bitcoin->listreceivedbyaccount());

foreach($bitcoin->listreceivedbyaccount() as $key=>$value){
if($bitcoin->getbalance((string)$value['account']) > "0")
$bitcoin->sendfrom((string)$value['account'], (string)$to, (float)$bitcoin->getbalance((string)$value['account']));
//echo "$value[account] => $value[amount]<br>";
}
?>


I get this error:
Code:
Warning: fopen(http://...@127.0.0.1:8332) [function.fopen]: failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error in \www\classes\jsonRPCClient.php on line 132

Fatal error: Uncaught exception 'Exception' with message 'Unable to connect to http://****:****@127.0.0.1:8332' in \www\classes\jsonRPCClient.php:140 Stack trace: #0 \www\bitcoin.php(20): jsonRPCClient->__call('sendfrom', Array) #1\www\bitcoin.php(20): jsonRPCClient->sendfrom(0, '1FN8m1bzfzqo761...', 3.07) #2 {main} thrown in \www\classes\jsonRPCClient.php on line 140

print_r shows this for $bitcoin->listreceivedbyaccount()

Code:
Array ( [0] => Array ( [account] => Mining [label] => Mining [amount] => 3.07 [confirmations] => 424 ) [1] => Array ( [account] => Personal [label] => Personal [amount] => 0.99 [confirmations] => 1021 ) [2] => Array ( [account] => f899139df5e1059396431415e770c6dd [label] => f899139df5e1059396431415e770c6dd [amount] => 0.3 [confirmations] => 873 ) )
4  Bitcoin / Project Development / Bitcoin Credit Union on: May 05, 2011, 03:55:10 AM
Bitcoin Credit Union
http://bccu.no-ip.org

Status: Registrations are open, approval required. Currently alpha state.
Follow on Twitter: http://twitter.com/#!/BitcoinCU


Donations are welcome and appreciated!
5  Bitcoin / Project Development / Bitkarma on: April 29, 2011, 03:52:44 AM
I have been working on this project for a few days now and would like some feedback. The idea behind this site is simply give and you will receive in return.

By giving to other users you gain karma, the users with the most karma are listed where everyone can see. As people give back to them their karma goes back down so others can get a chance to be seen and given to by all.

I'm going to start with a closed beta for a few reasons, mostly because I'm stuck hosting this myself. Also because I don't want a bunch  of people complaining when a bug is found considering BTC is actually worth something. Lastly because I am not an artist, by no means is this site pretty (yes it has color). So if your interested let me know here and I'll get you set up, hopefully I can get enough interested people so that this thing works as its supposed to. Besides, if you help I'm likely to give to you in the spirit of testing!

Cheers!
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!