title: Curl error: Could not resolve host: www.localhost
body: <p>I get an error could not resolve <code>host:www.localhost</code>. I don't know why it is coming.</p>
  
  <pre><code>$url ="http://www.localhost:81/dbWIP/selectApi.php?name=".$name;
  $client = curl_init();
  echo $client;
  curl_setopt($client, CURLOPT_URL,$url);
  curl_setopt($client,CURLOPT_RETURNTRANSFER,true);
  curl_setopt($client, CURLOPT_HEADER, false);
  $response = curl_exec($client);
  curl_close($client);
  echo $response
  $result = json_decode($response);
  </code></pre>