I wanted to send a get request to site using file_get_contents(URL). But the problem is the URL only accepts requests from certain IP addresses. I wanna know if I can send the same request from my webserver so that it appears to that server as if the request comes the IP that it allows
IP addresses are addresses which determine where a certain piece of data will be sent. If you fake your own sender IP address, you'll never receive a reply. You'd have to do some serious network level shenanigans and manipulate a bunch of relevant infrastructure to fake a TCP/IP handshake and still be able to receive the returned response.
In other words: no. You need to actually control the IP address you want to send from.
Guess why that server is using IP address filtering as security check. Because it's pretty secure.
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加