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.

Domain parking API

Discussion in 'cPanel Developers' started by nibb, Jan 28, 2012.

  1. nibb

    nibb Well-Known Member

    Joined:
    Mar 22, 2008
    Messages:
    301
    Likes Received:
    1
    Trophy Points:
    18
    Is it possible to park/unpark domains from a list via the API?

    I have a list of domains which I need to automatically park in a cPanel account. Instead of adding them manually I want to run a script that will park them automatically and have another one to remove them.

    Is this possible?
     
  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
    Yes this is possible.

    If you are familiar with PHP, we have park() and unpark() functions in the xmapi.php class available at https://github.com/CpanelInc/xmlapi-php/blob/master/xmlapi.php that you can call from your own PHP scripts. The PHP class helps with authenticating into the cPanel&WHM server, and calling API1/API2 functions like this via the XML API. Refer to the example files at https://github.com/CpanelInc/xmlapi-php for insight on how to use this class.
     
Loading...

Share This Page