note 17668 modified in language.variables.predefined by vlad
| From: | vlad@php.net | Date: | Wed, 19 Dec 2001 18:56:46 +0000 |
| Subject: | note 17668 modified in language.variables.predefined by vlad | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-23342@lists.php.net to get a copy of this message | ||
If you want to use PHP with the XMLHTTP if you want to look at the XML data that is posted you MUST
set the content-type header, when you send with XMLHTTP.
The example below will put the xml data in $HTTP_RAW_POST_DATA.
Example in your webpage:
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlHttp.open("POST", "some_script.php", true);
xmlHttp.setRequestHeader("Accept","text/xml");
// if you dont set this you can't read the xml
// data that is submited:
xmlHttp.setRequestHeader("Content-Type","text/xml");
--was--
If you want to use PHP with the XMLHTTP if you want to look at the XML data that is posted you MUST
set the content-type header, when you send with XMLHTTP.
The example below will put the xml data in $HTTP_RAW_POST_DATA.
Example in your webpage:
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlHttp.open("POST", "some_script.php", true);
xmlHttp.setRequestHeader("Accept","text/xml");
// if you dont set this you can't read the xml
// data that is submited:
xmlHttp.setRequestHeader("Content-Type","text/xml");
http://www.php.net/manual/en/language.variables.predefined.php