title: API : How to put useragent into url GET?
body: <p>In php I would like to use API like this : <code>website.com/api.php?ip=$ip&amp;ua=$useragent</code>.</p>
  <p>However, with the useragent, variable $response return nothing (it displays nothing as if it was null).</p>
  <p>I had tried with only IP address alone and it works fine.</p>
  <p>My code :</p>
  <pre><code>$useragent = $_SERVER['HTTP_USER_AGENT'];
  $ip = $_SERVER['REMOTE_ADDR'];
  $query = 'https://website.com/api.php?ip='.$ip.'&amp;page='.$useragent;
  $response = file_get_contents($query);
  echo $response;
  ?&gt;
  </code></pre>
  <p>I think it's because of the characters in useragent, do you have any idea how to fix it?
  Thanks</p>