我试图使用BlockCypher API接受以太坊。从他们的文档(https://dev.blockcypher.com/eth/#address-endpoint),他们要求发送一个cURL请求来获取地址。PHP cURL发布API
我已经试过这样: -
<?php
$a = "https://api.blockcypher.com/v1/eth/main/addrs?token=my_token";
$b = file_get_contents($a);
var_dump($b);
?>
这给了我这个错误: -
Warning: file_get_contents(https://api.blockcypher.com/v1/eth/main/addrs?token=my_token): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in C:\wamp\www\x\backend\dev\t.php on line 3
如果我尝试直接在网页上运行的URL,我得到这个错误: -
Endpoint not found. Please check your URL for typos and make sure you're using the correct HTTP method (GET, POST, etc).
我在做什么错?
使用了错误的网址是什么?我假设你已经审查了你的实际标记,并且没有真正将'my_token'发送给服务? –
@MarcB 正确,我刚刚审查过它。实际上,我在那里使用了我的原始令牌。 – RobertPuerco