I'm tesitng a callback and it's adding unnecessary slashes which is impeding upon the API's ability to successfuly communicate with my server. Why is it appending these slashes and how can I remedy the situation? Code below:
<?php
$real_secret = 'cantletyousee';
$my_address = '16qVmcFj6EergwQuiXLqHucBC2BZzdpMfo';
$my_callback_url = 'http://myurlcantseeit.me/gg/blockchain_callback.php?secret=' . $real_secret;
$root_url = 'https://blockchain.info/api/receive';
$parameters = 'method=create&callback='. urlencode($my_callback_url) . '&address=' . $my_address;
$response = file_get_contents($root_url . '?' . $parameters);
var_dump($response);
$object = json_decode($response);
?>
The var dump is returning: string(203) "{"input_address":"1MtYhCDEq1euiV7PjL58XtjfwTgX3Bqqpe","callback_url":"http:\/\/myurlcantseeit.me\/gg\/blockchain_callback.php?secret=cantletyousee","fee_percent":0,"destination":"16qVmcFj6EergwQuiXLqHucBC2BZzdpMfo"}"
I replaced the secret and my site's URL with dummy information to keep it private - that won't make a difference.
As you can see, it should be http://myurlcantseeit.me/gg/blockchain_callback.php?secret=cantletyousee, but it's adding backslashes everywhere.
Why and how can I fix this?