Questions tagged [cpanel-xmlapi]

A PHP Class for Interacting with cPanel's XML-API. This is the cPanel XMLAPI Client Class.

This is the cPanel XMLAPI Client Class. This class allows for easy interaction with cPanel's XML-API allow functions within the XML-API to be called by calling funcions within this class.

38 questions
4
votes
1 answer

Cpanel xmlapi FileUpload not working properly

include '../xmlapi.php'; $ip = 'www.example.com'; $root_pass = 'abc'; $domain = "www.example.com"; $xmlapi = new…
3
votes
1 answer

How to create database programmatically in WHM/Cpanel using php code?

I had xmlapi code before 1.5 years ago and working perfectly till 6 months before. Suddenly, it stopped working with no error. Now, I read that xmlapi has been deprecated and uapi is being used. Now, I prepare code as per - cpanel-UAPI-php-class…
Veshraj Joshi
  • 3,544
  • 3
  • 27
  • 45
3
votes
1 answer

PHP Cpanel_PublicAPI Create Account passing incorrect variables

I am sorry if this request is in the wrong area. I am learning to use PHP and the CPanel API. I've got the following code and it's giving me a stack error because I am missing something seemingly simple $domain = array('username' => 'bobbie',…
Bobbie
  • 45
  • 4
3
votes
1 answer

list subdomain of a domain using cpanel xml api php

I am using cpanel xml api. https://github.com/CpanelInc/xmlapi-php i can create subdomains and delete them. Now i want to list the subdomains. Here is the Answer in API1 level $listSubdomain = $xml->api1_query( $cp_un, 'SubDomain',…
2
votes
2 answers

Can I login to cPanel through PHP?

I want to login at cPanel through Php script and need to modified some file from the file manager. I have cPanel username and password also but file modification I want through PHP script no by graphically. I will use file_put_content for modified…
amrut ratnani
  • 21
  • 1
  • 2
2
votes
1 answer

how to use Single Sign On to login user to cpanel?

I'm trying to implement this exact feature on my web app as used by whm. Please check this image I read documentation for Single Sign On api and came up with following code:
gondu riya
  • 49
  • 2
  • 6
2
votes
0 answers

access denied error while creating email account using xmlapi

I want to create email account using php. I tried xmlapi for this but it always shows access denied error. Is there any idea for this error ... here is my code include("xmlapi.php"); $ip = "*****"; $account = "*****"; $passwd ="*****"; $port…
2
votes
0 answers

How to assign privilage to dynamically created database on C panel phpmyadmin.... programmatically using php

Actually I want to create database on my server dynamically while running a web page using php. when code behind of web page got executed I found newly created database, Code for creating dynamic database working fine... But problem is that I am…
Santosh Yadav
  • 338
  • 2
  • 4
  • 15
1
vote
1 answer

Create Email account using PHP script in Bluehost CPanel

I am trying to creating the email account using PHP script in bluehost server. I tried so many script, but it response came either "Access Denied" or…
Abdul Kadhar
  • 53
  • 2
  • 8
1
vote
0 answers

Is there a method to create a redirect using a Cpanel API?

Using Cpanel xMLAPI Client Class or Cpanel API 1 or 2 or any other method - looking for a way to redirect a url using PHP. I assume any of these methods just adds to a mod_rewrite in .htaccess file. ex. mysite.com/myfolder ->…
WGS
  • 199
  • 4
  • 17
1
vote
1 answer

cPanel Parked Domains Not returning array

A password was changed and cPanel broke. Fixed the password and it's still broken! I have to iterate over parked domains. I've verified the user / password combination is correct via PuTTY.
John
  • 1
  • 13
  • 98
  • 177
1
vote
1 answer

How to connect on dynamic database in php using online cPanel database

In my web app I have 2 different connections the main connection and the dynamic database.I used the main connection to create new database with tables and I used dynamic to switch database when user is already login.I already did this in localhost…
jaZzZ
  • 127
  • 12
1
vote
1 answer

WHM api request return "Token denied" :/

I try get account list on WHM. But my access code doesn't work. Request url return; {"cpanelresult":{"apiversion":"2","error":"Token denied","data":{"reason":"Token denied","result":"0"},"type":"text"}} My code…
İsmet
  • 95
  • 3
  • 12
1
vote
1 answer

cpanel access files from server IP address

My domain is expired. How can I access files from IP address? I tried this url: http://31.220.105.186/~shopn780/public_html/index.html Where 31.220.105.186 is IP address, shopn780 is my username... 2-3 years ago I can do it like this. But now, I…
Aykhan Amiraslanli
  • 593
  • 2
  • 8
  • 22
1
vote
1 answer

CpanelInc -xmlapi-php "No host defined" Error

Recently I am trying to create an database and its user with help of this class. And I tried the following code. include_once("xmlapi.php"); // this can be downlaoded from https://github.com/CpanelInc/xmlapi-php/blob/master/xmlapi.php $ip =…
Kvvaradha
  • 732
  • 1
  • 13
  • 28
1
2 3