I am trying to use cURL to get a response from a different server after it executes a SSH command. When doing so, I thought it was a connection error because I was not receiving any response from the server. So I made a test file and it outputs "Works!", but cURL is not picking up ANYTHING from it. It puts my page into a waiting loop then just quits and has no response back.
test.php Code:
<?php echo "works!"; ?>
Now the code that tries to get the "Works!" response.
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://SERVERIP/test/test.php");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch);
echo $output;
?>
Also, if it help, I recently just upgraded to a CDN Server. Contacted them and they said it's more than likely a software problem. So I figured I'd ask you all!
Any reply on help will be appreciated!