The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Getting CPanel Information with PHP

Discussion in 'cPanel Developers' started by arpowers, Apr 26, 2009.

  1. arpowers

    arpowers Registered

    Joined:
    Apr 25, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hi,
    I am programming a Wordpress plugin that gets cpanel information from users.

    I am using PHP.

    Is there an easy way of getting this information off of the cpanel without using regular expressions (all I've been able to find)...

    For example, I have figured out how to add emails and forwarders; but not list them or delete them.

    Thanks a lot for your help!

    Andrew
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    You may want to use API1 and API2 via our XML API. You can use it over port 2082 (port 2083 if using SSL) with the user's cPanel credentials.

    How to delete a forwarder:
    http://forums.cpanel.net/showpost.php?p=464953&postcount=5

    For listing forwarders:
    http://twiki.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/Api2ListForwarders

    For information on calling these functions via the XML API, you can review our documentation at: http://twiki.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/CallingAPIFunctions

    Alternatively, you can find a pre-assembled PHP 5 class for calling these functions at: http://forums.cpanel.net/showthread.php?t=111897
     
Loading...

Share This Page