add a function for php local server