Ajax POST request

Ajax POST request

Hi @all,

I've got a "little" problem that kept me busy for the last hours and i still was not able to solve ...

First the situation.
I've got two different servers. Let's call it x (a browsergame) and y (my site which is a tool for this browsergame).
Now I want to transfer some data (equipment of the character) from the browsergame (server x) to my tool site (server y). This is done via a Javascript script that is run in the url field of the browser.

The first Idea.
Was to take all the inventory items as a url parameter and send this request via an iframe to my server.
Problem, when the inventory gets pretty large, it doesn't work anymore because of the GET limitations.

Now my current idea.
I wanted to send the data via an ajax post request. The game is using Mootools and I just can't get the hang of it. So i decided to include jQuery. So far, that works fine. I'm making the ajax request and sending all the data to my server. The problem now: even though I know it data has been sent by jQuery (the variable was filled correctly when I called the ajax function and even when i added a small alert for outputting the data variable directly before sending the request the data was there), the POST variable in PHP is empty, nothing inside. GET is working fine, but that doesn't help me of course.
Anyone has any idea why this happens or what to do to make it work? Might there be a problem when sending an ajax post request from server x to server y? Or is there any other nice and easy solution for my problem?

Thx for any help :)

If it helps, here's the script as it is now:
  1.             javascript: function remMsg(b) {
                try {
                var c = document.getElementById("TWToolMSG");
                b.removeChild(c);
                } catch (e) {}
                }
                try {
                var css = document.createElement("link");
                css.type = "text/css";
                css.href="http://twtool.kilu.de/public/stylesheets/jstextbox.css";
                css.rel = "stylesheet";
                document.getElementsByTagName("head").item(0).appendChild(css);
               
                var nh2 = document.createElement("h2");
                nh2.innerHTML = "TWTool Übernahmestatus";
                var nP = document.createElement("p");
                nP.innerHTML = "<br />Lade Elemente ...";
                nP.id = "TWToolMSGText";
                var nDiv = document.createElement("div");
                nDiv.className = "TWToolTextBox";
                nDiv.id = "TWToolMSG";
                nDiv.style.left =  ((window.innerWidth - 400) / 2) + "px";
                nDiv.style.top = ((window.innerHeight - 200) / 2) + "px";
                nDiv.appendChild(nh2);
                nDiv.appendChild(nP);
                var b = document.getElementsByTagName("body")[0];
                b.appendChild(nDiv);
                var MST = document.getElementById("TWToolMSGText");
               
                var Hd = document.getElementsByTagName("head").item(0);
                var Sc = document.createElement("script");
                Sc.type = "text/javascript";
                Sc.src="' . WEB_PATH . 'scripts/jquery.js";
                Hd.appendChild(Sc);
               
                MST.innerHTML = "<br />Ermittele Inventar ...";
               
                var url = "http://twtool.kilu.de/public/index.php?world=1&amp;site=skilltool&amp;a=99&amp;ajax=6&amp;uid=1&amp;id=1";
                var data = "";
                var wear = document.getElementById("wear").getElementsByTagName("img");
                for(i = 0; i < wear.length; i++)
                {
                  data += wear[i].alt + "~";
                }
                var bag = document.getElementById("bag").getElementsByTagName("img");
                for(i = 0; i < bag.length; i++)
                {
                  data += bag[i].alt + "~";
                }
                var data = "items=" + encodeURIComponent(data);
               
                MST.innerHTML = "<br />Sende Daten ...";
               
                jQuery.ajax({
                  type: "POST",
                  url: url,
                  data: data,
                  dataType: "xml",
                  success: function(xml) {
                    jQuery("#TWToolMSGText").html("<br />Vorang abgeschlossen!");
                    window.setTimeout("remMsg(b)", 2000);
                  },
                  error: function() {
                    jQuery("#TWToolMSGText").html("<br />Fehler bei Übertragung!");
                    window.setTimeout("remMsg(b)", 2000);
                  }
                 });
               
                } catch (e) {
                    MST.innerHTML = "<br />Fehler bei der Übernahme!";
                    window.setTimeout("remMsg(b)", 2000);
                }
                void(0);