That is, there are two different users (attacker and victim) connected to the same WiFi ($_SERVER['REMOTE_ADDR'] equal), network and assume that they have exactly the same browser ($_SERVER['HTTP_USER_AGENT'] equal).
Since PHP as might differentiate between these two users?
Excuse my language, I used Google translator :D