我正在使用区块链API为每个钱包生成一个新地址。
下面是代码:为区块链钱包生成新地址
<?php
$guid = "7c74bb77-4e25-4eea-a9d3-df1cf6a9d218";
$main_password = "******";
$label = "firsttym";
$json_url = "http://localhost:3000/merchant/$guid/new_address?
password = $main_password & label = $label";
$json_data = file_get_contents($json_url);
$json_feed = json_decode($json_data ,true);
$message = $json_feed->message;
$txid = $json_feed->tx_hash;
?>
它总是返回此警告:
Warning: file_get_contents(localhost:3000/merchant/7c74bb77-4e25-4eea-a9d3-df1cf6a9d218/…) [function.file-get-contents]: failed to open stream:
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.in C:\wamp\www\block\first.php on line 8
Fatal error: Maximum execution time of 30 seconds exceeded in C:\wamp\www\block\first.php on line 8
它总是返回:Warning:file_get_contents(http:// localhost:3000/merchant/7c74bb77-4e25-4eea-a9d3-d f1cf6a9d218/new_address?password = hasnisidra17&label = firsttym)[function.file-get-contents]:无法打开流:连接尝试失败,因为连接方在一段时间后没有正确响应,或者由于连接的主机没有回应。在第8行的C:\ wamp \ www \ block \ first.php上 致命错误:在第8行的C:\ wamp \ www \ block \ first.php中超过了30秒的最大执行时间 –
将编辑这个问题,我可以看到在问题中有几个语法错误...在我的编辑被批准后(如果你愿意,你可以这样做),请确保这些错误不在你的实际代码中,然后编辑这个答案修复它们。 – JustCarty