You could output the content of the $_SERVER
super-global variable : there are many interesting things in there ;-)
For example, calling a page with an URL like this :
http://localhost/temp/temp.php?a=10&b=glop
And using :
var_dump($_SERVER);
I get at least :
array
...
'HTTP_HOST' => string 'localhost' (length=9)
...
'REQUEST_METHOD' => string 'GET' (length=3)
'QUERY_STRING' => string 'a=10&b=glop' (length=11)
'REQUEST_URI' => string '/temp/temp.php?a=10&b=glop' (length=26)
'SCRIPT_NAME' => string '/temp/temp.php' (length=14)
'PHP_SELF' => string '/temp/temp.php' (length=14)
'REQUEST_TIME' => int 1270060299
In there, I suppose at least those could interest you :
-
$_SERVER['QUERY_STRING']
: contains the whole query string ; i.e. the list of all parameters and their values
-
$_SERVER['REQUEST_URI']
: contains the requested URI -- including the parameters