PHP implementation of the Javascript LocalStorage