$_SERVER['REMOTE_ADDR'] è l'IP del PC che accede allo script, non l'IP del server.