| | |
Retrieve URL from address bar
![]() |
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
Views: 6182 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api archive array arrays beginner binary broken cakephp checkbox class classes cms code combobox cron curl database date development directory display dropdown dynamic echo email error file files folder form forms function functions header hosting htaccess html image include insert integration ip java javascript joomla jquery limit link list login loop mail menu mlm mod_rewrite multiple mysql oop parse password paypal pdf php problem query radio recursion regex remote rewrite script search select server sessions sms soap source space speed sql storage syntax table update updates upload url user validation validator variable video web xml youtube





