monkeyboy71 Posted March 23, 2010 Share Posted March 23, 2010 We have a script using the API getclientsdata function. We pass in an email address - the same exact email address - and about 15% of the time it return "client not found." Anyone else seen this before? Here's out code... $postfields = array(); $postfields["username"] = 'ourname'; $postfields["password"] = md5('ourpass'); $postfields["action"] = "getclientsdetails"; $postfields["email"] = trim('email@domain.com'); $results = callAPI("http://www.oursite.com/folder/api.php",$postfields); function callAPI($url,$postfields) { $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); $data = curl_exec($ch); curl_close($ch); $data = explode(";",$data); foreach ($data AS $temp) { $temp = explode("=",$temp); $results[$temp[0]] = $temp[1]; } return $results; } 0 Quote Link to comment Share on other sites More sharing options...
niels Posted March 23, 2010 Share Posted March 23, 2010 Have not seen that before... I would turn on MySQL logging and check which query WHMCS is sending the database - perhaps that will give some insight. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.