PHP script helper