LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 06-20-2004, 02:57 PM   #1
linux_pioneer
Member
 
Registered: May 2003
Distribution: Solaris 10, Solaris 8.0, Fedora Core 3
Posts: 203

Rep: Reputation: 30
Getting the url with PHP


Hi,

Does anyone know how to get the entire url of a page with PHP? I can get the file name with $_SERVER['PHP_SELF'] but I want the entire url.
 
Old 06-20-2004, 03:04 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
You should be able to use:
$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]
 
Old 06-20-2004, 03:08 PM   #3
linux_pioneer
Member
 
Registered: May 2003
Distribution: Solaris 10, Solaris 8.0, Fedora Core 3
Posts: 203

Original Poster
Rep: Reputation: 30
Thanks, i was just about to let everyone know i figured it out. I used phpinfo() to find the $_REQUEST['url'] variable. I do appreciate such a speedy response.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Parsing URL in PHP benrose111488 Programming 6 10-12-2005 01:12 PM
how to use php open and url antony_csf Programming 7 09-27-2004 01:54 AM
# URL variable in PHP fatman Programming 1 06-04-2004 11:42 PM
Can you verify a url with php? digitalgravy Programming 4 03-01-2004 02:38 PM
PHP Url? HappyDude Programming 2 09-20-2003 05:20 PM


All times are GMT -5. The time now is 02:02 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration