add php cli interface
bug fix
Merge pull request #1 from Awesomez/master

added php cli support