Php token validation showing json string as true

[Pastebin to the code][1]

here you go
[1]: http://pastebin.com/S5iPwssV