update rest.php