Php 比特币很难获得新地址

Php 比特币很难获得新地址,php,bitcoin,Php,Bitcoin,所以我有这个代码: <?php require_once "jsonRPCClient.php"; $bitcoin = new jsonRPCClient("http://user:password@127.0.0.1:28332"); $addr=print_r($bitcoin->getnewaddress (),true); echo "\n"; $received=print_r($bitcoin->getreceivedbyaddress($addr), tr

所以我有这个代码:

<?php 
require_once "jsonRPCClient.php";
$bitcoin = new jsonRPCClient("http://user:password@127.0.0.1:28332");

$addr=print_r($bitcoin->getnewaddress (),true); echo "\n";

$received=print_r($bitcoin->getreceivedbyaddress($addr), true) ;

echo "addr=".$addr; echo "\n";
echo 'recu='.$received; 

$amount=1;
$i=0;

while ( $received < $amount)
{
    $i+=1;
    $received=print_r($bitcoin->getreceivedbyaddress($addr), true);
    sleep(4);

}
print 'done !,'.$received.'BTC received';

?>
当我使用Geany的php“编译器”启动脚本时,它运行得非常好,但不适用于web浏览器。。。 有什么想法吗? 谢谢

您称之为“伪造”的线路会在您的钱包中生成一个新的接收地址。在空钱包中,四核处理器的速率为3/秒,而i3处理器的速率高达50/秒。当更多的地址被添加到你的wallet.dat时,这个速率会下降,所以如果它减慢了这个过程,我想你的wallet.dat文件已经变得相当大了。解决此问题的一种方法是将您的资金转移到另一个钱包,删除wallet.dat文件,下次启动客户端时,将创建一个新的钱包,此过程将运行得更快

$addr=print_r($bitcoin->getnewaddress (),true); echo "\n";