php: check if request key is valid