By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,933 Members | 1,675 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,933 IT Pros & Developers. It's quick & easy.

How to get complete URL Referer

P: 30

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/
But the following Environment Variable

Expand|Select|Wrap|Line Numbers
Only prints the URL up to the question mark

Any Ideas..??

Dec 13 '08 #1
Share this Question
Share on Google+
3 Replies

Expert 100+
P: 971
For the query sting use $ENV{'QUERY_STRING'} which will get your everything past the '?'

Dec 13 '08 #2

Expert 2.5K+
P: 4,059
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.
Dec 13 '08 #3

Expert 100+
P: 971
This is very true and it is easy too.

Dec 13 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.