Date: 08/22/05 (PHP Community) Keywords: php, xml, java, microsoft I've been trying to use JavaScript's XMLHttpRequest object to send XML to a PHP form. As far as sending the XML goes, I've got that worked out: try { var req = new XMLHttpRequest(); } catch(e) { var req = new ActiveXObject("Microsoft.XMLHTTP"); } someXML = "What I'm stuck on is how to get the PHP to receive anything in req.send(). The $_POST array only seems to store whatever I put into a query string in my URL, e.g.: req.open("POST", "example.php?foo=bar", false); req.send('');If I have to I guess I can just send my input that way, but I figure there must be some way PHP can recieve XML from a POST request. Any thoughts? Source: http://www.livejournal.com/community/php/338326.html
|