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.

Parked domains (XMLAPI)

Discussion in 'cPanel Developers' started by techteen, Nov 13, 2009.

  1. techteen

    techteen Active Member

    Joined:
    Jul 31, 2004
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Hello all,

    I am using the XMLAPI php class, and i think i am confused some wheres. From what i been reading, i cna some how use this script to add a park domain to a cpanel account. Can someone point out to me how? i dont see how too well in the docs.
     
  2. techteen

    techteen Active Member

    Joined:
    Jul 31, 2004
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Hello all,

    this is what i came up with and it works, but is it the best option i have?

    Code:
    if ($action == "park" ) {
    
    $args = array( domain => $domain );
    
    print $xmlapi->api2_query($username, 'Park', 'park', $args);
    
    } elseif ($action == "unpark") {
    
    $args = array( domain => $domain );
    
    print $xmlapi->api2_query($username, 'Park', 'unpark', $args);
    
    } else {
    die("No aciton defined");
    }
     
Loading...

Share This Page