Jump to content

nickwuk

Member
  • Posts

    3
  • Joined

  • Last visited

Everything posted by nickwuk

  1. I've setup a Client in WHMCS and when logged in as the Client in the open new ticket page the name and email address fields are read only. What should I do if there are several people from one company who may want to submit support tickets? I've setup a contact but that made no difference.
  2. Support kindly solved this for me as follows: Apparently there is an issue with WHMCS v5.3.8 where the api function requires Php v5.3.7 or higher, and my Php is v5.2.14, however support have a patch which they applied and now it works. They also changed my url from being relative to be full.
  3. I'm trying to test the api and to do this I've tried getting the whois data for an arbitrary domain in php as follows but no data is returned. The script php script is below. I've added the website server IP to the allowed list so no errors seem to be generated, just no response. The user is the main top level user and has API access ticked in the roles. Any ideas please? <?php $url = "/billing/includes/api.php"; # URL to WHMCS API file $username = "myusername"; # Admin username goes here $password = "mypassword"; # Admin password goes here $postfields["username"] = $username; $postfields["password"] = md5($password); $postfields["action"] = "domainwhois"; $postfields["domain"] = "test.com"; $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]; } if ($results["result"]=="success") { # Result was OK! echo "OK"; } else { # An error occured echo "The following error occured: ".$results["message"]; } echo '<br>data:<br>'; print_r($data); ?>
×
×
  • 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