Updated example.php due to recent API changes