Addin .php script and correcting data format