title: Test Rest API with file_get_contents
body: <p>I am having issues testing a rest API. I want to trigger it from PHP by doing a file_get_contents.</p>
  
  <p>This is my code so far</p>
  
  <pre><code>&lt;?php
  $url = 'http://domain:0000/rest/createUser?u=username&amp;p=password&amp;username=testuser&amp;password=testpassword&amp;email=user@domain.co.uk&amp;';
  $encodedUrl = urlencode($url);
  $apicall = file_get_contents($url);
  ?&gt;
  </code></pre>
  
  <p>This URL works from a browser, but as soon as I use file_get_contents it doesn't work.</p>
  
  <p>Could the end server be blocking the use of file_get_contents? If so how? and how can I begin to test and troubleshoot this?</p>