Solved

request.servervariable("HTTP_REFERER")

Posted on 2000-04-10
15
816 Views
Last Modified: 2010-05-18
i have a problem with request.servervariable("HTTP_REFERER")
when i run it it does not show any data
i am using PWS on win98 machine.

0
Comment
Question by:marounk
  • 8
  • 5
  • 2
15 Comments
 
LVL 10

Expert Comment

by:makerp
ID: 2699818
i think that this only has something in if the script has been called form another page . if you type the url in the location bar it will probably be blank. or if the calling page is the samepage as the script.

try putting a link in a html page to your script..
0
 
LVL 1

Expert Comment

by:ATM
ID: 2699984
HTTP_REFERER will return useful data if
Page where You ask for that variable navigated by link, exmpl, You have link:
<A HREF="checkreferer.asp">Check Referer</A>. After click on you can obtain it. Also it will return REFERER if use checkreferer.asp in frames. If REFERER return nothing then that's mean page URL have been directly wrotten in address field of browser. Also in some cases Netscape and Explorer have different behavoir.
0
 
LVL 10

Expert Comment

by:makerp
ID: 2700010
eeemmm i just said that....
0
 
LVL 1

Expert Comment

by:ATM
ID: 2700063
Also if You use <FORM></FORM> REFERER available...
0
 
LVL 1

Author Comment

by:marounk
ID: 2702937
Adjusted points from 20 to 30
0
 
LVL 1

Author Comment

by:marounk
ID: 2702938
what i am getting is now the url of the iframe link.

what i have is an <iframe> in which there is a link that calls an images to be displayed each time so when i click on the image i get the url that calls the image which is in the iframe but i want is the URL of the main page

let us say i am in yahoo.com
and inside it i have this code
<iframe>http://.....</iframe>
when i click i want the yahoo.com what i am getting is the "http://....."
any ideas ???
0
 
LVL 10

Expert Comment

by:makerp
ID: 2715102
are you getting the base url in the http_referer of the frame or the frameset ?..

i dont know how http_referer behaves when you are in a frame.

0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 1

Author Comment

by:marounk
ID: 2715360
of the frame there is no frameset
0
 
LVL 10

Expert Comment

by:makerp
ID: 2715384
thats right then .. thats what you should have in the http_referer.

if the link is in a frame thats url is http://test.co.com/test/

then you should have that in http_referer
0
 
LVL 1

Author Comment

by:marounk
ID: 2715839
ok but this not what i want ... i want the page URL !!!!!
0
 
LVL 10

Expert Comment

by:makerp
ID: 2715854
what the url of the page that has been called.....

i.e. if i call http://example.com/test.asp

you want http://example.com/test.asp
in a http variable...

0
 
LVL 1

Author Comment

by:marounk
ID: 2715976
excatly
0
 
LVL 10

Accepted Solution

by:
makerp earned 30 total points
ID: 2716028
okay

Request.ServerVariables("URL") for the base url

SCRIPT_NAME for the script name and the virtual dir

ie.

url = Request.ServerVariables("URL")&Request.ServerVariables("SCRIPT_NAME")

will give you you full url
0
 
LVL 10

Expert Comment

by:makerp
ID: 2716036
sorry i mean

response.write(Request.ServerVariables("SERVER_NAME")&Request.ServerVariables("SCRIPT_NAME"))
0
 
LVL 10

Expert Comment

by:makerp
ID: 2716042
that wont give you the 'http://' bit
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now