updated PHP scripts