One possible solution would be to configure CORS by placing a
.htaccess
file in your PHP base directory and configure the CORS headers in there, as such:
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Headers "origin, content-type"
Header set Access-Control-Allow-Methods "DELETE, GET, OPTIONS, POST, PUT"
What this does is:
1) Tells Apache to accept HTTP requests from any domain
2) Tells Apache to allow the origin and content-type headers cross-origin
3) Tells Apache to accept all HTTP methods for requests
You can also configure this directly within Apache, I recommend Googling how to do that.