
Untitled
By: a guest on
May 7th, 2012 | syntax:
None | size: 0.51 KB | hits: 13 | expires: Never
How to capture unset REQUEST values in PHP
[CONTENT_TYPE] => application/x-www-form-urlencoded
[QUERY_STRING] =>
$pos=strpos($_SERVER["QUERY_STRING"], 'xml');
$xml="";
if($pos!==false){
$xml = substr($_SERVER["QUERY_STRING"], $pos+strlen("xml="));
}
if (count($_GET)>1 or is_not_well_formed_xml($_GET['xml'])) {
$xml = substr($_SERVER['QUERY_STRING'], 4);
if (is_not_well_formed_xml($xml)) {
really_fail();
}
}
<root><link href="http://example.org/?querystring#fragment"/></root>