Safe Guard php code