Thread: URL Grabbing

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    London, UK
    Posts
    14
    Rep Power
    0
    I'm trying to figure out how to capture the entire contents of the current page's URL Address/Location.

    I want to capture this so as to create a link in a 'downstream' page which allows me/visitor to get back without using the 'Back' button or Javascript History(?).

    Any suggestions?

    Thanks
    Mark
  2. #2
  3. No Profile Picture
    ledjon
    Guest
    Devshed Newbie (0 - 499 posts)
    I think this would list the refering url (I know it modified version of it works in perl, this is just a quess):

    $backto = $HTTP_REFERER; #Assuming that you're running an apache web server.

    <a href="$backto">Back</a>.

    NOTE: In perl it would be:
    $backto=$ENV{'HTTP_REFERER'};
    But I think in PHP it's not in a hash (assositive array), but rather just a variable.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    London, UK
    Posts
    14
    Rep Power
    0
    Perfect!

    Thanks
    Mark

Similar Threads

  1. grabbing vars from url (http://www.domain.com/link.php?id=5)
    By doctacrazy in forum PHP Development
    Replies: 2
    Last Post: December 24th, 2003, 02:31 PM
  2. Issue with URL address using LWP
    By usaindp1776 in forum Perl Programming
    Replies: 4
    Last Post: September 3rd, 2003, 07:51 PM
  3. mod_rewrite and current URL
    By mikix in forum Apache Development
    Replies: 1
    Last Post: August 4th, 2003, 09:29 PM
  4. Need help: redirect to page based on text in URL
    By JPElectron in forum HTML Programming
    Replies: 2
    Last Post: July 18th, 2003, 11:44 PM
  5. Replies: 2
    Last Post: July 9th, 2003, 03:38 PM

IMN logo majestic logo threadwatch logo seochat tools logo