Convert asp to php code