Jump to content

levelman

Member
  • Posts

    5
  • Joined

  • Last visited

About levelman

levelman's Achievements

Junior Member

Junior Member (1/3)

0

Reputation

  1. I set up a complete automation for Minecraft. Instructions are not very clear. I can share. Add to Skype, I'll send you screenshots of settings. skype geroin.55
  2. curl cURL support enabled cURL Information 7.22.0 Age 3 Features AsynchDNS No Debug No GSS-Negotiate Yes IDN Yes IPv6 Yes Largefile Yes NTLM Yes SPNEGO No SSL Yes SSPI No krb4 No libz Yes CharConv No Protocols dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, pop3, pop3s, rtmp, rtsp, smtp, smtps, telnet, tftp Host x86_64-pc-linux-gnu SSL Version OpenSSL/1.0.1 ZLib Version 1.2.3.4
  3. phpinfo curl cURL support enabled cURL Information 7.22.0 Age 3 Features AsynchDNS No Debug No GSS-Negotiate Yes IDN Yes IPv6 Yes Largefile Yes NTLM Yes SPNEGO No SSL Yes SSPI No krb4 No libz Yes CharConv No Protocols dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, pop3, pop3s, rtmp, rtsp, smtp, smtps, telnet, tftp Host x86_64-pc-linux-gnu SSL Version OpenSSL/1.0.1 ZLib Version 1.2.3.4
  4. And i have this error in version 5.2.3.
  5. API REWQEST <?php /* * ** WHMCS JSON API Sample Code *** */ $url = "http://bp.craftgamer.ru/includes/api.php"; # URL to WHMCS API file goes here $username = "******"; # Admin username goes here $password = "******"; # Admin password goes here $postfields = array(); $postfields["username"] = $username; $postfields["password"] = md5($password); $postfields["action"] = "addclient"; $postfields["firstname"] = "Test"; $postfields["lastname"] = "User"; $postfields["companyname"] = "WHMCS"; $postfields["email"] = "demo@whmcs.com"; $postfields["address1"] = "123 Demo Street"; $postfields["city"] = "Demo"; $postfields["state"] = "Florida"; $postfields["postcode"] = "AB123"; $postfields["country"] = "US"; $postfields["phonenumber"] = "123456789"; $postfields["password2"] = "demo"; $postfields["currency"] = "1"; $postfields["responsetype"] = "json"; $query_string = ""; foreach ($postfields AS $k => $v) $query_string .= "$k=" . urlencode($v) . "&"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $query_string); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); $jsondata = curl_exec($ch); if (curl_error($ch)) die("Connection Error: " . curl_errno($ch) . ' - ' . curl_error($ch)); curl_close($ch); $arr = json_decode($jsondata); # Decode JSON String print_r($arr); # Output XML Response as Array echo "<textarea rows=50 cols=100>Request: ".print_r($postfields,true); echo "\nResponse: ".htmlentities($jsondata)."\n\nArray: ".print_r($arr,true); echo "</textarea>"; ?> Request: Array ( [username] => AdminApi [password] => 5fe03afff2a1d66efa255610fa79fb47 [action] => addclient [firstname] => Test [lastname] => User [companyname] => WHMCS => demo@whmcs.com [address1] => 123 Demo Street [city] => Demo [state] => Florida [postcode] => AB123 [country] => US [phonenumber] => 123456789 [password2] => demo [customfields] => YToxOntpOjE7czo2OiJHb29nbGUiO30= [currency] => 1 [responsetype] => json ) Response: {"result":"error","message":"1 Invalid Select Option<\/li>"} Array: stdClass Object ( [result] => error [message] => 1 Invalid Select Option</li> [result] => error [message] => 1 Invalid Select Option</li> - What is? All functions work but add client is not work
×
×
  • 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