My php file located at port 80 (default port) while my ajax call are on port 8080.
My index.html on port 8080
$(document).ready(function(){
$.get(\"u
The Same Origin Policy (SOP) denies Javascript from sending requests to any other host and port than the one it was downloaded from.
What is needed to work around this is a programm running on the same host and port as the origin of the javascript that forwards requests to the the actual service. A program that acts like this is commonly called a proxy, so what is needed is a JSONP proxy.
If your server was running ruby/rails and sinatra, github.com/greenisus/jsonp-proxy would be a minimal solution. A solution for PHP that seems to have many features would be benalman.com/projects/php-simple-proxy/.