title: Error message '405 method not allowed' when using php cURL with jQuery
body: <p><img src="https://i.stack.imgur.com/xfcJE.png" alt="error message" /></p>
  <p>This is the error message I receive when I try to run my code using jQuery. I don't think there's anything wrong with the jQuery package which would suggest it has something to do with my code.</p>
  <p>Here is my code:</p>
  <pre><code>&lt;?php
  
  
  // ini_set('display errors', 'On');
  // error_reporting(E_ALL);
  
  $executionStartTime = microtime(true) / 1000;
  
  $url= 'http://api.geonames.org/postalCodeCountryInfoJSON?formatted=true' . $_REQUEST['countryName'] . '&amp;username=jessed&amp;style=full';
  
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_URL,$url);
  
  $result=curl_exec($ch);
  
  curl_close($ch);
  
  $decode = json_decode($result,true);
  
  $output['status']['code'] = &quot;200&quot;;
  $output['status']['name'] = &quot;ok&quot;;
  $output['status']['description'] = &quot;mission saved&quot;;
  $output['status']['returnedIn'] = (microtime(true) - $executionStartTime) / 1000 . &quot; ms &quot;;
  $output['data'] = $decode[&quot;geonames&quot;];
  
  
  
  header('Content-Type: application/json; charset=UTF-8');
  
  echo json_encode($output);
  
  ?&gt;
  </code></pre>
  <p>What can I try next?</p>