Author

Topic: Blockchain-API Problem (Read 384 times)

full member
Activity: 346
Merit: 102
February 27, 2017, 08:38:08 AM
#1
I want use Blockchain API on my local raspberry pi host... Blockchain wallet service run normally but, when i send php request, i see this error on console:

Code:
error: Unable to establish session

and on php;

Code:
array(1) {

["error"]=> string(34) "Unexpected error, please try again" }

Please help me, how can i fix this error...

My Php;

Code:
$url = "http://127.0.0.1:3000/merchant/MY-GUID/login?password=MYPASS&api_code=MY-API-CODE";
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, $url);
$ccc = curl_exec($ch);
$json = json_decode($ccc, true);
echo "
";
var_dump($json);
echo "
";

Please help me, I have v2 API Code...
Jump to: