API:listaccts

From TheHostingTool Wiki
Revision as of 18:09, 14 February 2010 by Simmaster (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Usage

Parameters

  • None

Output

<listaccts>
        <acct>
            <id>1</id>
            <userid>stuff</userid>
            <email>email@gmail.com</email>
            <signup>Date</signup>
            <ip>192.168.1.2</ip>
            <domain>somewhereovertherainbow.com</domain>
            <pid>1</pid>
            <status>Suspended</status>
            <additional></additional>
        </acct>
</listaccts>

Example

<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://mydomain.tld/THT_DIR/xml-api/listaccts/auth_hash');
$val = curl_exec($ch);
curl_close($ch);
$xml = new SimpleXMLElement($val);
unset($val);
echo $xml->acct[0]->domain[0];
?>

Example Output

somewhereovertherainbow.com