added utility.php file and made changes in MyApi and script.js