Updated php scripts