Created
August 19, 2022 09:47
-
-
Save stefanpejcic/abc0816663bde0598c2abd19d3c1039e to your computer and use it in GitHub Desktop.
WHMCS - get user data from the url
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// include whmcs | |
require_once $_SERVER['DOCUMENT_ROOT'].'/init.php'; | |
/** | |
* WHMCS Sample Local API Call | |
* | |
* @package WHMCS | |
* @author WHMCS Limited <development@whmcs.com> | |
* @copyright Copyright (c) WHMCS Limited 2005-2016 | |
* @license http://www.whmcs.com/license/ WHMCS Eula | |
* @version $Id$ | |
* @link http://www.whmcs.com/ | |
*/ | |
// get url and parse client ID string from the url | |
$url = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; | |
parse_str(parse_url($url)['query'], $params); | |
$command = 'GetClientsDetails'; | |
$postData = array( | |
'clientid' => $params['clientid'], | |
'stats' => true, | |
); | |
$results = localAPI($command, $postData); | |
print '<pre>'; | |
print_r($results); | |
print '</pre>'; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment