我遇到了以下问题-我试图用PHP制作一个Web服务,该服务需要找出从哪个IP发出请求并进行存储。现在,代码如下:
function postConnectionRequest($a,$b){
// I need to get requester's IP here to store it.
return 0;
}
$server=new SoapServer("test.wsdl");
$server->addFunction("postConnectionRequest");
$server->handle();
我如何得到它?搜索了几个小时,找不到路,也许是因为我在15年后重返PHP并思考了太多C#ish;)