0
I have a service/API that runs on xampp, xampp is installed on a Windows server. From the moment I started to hear the door 1500 instead of the 80 in the xampp, I started to have some problems.
There are 2 situations relevant for analysis.
- When I call the service, via website hosted in CPANEL. I get refused Connection.
- When I use the same call code on a personal computer. I receive the desired data in the Curl, I get the connection and everything is fine.
Step to show the code used:
// where are we posting to?
$url = 'http://dns_para_minha_API_alojada_servidor_windows_correndo_xampp_apache_http_server:1500/ncsync/Sync/getDossierProdutos?ndos=' . $ndos . '&nReg=' . $nReg;
// open connection
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_AUTOREFERER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
// execute post
$result = curl_exec($ch);
// close connection
curl_close($ch);
return $result;
Both in the CPANEL, as the server, and in the personal computer, I have the Curl installed (confirmation through the phpinfo instruction()).
Nota: cURL executados no CPANEL, para outas APIs, como a da "google" funcionam.