Connecting Tech Pros Worldwide Help | Site Map

How to get complete URL Referer

  #1  
Old December 13th, 2008, 05:50 PM
Newbie
 
Join Date: Aug 2007
Posts: 20
Hello:

Im working on a script that needs the complete URL referer to proceed accordingly to variables included after the question mark on the previous URL.EXAMPLE

Expand|Select|Wrap|Line Numbers
  1. cgi-bin/myscript.pl?first_variable=YES
But the following Environment Variable

Expand|Select|Wrap|Line Numbers
  1. $ENV{'HTTP_REFERER'}
Only prints the URL up to the question mark

Any Ideas..??

VirtualWeb

Last edited by eWish; December 13th, 2008 at 09:38 PM. Reason: Removed "BOLD" tags. Please do not make your entire post bold.
  #2  
Old December 13th, 2008, 09:36 PM
eWish's Avatar
Moderator
 
Join Date: Jul 2007
Location: Arkansas
Posts: 901

re: How to get complete URL Referer


For the query sting use $ENV{'QUERY_STRING'} which will get your everything past the '?'

--Mork
  #3  
Old December 13th, 2008, 09:53 PM
KevinADC's Avatar
Expert
 
Join Date: Jan 2007
Location: Southern California USA
Posts: 4,097

re: How to get complete URL Referer


What you want is to use the CGI module to parse the query string. There are a lot of security issues running scripts as a CGI and blindly importing everything sent via 'post' or 'get' or other method is unwise.
  #4  
Old December 13th, 2008, 10:07 PM
eWish's Avatar
Moderator
 
Join Date: Jul 2007
Location: Arkansas
Posts: 901

re: How to get complete URL Referer


This is very true and it is easy too.

--Mork
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
Feedback form problem gnawz answers 0 August 5th, 2009 05:06 PM
Trying to see Youtube through this proxy script jeddiki answers 7 July 8th, 2009 05:10 PM
Trying to scrape a website in C#, but failing. Looking for assistance please Admin.TalkPC@googlemail.com answers 3 November 14th, 2006 01:25 PM
Can't make this page work scottyman@comcast.net answers 6 March 9th, 2006 04:25 AM