In another forum I read, someone asked how to be sure that a request to a PHP script was sent by the same machine as the server. The obvious answer would be:
<?php
if ($_SERVER['REMOTE_ADDR'] == $_SERVER['SERVER_ADDR']) {
// request comes from this server
}
?>
But then someone pointed that this is not safe, because a user could set his IP manually, making it the same as the server's.
Although I have some experience with PHP, I'm no expert in security or networking, so I don't really understand how a user would be allowed to send a request using the same IP as the server. Is this really possible?