Question: 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?

Answer: 
`\` is escape character , this won't affect your output. 

From [PHP escape sequences](http://php.net/manual/en/regexp.reference.escape.php)

> 
> The backslash character has several uses. Firstly, if it is followed
>  by a non-alphanumeric character, it takes away any special meaning
>  that character may have. This use of backslash as an escape character
>  applies both inside and outside character classes.
> 
> 
> 

Yes, you can add some options while using [`json_encode`](http://php.net/manual/en/function.json-encode.php) , give it a try, may helps you

```
json_encode($response, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES );

```
If you want to remove the backslashes, you can use [str\_replace()](http://www.php.net/manual/en/function.str-replace.php)

```
$str2 = str_replace ('\\', '', $response);

```

By the way, I tried decoding your string with `json_decode()` and received the correct information (without the extra `\`) when doing var\_dump():

```
class stdClass#1 (4) {
  public $input_address =>
  string(34) "1MtYhCDEq1euiV7PjL58XtjfwTgX3Bqqpe"
  public $callback_url =>
  string(72) "http://myurlcantseeit.me/gg/blockchain_callback.php?secret=cantletyousee"
  public $fee_percent =>
  int(0)
  public $destination =>
  string(34) "16qVmcFj6EergwQuiXLqHucBC2BZzdpMfo"
}

```