LinuxQuestions.org
Visit Jeremy's Blog.
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, 01: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, 02:04 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
You should be able to use:
$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]
 
Old 06-20-2004, 02: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 12:12 PM
how to use php open and url antony_csf Programming 7 09-27-2004 12:54 AM
# URL variable in PHP fatman Programming 1 06-04-2004 10:42 PM
Can you verify a url with php? digitalgravy Programming 4 03-01-2004 01:38 PM
PHP Url? HappyDude Programming 2 09-20-2003 04:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration