Curl error 'Couldn't connect to host'
Content
Hi all,
I am writing a custom script in cPHP which makes POST requests to webservice API using Curl.
I have tested the API using external tools (postman) from my computer and it worked fine but when I try to implement it from custom script using curl, I am getting an error saying 'Couldn't connect to host'.
is there any restriction/configuration requirements in RightNow which is preventing me to connect to API?
Code Snippet
curl_setopt($curl_connection, CURLOPT_URL, "https://mysubdoain.mysite.info:9222/cxf/proxy/trim/v1/crm"); curl_setopt($curl_connection,CURLPORT_PORT,9222); curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl_connection, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($curl_connection, CURLOPT_USERPWD , "myusername:mypassword"); curl_setopt($curl_connection, CURLOPT_POSTFIELDS,$json_request); curl_setopt($curl_connection, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($curl_connection, CURLOPT_SSL_VERIFYHOST, 0);
0