douyinglan2599 2017-08-01 20:08
浏览 217

如何使用php curl和header将数据发布到url后重定向?

Problem : I am integrating payumoney gateway in php-laravel.
I need a way to redirect user to payumoney test url after posting data to url.I am posting data using curl but not able to redirect user to url. I dont wanna use js for this. Is there any solution for this in using php only?

  • 写回答

1条回答 默认 最新

  • dongsheng4679 2017-08-01 20:23
    关注

    For redirecting you have 2 alternatives:

    1) Javascript, when you return from the php call. In an ajax callback for example.

    2) From php send the location header with a redirect code (301, 302, 303) depending on your needs. Search here for location header there are many questions related.

    This last option can also be acomplished with rewrite rules in the webserver. For example in Apache's .htaccess file.

    评论

报告相同问题?

悬赏问题

  • ¥15 stata安慰剂检验作图但是真实值不出现在图上
  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题