Update sample.php

Newly done according to the new api