note 117098 added to security.globals

From: Date: Tue, 14 Apr 2015 22:09:23 +0000
Subject: note 117098 added to security.globals
Groups: php.notes 
Request: Send a blank email to php-notes+get-202266@lists.php.net to get a copy of this message
//Some servers do not have register globals turned on. This loop converts $_BLAH into global variables. foreach($_COOKIE as $key => $value) { if(!is_array($value)){ ${$key} = trim(rawurldecode($value)); //echo "$key $value<br>"; } else{ ${$key} = $value; } } foreach($_GET as $key => $value) { if(!is_array($value)){ ${$key} = trim(rawurldecode($value)); //echo "$key $value<br>"; } else{ ${$key} = $value; } } foreach($_POST as $key => $value) { if(!is_array($value)){ ${$key} = trim(rawurldecode($value)); //echo "$key $value<br>"; } else{ ${$key} = $value; } } foreach($_REQUEST as $key => $value) { if(!is_array($value)){ ${$key} = trim(rawurldecode($value)); //echo "$key $value<br>"; } else{ ${$key} = $value; } } foreach($_SERVER as $key => $value) { if(!is_array($value)){ ${$key} = trim(rawurldecode($value)); //echo "$key $value<br>"; } else{ ${$key} = $value; } } ---- Server IP: 72.52.91.14 Probable Submitter: 99.110.102.175 ---- Manual Page -- http://php.net/manual/en/security.globals.php Edit -- https://master.php.net/note/edit/117098 Del: integrated -- https://master.php.net/note/delete/117098/integrated Del: useless -- https://master.php.net/note/delete/117098/useless Del: bad code -- https://master.php.net/note/delete/117098/bad+code Del: spam -- https://master.php.net/note/delete/117098/spam Del: non-english -- https://master.php.net/note/delete/117098/non-english Del: in docs -- https://master.php.net/note/delete/117098/in+docs Del: other reasons-- https://master.php.net/note/delete/117098 Reject -- https://master.php.net/note/reject/117098 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#202266) next »