I cannot execute php curl request with port number, without port number. I get the answer correctly.
Through the terminal, when I do curl http://www.sample.com:8088 , I get the answer back properly. But not through php curl when doing curl_inf () I get
Array ( [url] => http:
My code
$url = "http://www.sample.com:8088/"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_TIMEOUT, 400); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, True); curl_setopt($ch, CURLOPT_RETURNTRANSFER, True); $report=curl_getinfo($ch); print_r($report); $result = curl_exec($ch); curl_close($ch); echo $result;
this code gives me a response from ubuntu but does not give a response from cent os if a port number is specified.
Please let me know how to fix this.
Extremely important.
druveen
source share