Okay So basicly here is the code: <?php $url = "http://www.****.com/billing/includes/api.php"; $username = "*****"; $password = "*****"; $postfields["username"] = $username; $postfields["password"] = $password; $postfields["action"] = "gettickets"; $postfields["status"] = "Awaiting Reply"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 100); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); $xml = curl_exec($ch); ?> Code (markup): Okay, So Im using the WHMCS API, and I want it to display totalresults part. The API details are here: http://docs.whmcs.com/API:Get_Tickets Thanks Connor
I'm not sure what your code has to do with the API page, though sending values to a undefined variable as array indexes can have unforseen consequences... Though I didn't think 0 was a valid value for CURLOPT_SSL_VERIFYHOST or VERIFYPEER, or at the very least was bad/piss poor security... are you forgetting to MD5 the PW since WHMCS' examples show to do that? Also, doesn't addinvoicepayment require an 'amount' value? Also, what errors is it outputting/reporting? It's not entirely clear what you are even asking for.