MyPW Developer Resources

MyPW Example: PHP


This example is based on the Incutio XML-RPC library for PHP.
Sample Code
    include('IXR_Library.inc.php');

    $client = new IXR_Client('https://services.mypw.com/RPC2');

    $struct = array (
        "siteid"     => MySiteId,
        "authkey"    => MyAuthKey,
        "tokenid"    => TokenID,
        "tokenvalue" => CurrentTokenValue
    );

    $client->query('auth.auth', $struct);
    $response = $client->getResponse();

    if ($response["code"] == 0) { 
        // success!
    }
    else { 
        // failure, see message for details
        print($response["message"]);
    }

 
Google Groups Beta
Subscribe to MyPW Developers
Email:
Visit this group
Have you created a bit of code that might be of interest to other MyPW developers? Post it on MyPW google groups.