473,513 Members | 2,375 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to get complete URL Referer

30 New Member
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
Dec 13 '08 #1
3 6428
eWish
971 Recognized Expert Contributor
For the query sting use $ENV{'QUERY_STRING'} which will get your everything past the '?'

--Mork
Dec 13 '08 #2
KevinADC
4,059 Recognized Expert Specialist
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
eWish
971 Recognized Expert Contributor
This is very true and it is easy too.

--Mork
Dec 13 '08 #4

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

Similar topics

5
2796
by: Joshua Beall | last post by:
Hi All, I do web design for some small organizations, and one of the sites I have set up takes online conference registrations. Now, most of the time it works. In fact, every time I try it, it...
1
2116
by: jawahar rajan | last post by:
All, I have a question about the Max Referer length. By default this is 256 I am not fully sure I understand this property. It this a header that is sent back to the Server by a client and is it...
2
12619
by: Jonathan Driller | last post by:
I am attempting to block repeat downloads from a site. I need to have a landing page pass a referer to a secured page. I have tried a meta refresh redirect and several Javascript redirect...
3
6089
by: exxos | last post by:
Hi all, I'm trying to list to a html page where the referer is, There are a lot of ways ive tried and work, but the problem if my mainpage uses frames, and no matter where I do the referer check...
3
5613
by: Giuseppe | last post by:
I need to make a little software to know how many visitors see my websites, and where they come from. So I've added this code at the end of a webpage: <!------- Begin Stat code ------------->...
1
2058
by: Raed Sawalha | last post by:
Hello: In my aspx page I need to check the HTTP_REFERER for (images swf ) file, so when I request the server variable (HTTP_REFERER) like this Request.ServerVariables within (page.aspx) . if the...
4
4010
by: Raed Sawalha | last post by:
Dear : In my web page I'm always checking the referer page if it was empty I do something else also I do something :0). the problem in my ASPX page client side I did a popup window, and when...
1
2229
by: Al | last post by:
Hi i'm having troble with a script where i check referer, on a PC with Zone Alarm Pro the referer isn't send... i did a couple of page of testing and no referer is sand, closing ZAP the...
4
6656
by: pavloutefkros | last post by:
Hello all! I was wondering, if there is a way to retrieve the referer url with python (web-based). I tried this: import os print os.getenv('HTTP_REFERER') but it's not working, even...
0
7267
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7175
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7553
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7120
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7542
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5100
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4754
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1609
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
466
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.