公司有一个只能接受来自某一IP请求的C# webservice,Android端无法直接访问。
请教如何用PHP实现将Android端的请求发送到WebService再返回~谢谢
请教如何用PHP实现将Android端的请求发送到WebService再返回~谢谢
1
ioth Aug 26, 2014
用php绕?
.net可以用啊。 |
2
dryyun Aug 26, 2014 PHP 接收Android端的请求 可以实现不?
PHP 发送请求到特定的webservice ,可以实现不? |
3
mengskysama Aug 26, 2014 不是httpproxy就可以了吗。哪有那么麻烦
|
4
lichao Aug 26, 2014 <?php
header('Content-type: text/plain;charset=utf-8'); $daurl = $_GET['url']; $handle = fopen($daurl, "r"); if ($handle) { while (!feof($handle)) { $buffer = fgets($handle, 4096); echo $buffer; } fclose($handle); } ?> 供参考 https://gist.github.com/libuchao/4054663 |
5
jsq2627 Aug 26, 2014 via iPhone HTTP请求转发?这个应该用 nginx 做吧。
|
6
ChoateYao Aug 26, 2014 上反向代理即可,何必搞的那么复杂???除非PHP还需要加工数据。
|
7
eiai OP |