Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    cix
    cix is offline
    Member
    Join Date
    Nov 2003
    Posts
    75

    Default Simple question on xml-api

    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

  2. #2
    Member
    Join Date
    May 2008
    Posts
    30

    Default

    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!

  3. #3
    cix
    cix is offline
    Member
    Join Date
    Nov 2003
    Posts
    75

    Default

    Hello,

    XML-API came with cpanel?

    Sorry, I did read that post, but still a bit obscure for me.

  4. #4
    Integration Developer cPanelDavidN's Avatar
    Join Date
    Dec 2009
    Location
    Houston, TX
    Posts
    525

    Default

    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

Similar Threads & Tags
Similar threads

  1. WHM XML API Question
    By sirbrent in forum cPanel Developers
    Replies: 1
    Last Post: 01-03-2011, 07:23 PM
  2. Security Question, xml-api, api2
    By willsmelser in forum cPanel Developers
    Replies: 3
    Last Post: 12-24-2009, 11:58 PM
  3. XML-API is any of these possible?
    By neo4242002 in forum cPanel Developers
    Replies: 3
    Last Post: 03-17-2008, 01:46 PM
  4. XML API: always get login screen, not XML
    By sldff3ald in forum cPanel Developers
    Replies: 3
    Last Post: 09-19-2007, 09:29 AM
  5. XML::Simple Installation Problems after Fresh CentOS 4.4 Install
    By niatech in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 02-20-2007, 06:40 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube