What's Here?
- Members: 149,255
- Replies: 505,900
- Topics: 79,699
- Snippets: 2,663
- Tutorials: 706
- Total Online: 2,261
- Members: 85
- Guests: 2,176
|
get full url of the page.
|
Submitted By:
|
|
Rating:

|
|
Views: 28,405 |
Language: PHP
|
|
Last Modified: March 16, 2005 |
Instructions: i use for error logging, tells me what page.
use $_SERVER so it logged as superglobal. |
Snippet
<?
$_SERVER['FULL_URL'] = 'http';
if($_SERVER['HTTPS']=='on'){$_SERVER['FULL_URL'] .= 's';}
$_SERVER['FULL_URL'] .= '://';
if($_SERVER['SERVER_PORT']!='80') $_SERVER['FULL_URL'] .= $_SERVER['HTTP_HOST'].':'.$_SERVER['SERVER_PORT'].$_SERVER['SCRIPT_NAME'];
else
$_SERVER['FULL_URL'] .= $_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'];
if($_SERVER['QUERY_STRING']>' '){$_SERVER['FULL_URL'] .= '?'.$_SERVER['QUERY_STRING'];}
?>
Copy & Paste
|
|
|
Be Social
Reference Sheets
Bye Bye Ads
Monthly Drawing
Top Contributors
Top 10 Kudos This Month
|