changed include to require on api.php, small changed in script