I have a peculiar problem i am facing with Php CURL .
I am trying to call a web service running on a windows machine within the same network via a php script running on
There was selinux enabled on the Centos Machine, and that was causing the problem. Thanks for your help guys.
What happens if you try:
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_HEADER => 1,
CURLOPT_VERBOSE => 1,
CURLOPT_URL => 'http://192.168.100.4:9710/http/send-message?message='.$message
));
if(curl_exec($curl) === false) {
echo 'Curl error: ' . curl_error($ch);
} else {
echo 'Success!';
}
One thing I noticed was that you were trying to access the port twice.