| | |
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 |
# address apache api array auto autoincrement beginner binary broken cache cakephp checkbox class cms code cron curl customizableitems database date dehasher display dynamic echo email error errorlog file files folder form format forms forum function functions gc_maxlifetime google headmethod href htaccess html image include incode insert ip javascript joomla legislation limit link login mail malfunctioning masterthesis menu method mlm multiple mysql oop parsing paypal pdf persist php phpmysql popup query question radio random recursion remote script search select server sessions sms source space sql support! survey syntax system table trouble tutorial update upload url validator variable video web youtube





