To use API I have to have PHP and Curl installed?

glenn0

Well-Known Member
Jul 23, 2012
67
2
8
cPanel Access Level
Website Owner
I have had a app made for me so I can add/remove lists of subdomains from my desktop. The developer has completed it for me (in Java) but said I need to install PHP and Curl for it to work. Is there no way around this? Is there no way a simple desktop app can create subdomains without using PHP and Curl (I have winXP)?

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Hello :)

It's possible to use other programming languages (e.g. Perl) if you prefer to avoid using PHP. This would have to be considered during the development of the application. General documentation on creating software that interacts with cPanel/WHM is available at:

cPanel & WHM's Software Development Kit

Thank you.
 

KostonConsulting

Well-Known Member
Verifed Vendor
Jun 17, 2010
255
1
68
San Francisco, CA
cPanel Access Level
Root Administrator
I have had a app made for me so I can add/remove lists of subdomains from my desktop. The developer has completed it for me (in Java) but said I need to install PHP and Curl for it to work. Is there no way around this? Is there no way a simple desktop app can create subdomains without using PHP and Curl (I have winXP)?

Thank you.
The cPanel/WHM API is not tied to a specific programming language. All calls can be accessed via POST requests to URLs in ANY programming language. For example, adding a subdomain is just calling this URL with some variables (denoted by $):

https://yourhostname.com:2087/json-api/cpanel?user=$username&cpanel_jsonapi_module= SubDomain&cpanel_jsonapi_func=addsubdomain&cpanel_jsonapi_version=2&domain=$sub&rootdomain=$domain

If the code is written in Java, you should not have to install PHP and Curl on your desktop. If your developer is requesting installation of PHP and Curl, the code is likely written in PHP, not Java.