I'm working on using cURL to pass paypal IPN data from our WooCommerce WordPress IPN responder to our ASP.NET based licensing code which resides on the same server. I had this working before when the ASP.NET code was on another site, but when it came time to move them to the same server, it stopped working. I've read:
if curl getinfo for HTTP CODE is not returning a code?
PHP curl exec fail on php script same domain
Can servers block curl requests?
Can I do a CURL request to the same server?
I've tried the solutions and variations there of from each of these posts and have had no luck.
As stated in the title, the response from curl_exec is 1, curl_error, curl_errno, curl_getinfo are all empty. Very hard to figure out what's going on without any details.
Here's my original code:
//open connection
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url6);
//set the url, number of POST vars, POST data
curl_setopt($ch,CURLOPT_POST,count($postdata));
curl_setopt($ch,CURLOPT_POSTFIELDS,$post_string);
//execute post
$result = curl_exec($ch);
//close connection
curl_close($ch);
$url6 points a aspx page on the same server using a full http:// address and as I mentioned this code worked perfectly fine when pointed to another server. This site is hosted on GoDaddy (not my choice) if that helps.
Been banging my head against this wall all day, could really use some insight here, thanks!