update examples/rest.php and create a separate README file, add license header