Fix Cpanel API Code


I’m facing strange problem. I hope you can solve it.

The following code is to create database for cpanel remotely using Cpanel API:


include("[url removed, login to view]");

$db_host = "[url removed, login to view]";

$cpaneluser = "cpanelusername";

$cpanelpass= "cpanelpassword";

$xmlapi = new xmlapi($db_host);

$xmlapi->set_port( '2082' ); // PORT SETTING


$xmlapi->set_debug(1);//output actions in the error log 1 for true and 0 false

$xmlapi->set_output('array');//set this for browser output

//create database


$createdb = $xmlapi->api1_query($cpaneluser, "Mysql", "adddb", array($databasename));

echo "Good Job";


This work fine IF I set

Server Configuration »Tweak Settings » Security »Tweak Settings» Require SSL  OFF

However, I want it through secure connection. So I modified the code to use port 2083 instead ($xmlapi->set_port( '2083' ); // PORT SETTING).

But, it does not work (connection time out). Same problem happened even If I modified the server configuration to require SSL:

Server Configuration »Tweak Settings » Security »Tweak Settings» Require SSL  ON

Any help, idea. Can you fix it?

Habilidades: PHP, Hospedagem Web

Veja mais: you fix it, you fix, fix it fix it fix it, cpanel mysql database, secure api, create cpanel, API connection, cpanel api php, server configuration problem, cpanel php configuration, mysql connection error, mysql database connection error, swt browser api, browser api vb6, ssl problem solve, php cpanel api, create ssl connection, rest api cpanel, api code, mysql ssl connection, cpanel php api, fix strange database output, fix cpanel mysql, secure php api, cpanel ssl

Acerca do Empregador:
( 2 comentários ) Mecca, Saudi Arabia

ID do Projeto: #6823481

Concedido a:


Hired by the Employer

$12 USD / hora
(2 Comentários)