Service Side CORS handling script written in PHP