A common library for php+javascript