Hi,
i have observe this error but still unable to find out why.
I use PHP cURL to post $d to URL $url.
$d = array("version"=>1.1,"meth
od"=>"post
CashSale",
"params"=>
"curltrial
");
$url = "
http://smartacc.dyndns.org:8050/json";
we are expecting this response
{"version":"1.1","error":{
"name":"Js
onRPCError
","code":"
1","messag
e":"Invoke
r method for postCashSale not found."}}
Here's the condition:
1. use HTML& JS HTTP and i am able to see response
2. use local win 10 XAMPP php script with CURL, i am able to see the response
3. putting script of (2) in linux cent os server at data center. now time get time out
>> cURL Error #: (28) Connection timed out after 5000 milliseconds
SAMPLE PHP CODE:
$ch = curl_init();
$fp = fopen(dirname(__FILE__).'/
errorlog.t
xt', 'w');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $d);
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt ($ch, CURLOPT_AUTOREFERER, true);
curl_setopt($ch, CURLOPT_VERBOSE, true);
curl_setopt($ch, CURLOPT_STDERR, $fp);
if (defined('CURLOPT_IPRESOLV
E') && defined('CURL_IPRESOLVE_V4
')){
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
}
// receive server response ...
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$err = curl_error($ch);
$errno = curl_errno($ch);
curl_close ($ch);
if ($err) {
return "cURL Error #: (".$errno.") " . $err;
} else {
return $response;
}
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Fellow title is reserved for select members who demonstrate sustained contributions, industry leadership, and outstanding performance. We will announce the experts being inducted into the Experts Exchange Fellowship during the annual Expert Awards, but unlike other awards, Fellow is a lifelong status. This title may not be given every year if there are no obvious candidates.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.