Hello, I'm new to this.
I need to enable my users to change their email passwords using a simple PHP.
So XML-api can help me on this?
If yes, how can I install it? Or it came with cpanel?
I'm using vps cpanel.
Thanks
Hello, I'm new to this.
I need to enable my users to change their email passwords using a simple PHP.
So XML-api can help me on this?
If yes, how can I install it? Or it came with cpanel?
I'm using vps cpanel.
Thanks
Yes, it's easy.
What you'll do is interface with API 1/2 via xml-api. You can pretty much access anything that can be done via the cpanel interface that way.
Since you're using PHP, I'd definitely recommend Matt's PHP XML-API interface:
http://forums.cpanel.net/f42/xml-api...-a-136449.html
For changing passwords, you'll be wanting to look at:
ApiPasswd < ApiDocs/Api2 < TWiki
I hope that helps!
Hello,
XML-API came with cpanel?
Sorry, I did read that post, but still a bit obscure for me.
Hi cix,
The XML-API is a part of WHM/cPanel. It listens for URL requests and will perform actions or give information. These URL requests can be made from any machine, including your cPanel box.
The XML-API has a few functions but it also includes the functionality to perform cPanel's API1 and API2 calls. API1 and API2 calls are what cPanel's Themes and general interface use to fetch information and perform cPanel-user actions.
What Lee has suggested is that you perform an API2 Password::change_password module/function call via Matt's PHP XML-API client class.
All that Matt's class does is provide a convenient object-oriented PHP class that can perform XML-API, API1 or API2 calls. If you aren't familiar with making remote, automated URL queries in PHP, then Matt's class would be very handy since it does all this.
Probably a better resource for the XML-API, what it is, and how it's used is our over at our Developer Docs:
XML and JSON APIs
As well, there should be numerous examples here in the forums about how to use Matt's class for make queries to the XML-API engine.
If you're hosting your PHP application within cPanel you can also use LivePHP or cPanel PHP. LivePHP lets you send API1/2 calls to the local machine, and cuts our the remote call. CPanel PHP is php files that get parse by cPanel before they're parsed by the PHP engine. In this way, you can put API1/2 tags right into you PHP file (just like HTML) and it will works just like any other cPanel Theme or interface (except it's in PHP, not Perl). LivePHP and cPanel PHP are documented also at our documentation center.
Let us know if you need more help.
-Dave
David Neimeyer
Integration Developer
sdk.cpanel.net
APIs: XML-API API1 & API2
Check Out: Developer Downloads Integration Blog
Need Support? Support Ticket Developer Forum Feature Request