Fixed php script