Properly encode pos data
Added log function
New .htaccess to protect log
Merge pull request #2 from jaafit/master

fix posData