title: add domain to server with php that points to a certain folder
body: <p>Im making some sort of CMS with server side PHP,</p>
  
  <p>1.How do i with PHPadd the user's domain to the NS records and direct it to they'r folder in the server?</p>
  
  <p>2.what this operation is called? i been Googleing this for 2 days now with no success due to the high advertisement on "domains" keywords.</p>
  
  <p>EDIT:
  from what i understand now i need to API interface with CPanel, so i got my starting point, does anyone have a simple example on how to add a domain successfully with cpanel, none of what i tried work and thats after reading in the documentation and trying theyr examples.</p>