| | |
Retrieve URL from address bar
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
URL of the current page :
- Mitko Kostov
php Syntax (Toggle Plain Text)
$current_url = $_SERVER['REMOTE_ADDR'].$_SERVER['PHP_SELF']; echo $current_url;
- Mitko Kostov
I was wrong posted the code above in a hurry.
You can use :
- Mitko Kostov
You can use :
php Syntax (Toggle Plain Text)
echo 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']; echo 'http://'. $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; echo 'http//'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
- Mitko Kostov
![]() |
Similar Threads
- Error trying to perform single word searches in address bar. (Viruses, Spyware and other Nasties)
- IE will not open new URL from address bar (Viruses, Spyware and other Nasties)
- ASP how to make the page not remembered in address bar? (ASP)
- IE Address Bar hijacked by http://s5.th.msie.cc/ index.php (CWShredder.exe) (Viruses, Spyware and other Nasties)
Other Threads in the PHP Forum
- Previous Thread: php whitelist form validation??
- Next Thread: mysqldump
| Thread Tools | Search this Thread |
action address advanced ajax apache api array auto autoincrement basics beginner broken cakephp class classes cms code codingproblem combobox cron curl database date datepart dehasher destroy domain dynamic email error errorlog file folder form format function functions google head href htaccess html image include includingmysecondfileinthechain interactive ip javascript job joomla js limit link load login malfunctioning masterthesis menu multiple mysql nodes oop outofmemmory paging password paypal pdf php popup problem procedure query ram random reference script search server sessions smarty source space sql stored syntax system table traffic tutorial unicode unset up-to-date upload url validation variable web webapplications websitecontactform youtube





