fix typo and more

I hope more explanation!
fix deprecated code

it was old function of PHP
Merge pull request #2 from shinriyo/master

Yay for spelling errors and depreciated code :)