关于PHP带POST跳转问题
关注:200 答案:2 mip版
解决时间 2021-02-03 05:07
提问者懷念那年夏天
2021-02-02 07:34
我现在有两个域名,分别绑定
A域名绑定A服务器、
B域名绑定B服务器
目前A域名已经正在使用了,其中有一个功能的POST提交,我想提交到B的域名
因为是客户端APP,
APP是 POST提交到A域名、我想将A域名获取到的POST 提交到 B域名,并且返回值给App 怎么做?
(提交的POST是图片文件)
最佳答案
二级知识专家千里故人稀
2021-02-02 07:41
A服务器上做个接口,接受参数,然后处理,POST给B,返回值让APP调用接口就行,用php的curl
全部回答
1楼琉璃知世
2021-02-02 08:32
<?php
$url=$_get["url"];
?>
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" " http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns=" http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<meta http-equiv="refresh" content="0;url=<? echo $url;?> " />
<title>无标题文档</title>
</head>
<body>
<script type="text/javascript">
var _bdhmprotocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3cscript src='" + _bdhmprotocol + "hm.baidu.com/h.js%3fbaa23a367d5a43d25298792e28eb62f6' type='text/javascript'%3e%3c/script%3e"));
</script>
</body>
</html>
我要举报
如以上问答内容为低俗/色情/暴力/不良/侵权的信息,可以点下面链接进行举报,我们会做出相应处理,感谢你的支持!
→点此我要举报以上信息!←
推荐资讯
大家都在看