Devi fare un controllo sull'id usando is_int
codice:
if(!is_int($_GET['id'])) {
      // CODICE DI BLOCCO CON MEMORIZZAZIONE DELL'IP
}