php - Whcms domain whois API doesn't work -


so here code:

<?php  $url = "http://www.site.com/whcms/includes/api.php"; # not original url, 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 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 = curl_exec($ch); curl_close($ch);  echo(var_dump($data)); ?> 

i this: string(44) "result=error;message=invalid ip 89.24.47.30;"

what i'm doing wrong?

solution found!

go admin panel, general settings -> security , add ip address


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -