Jump to content

kferoz

Member
  • Posts

    1
  • Joined

  • Last visited

About kferoz

kferoz's Achievements

Junior Member

Junior Member (1/3)

0

Reputation

  1. Hi, "GetClientsProducts" API is giving error ("Error generating JSON encoded response: Malformed UTF-8 characters") with few records and working fine with other set of records in the same database. Also it works fine when I comment the code i.e. "'responsetype' => 'json'". With this change it works with all records and showing result in XML type. For my application, I need result in JSON format which I'm not able to do. Code is; function get_clientproducts($url, $ide, $sec, $cid) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query( array( 'action' => 'GetClientsProducts', 'username' => $ide, 'password' => $sec, 'clientid' => $cid, 'stats' => true, // 'responsetype' => 'json', ) ) ); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $response = curl_exec($ch); curl_close($ch); return $response; }
  2. Welcome to WHMCS.Community kferoz! We're glad you're here please take some time to familiarise yourself with the Community Rules & Guidelines and take a moment to introduce yourself to other WHMCS.Community members in the Introduce Yourself Board.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated