在php脚本中抓取URL以便发布[关闭]

Good day all, I would like to know what is the correct method in PHP to grab the full URL and parameters.

I need this to check if the user is posting the url incorrectly.

Thank you to Raisen for his answer. Using

$_SERVER['REQUEST_URI']

I was able to see the users system was hitting my link and spelling a parameter incorrectly.

The QUERY_STRING element from the $_SERVER array should do the trick.

$_SERVER['QUERY_STRING']

Or try the REQUEST_URI element:

$_SERVER['REQUEST_URI']