I can't connect to Resellerclub API

Posted on 2012-08-23
Last Modified: 2012-08-24
Hi,  I am trying to connect from a PHP script to API, but It display the following message:

"couldn't connect to host"

I have already read API guide, my Server IP  Address (virtual hosting with dedicated IP) is registered in Settings-> API -> Accessing the API, and I am running the script from my server. I test and but it not works.

My code is:


$url =
$ch = curl_init($url);


 $info = curl_getinfo($ch);

 echo 'Took ' . $info['total_time'] . ' seconds to send a request to ' . $info['url'];
echo curl_error ($ch);

Please help me! Thanks
Question by:csimbana
    LVL 34

    Accepted Solution

    Sounds like you put the wrong IP into their system.

    Create a script on your dedicated server that does this:

    if(preg_match("/ class=.v..([0-9\.]+)</",file_get_contents(""),$matches))
          echo "External IP: " . $matches[1];
          echo "IP not found!";

    ...and run it once, and delete it afterwards (just a quick fix thing - you should only need it once and that script probably won't be usable forever).

    The script should tell you your server's IP address that you should register with resellerclub.

    Author Comment

    Yes, the problem was in the IP Address. I write in resellerclub control panel the main IP Address from my virtual hosting and connection is successful. Thanks

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
    The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API ( has made its way into the popular lexicon of the English language.  A few years ago, …
    The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
    This video is a brief demonstration on how to use security groups and Network Access Control Lists (ACLs) in Amazon Web Services.  Security groups and Network ACLs are mechanisms you can use in AWS to control network traffic.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now