mirror of
https://github.com/php/presentations.git
synced 2026-03-24 07:32:11 +01:00
19 lines
365 B
PHP
19 lines
365 B
PHP
<?php
|
|
function input_tracker()
|
|
{
|
|
$input = '';
|
|
// iterate through all super-globals
|
|
foreach (array('GET', 'POST', 'COOKIE', 'SERVER', 'FILES') as $v) {
|
|
$var =& $GLOBALS['_'.$v];
|
|
// if data is avaliable store it
|
|
if (@count($var)) {
|
|
$input .= "{$v}\n".var_export($var, true)."\n\n";
|
|
}
|
|
}
|
|
|
|
return $input;
|
|
}
|
|
|
|
echo '<pre>' . input_tracker() . '</pre>';
|
|
?>
|