I don't want the script to output anything unless there is an error (when it's successful, it's redirected to another page). So, I need to test the success of file_get_contents($script.$params). So, what is the output of $result when it is and is not successful?

I don't want the script to output anything unless there is an error (when it's successful, it's redirected to another page). So, I need to test the success of file_get_contents($script.$params). So, what is the output of $result when it is and is not successful?

Angela

Click to expand...

That script is incompatible with contemporary versions of cPanel&WHM, especially servers where CSRF protection is enabled. I would advise you use our APIs rather than something like that which calls a URL directly and thus sends your username and password in plain text (a very bad idea).

I assume you're programming in PHP. You can download a PHP class which includes a call to creating an account as part of its examples, this can be downloaded from: http://github.com/CpanelInc/xmlapi-php