Update gapi.php