timlondon Posted June 10, 2009 Share Posted June 10, 2009 Hi guys, any help would be appreciated with the below problem. I am attempting to use CURLOPT_POSTFIELDS to send a variable from originator.php to receiver.php but originator.php just hangs. No errors are reported and i know that the problem lies with curl because if i comment-out the entire curl section then the end echo "finished" is displayed and the script terminates. originator.php: $ch = curl_init("http://www.testdom.com/originator.php"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "testvar=piggies"); $resp = curl_exec($ch); echo $resp; curl_close($ch); echo "finished"; receiver.php: ob_start(); $tv=$_POST['testvar']; my server has the following: libcurl/7.12.1 OpenSSL/0.9.7a zlib/1.2.1.2 libidn/0.5.6 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.