在将查询传递到远程服务器之前以任何方式(最佳方式)更改用户的IP地址[关闭]
问题描述:
We have a script running on a managed server (LAMP) that uses php/curl to post a user's query to a remote server and then display the results that are returned. What we would like to do is anonymize the users by passing our server IP to the remote server instead of the user IP. How can we implement this? Any suggestions will be appreciated and tried with no hard feelings or snide comments if it doesn't work. We're out of ideas. Thank you.
我们在托管服务器(LAMP)上运行一个脚本,该脚本使用php / curl将用户的查询发布到 远程服务器,然后显示返回的结果。 我们想要做的是通过将我们的服务器IP传递给远程服务器而不是用户IP来匿名用户。 我们怎么能实现这个呢? 如果不起作用,任何建议都将受到赞赏和尝试,没有任何困难的感觉或讽刺评论。 我们没有想法。 谢谢。 p> div>
答
tor
curl bot.whatismyipaddress.com => 91.240.86.250
use sock:
curl bot.whatismyipaddress.com --socks5 127.0.0.1:9050 => 178.17.174.99
use php
curl_setopt($ch, CURLOPT_PROXY, 127.0.0.1 . ":" . 9050);
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);