A combination of $_SERVER['SERVER_NAME'], $_SERVER['SCRIPT_NAME'], and $_SERVER['QUERY_STRING'] should get you what you want.
Check out a phpinfo() page for more variables, or do a print_r($_SERVER); ---John Holmes... ----- Original Message ----- From: "Harriet Xing" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, June 25, 2002 2:56 PM Subject: [PHP] [php] How to get request url string and server hostname Hi, Would anyone know how to get the http request url string in php? i.e., if the request is "http://www.myserver.com/test.php?param1=123", how can I obtain this string in test.php? Thank you, Harriett -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php