I can't connect to Resellerclub API

Posted on 2012-08-23
Medium Priority
Last Modified: 2012-08-24
Hi,  I am trying to connect from a PHP script to Resellerclub.com 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 https://test.httpapi.com and https://httpapi.com 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 35

Accepted Solution

gr8gonzo earned 2000 total points
ID: 38328994
Sounds like you put the wrong IP into their system.

Create a script on your dedicated server that does this:

if(preg_match("/REMOTE_ADDR....td..td class=.v..([0-9\.]+)</",file_get_contents("http://hosting.iptcom.net/phpinfo.php"),$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

ID: 38329591
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

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
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…
Integration Management Part 2
Suggested Courses
Course of the Month16 days, 7 hours left to enroll

862 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