title: WHM add all domains in hosts file to make CURL work
body: <p>I am creating domains using WHM Cpanel API and everything is working fine. Domain are being created properly.
  My issue is when I try to do a curl request on the new domain it does not work. So I then add the new domain name in /etc/hosts file and then the CURL starts working for that domain.</p>
  
  <p>For example I created <code>www.newdomain.info</code> through API and everything goes fine and the website is also running fine. I want to make some changes through curl to <code>www.newdomain.com</code>. The curl does not work. After I add it to <code>/etc/hosts</code> file the curl work fine.
  I add this line to hosts file to make curl work</p>
  
  <pre><code>192.162.0.5     newdomain.info www.newdomain.info
  </code></pre>
  
  <p>My issue is I cannot keep on adding these lines everytime a new domain is created. May be in a single day 100's of websites can be created. I want a way so that PHP CURL works on all domains on a server. May be by adding some line in hosts file??</p>