I have a Javascript page, that sends data to a PHP page. That data is a URL with different querystrings, for example:
var localURL = "http://localhost/app/proxy.php?data=http://myserver.com/game.php?type=loadgame&userInfoName=AA&userPwd=AA&nocache=0.8046834595784704"
$.ajax({
url: localURL,
beforeSend: function (xhr) {
alert('beforesend');
},
success: function (data) {
alert('success: ' + data);
}
});
The number of querystring variables can vary, so I can't send it with the data parameter of the ajax function. If I do a GET of the data variable ($_GET['data'];) I get this result:
http://myserver.com//game.php?type=loadgame
and what I'd like to get is:
http://myserver.com/game.php?type=loadgame&userInfoName=AA&userPwd=AA&nocache=0.8046834595784704
Any idea? :-S
proxy.phpand the URL is usinggame.php; are you sureproxy.phpis correctly forwarding the query string?