an attempt to parse spinformat in php