Question: I want obtain some geolocation informations using a external service (website service), but this works fine only in my pc (localhost using `WampServer` http client); already when my php file is transfered for a remote host (pc), it fails for get these information. Already tried several services of hosts, but still without success.

> 
> PS: My reference of website was [http://ip-api.com/](http://ip-api.com/docs/api:serialized_php).
> 
> 
> 

Here is my code:

```
$ip = $_REQUEST['REMOTE_ADDR']; 
$query = @unserialize(file_get_contents('http://ip-api.com/php/'.$ip));

if($query && $query['status'] == 'success') {

  $regiao = $query['regionName'];
  $cidade = $query['city'];
  $isp = $query['isp'];
  $sigla_regiao = $query['region'];
} 
else {
  echo '';
}

```

So, someone have some ideia why this api don't works in a remote host?

Thanks in advance.

Answer: 
Wordpress has a function for this `sanitize_title` 

```
 sanitize_title( the_sub_field('block_title') );

```

Source: <https://codex.wordpress.org/Function_Reference/sanitize_title>
Ok, so you guys helped me get in the right path. 

The solution was using "sanitize\_title". Working code is:

```
<?php echo sanitize_title(get_sub_field('block_title')); ?>

```

Thanks!