duan198299 2013-06-06 22:30
浏览 41

PHP cURL发布到同一站点返回1,没有错误,没有信息,也没有实际发布

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!

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 多址通信方式的抗噪声性能和系统容量对比
    • ¥15 winform的chart曲线生成时有凸起
    • ¥15 msix packaging tool打包问题
    • ¥15 finalshell节点的搭建代码和那个端口代码教程
    • ¥15 用hfss做微带贴片阵列天线的时候分析设置有问题
    • ¥15 Centos / PETSc / PETGEM
    • ¥15 centos7.9 IPv6端口telnet和端口监控问题
    • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
    • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
    • ¥20 海浪数据 南海地区海况数据,波浪数据