Whcms domain whois API doesn't work

osamabinary

New Member
So here is my code:\[code\]<?php$url = "http://www.site.com/whcms/includes/api.php"; # This is not the original url, just an exapmle$username = "user"; # Admin username goes here$password = "pass"; # Admin password goes here$postfields["username"] = $username;$postfields["password"] = md5($password);$postfields["action"] = "domainwhois"; #action performed by the API:Functions$postfields["domain"] = "whmcs.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 = http://stackoverflow.com/questions/3826529/curl_exec($ch);curl_close($ch);echo(var_dump($data));?>\[/code\]I get this: \[code\]string(44) "result=error;message=Invalid IP 89.24.47.30;"\[/code\]What I'm doing wrong?
 
Back
Top