-1

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

Dpp_coder
  • 23
  • 3

1 Answers1

6

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.

deceze
  • 510,633
  • 85
  • 743
  • 889