473,698 Members | 2,220 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Use of HTTP_REFERER in Global.asa

Hello,

I have the below requirement.

When ever my website is opened by any link: say clicked from the google
search result or a link from other website:

Then I should able to know the referrer URL. How Do I get that?

I know about Request.ServerV ariables("HTTP_ REFERER"). So I used this in
"global.asa " file in "Session_OnStar t" event like this:

Sub Session_OnStart
Session("Referr alURL") = Request.ServerV ariables("HTTP_ REFERER")
End Sub

Sub Session_OnEnd
Session("Referr alURL") = ""
End Sub

So that I can use the session variable any where in my website, because the
HTTP_REFERER will give the URL of the last webpage.

But this seems to not working.

Please help.

Thanks
Prabhat
Sep 1 '05
28 4881
"Aaron Bertrand [SQL Server MVP]" <te*****@dnartr eb.noraa> wrote in message
news:ut******** ******@TK2MSFTN GP09.phx.gbl...
Does anybody see what's wrong with bottom-posting here? Just curious if
it's only me that is irritated to scroll through 90 lines of re-hashed
garbage to see "thank you."


[snip]
Why should I not top-post?
http://www.html-faq.com/etiquette/?toppost

"One reason why top-posting is so disliked is that those who do it very
rarely bother to snip any of the preceding post(s) - they leave masses of
quoted text trailing underneath their (frequently very brief) reply."
Usenet Basics
http://mugsy.org/asa_faq/getting_along/usenet.shtml

2. Replying and Quoting

There are many arguments about how to reply to a post on Usenet. There are
standard conventions and on a.s.a we have our preferred styles, briefly
described below.

a. Should I leave in the post I'm replying to, or delete it?

Snip (delete) the parts of a post you're not responding to directly, but
leave in some parts so people know what you're referring to.
Sep 1 '05 #11
Dave Anderson wrote on 01 sep 2005 in
microsoft.publi c.inetserver.as p.general:
Evertjan. wrote:
It is als per specification. Only certein objects are available
in global.asa, I think


This would appear to contradict that claim:

"All the built-in objects (Application Object, ObjectContext
Object, Request Object, Response Object, Server Object, and
Session Object) are available and can be referenced in the
Session_OnStart event script."

http://msdn.microsoft.com/library/en...cc8-361e-418b-
99e0-b0f289198c16.as p


Thank you, Dave.

I thought I had heard otherwise, but clearly I am wrong.

What do you think could be Prabhat's problem then?
--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Sep 1 '05 #12
> Bottom-posting is not the alternative of top-posting, Aaron.
Re-posting garbage is always a bad habit.
You did it in this very thread.
Top-posting should be discouraged at all times on usenet.
WHY? Because you say so? Because one guy somewhere stated that he doesn't
like it? Blow it out your shorts.
I am sorry that you ar so easily irritated,
No, I was just showing an example where your constant "do not top-post on
usenet" leads to an even less desirable behavior.
and thereby forgetting what 30 years of
usenet experience brought us:
Netiquette.


So sorry grand master, you know all and I am an idiot. Bottom-post away.
Sep 1 '05 #13
Evertjan gets bent out of shape every time anyone top-posts. I do sometimes
because it's easy, and sometimes because it puts the most relevant content
"above the fold" -- e.g. less scrolling and scanning. More often, I
intersperse my comments where they're relevant, unless I'm only responding
to a single segment of the previous post (such as this example).

AFAIC, neither is a should or shouldn't thing, it is a personal preference.
Unlike Evertjan, I don't attack people who do one or the other and try to
coerce them to my point of view, and try to say that my view and
interpretation of netiquette is superior to all others. In this case, I was
highlighting it because it was a very good example of what bottom-posting
naturally leads to -- scrolling to the bottom of a 90-line message and
adding a one-liner at the end.


Nah, it's lack of snipping, not where the reply was put.

Sep 1 '05 #14
This is ridiculous. I don't see how this is any more likely with
top-posting than bottom-posting. This thread should serve as a prime
example of where it can happen just as easily with bottom-posting.

Evertjan has attacked me in the past for top-posting and I can not remember
any situation where it had anything to do with me carelessly leaving useless
garbage in my reply.

"One reason why top-posting is so disliked is that those who do it very
rarely bother to snip any of the preceding post(s) - they leave masses of
quoted text trailing underneath their (frequently very brief) reply."

Sep 1 '05 #15
Aaron Bertrand [SQL Server MVP] wrote on 01 sep 2005 in
microsoft.publi c.inetserver.as p.general:
Bottom-posting is not the alternative of top-posting, Aaron.
Re-posting garbage is always a bad habit.


You did it in this very thread.


What is garbage and what is not is in the eye of the beholder. ;-)
Top-posting should be discouraged at all times on usenet.


WHY? Because you say so? Because one guy somewhere stated that he
doesn't like it? Blow it out your shorts.


Why so aggressive, Aaron?

Again and again in the years I tell my meaning about preferred behavour
on usenet. I know you think differently. So be it. That does not mean I
should not tell others.
I am sorry that you ar so easily irritated,


No, I was just showing an example where your constant "do not top-post
on usenet" leads to an even less desirable behavior.

Aaron:
it's only me that is irritated

See, you came up with the the word "irritated" !
and thereby forgetting what 30 years of
usenet experience brought us:
Netiquette.


So sorry grand master, you know all and I am an idiot. Bottom-post
away.


Thank you, Aaron, if you say so.

However, I did not advocate bottom-posting,
I politely asked not to top-post.
I don't think you are an idiot,
I think you are one of the mainstays of this NG.

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Sep 1 '05 #16
Aaron Bertrand [SQL Server MVP] wrote on 01 sep 2005 in
microsoft.publi c.inetserver.as p.general:
Evertjan has attacked me in the past for top-posting and I can not
remember any situation where it had anything to do with me carelessly
leaving useless garbage in my reply.


See, still you are irritated, Aaron.

Please don't be.

As far as I can remember,
I never attacked anyone,
unless you call a polite

"[please do not toppost on usenet]"

an attack.
--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Sep 1 '05 #17
> This would appear to contradict that claim:

"All the built-in objects (Application Object, ObjectContext
Object, Request Object, Response Object, Server Object, and
Session Object) are available and can be referenced in the
Session_OnStart event script."

http://msdn.microsoft.com/library/en...61e-418b-99e0-
b0f289198c16.as p

Hi Dave,

Can you please lookinto my problem in the 1st post in this thread. Can you
please put some light on that or can you suggest me how can i do that?

Thanks
Prabhat
Sep 1 '05 #18
> Thank you, Dave.

I thought I had heard otherwise, but clearly I am wrong.

What do you think could be Prabhat's problem then?


Hi,

can you now suggest any thing?

Thanks
Prabhat
Sep 1 '05 #19
Prabhat wrote on 01 sep 2005 in microsoft.publi c.inetserver.as p.general:
Thank you, Dave.

I thought I had heard otherwise, but clearly I am wrong.

What do you think could be Prabhat's problem then?


Hi,

can you now suggest any thing?


Yes, testing!

Set a session variable with global.asa onstart,
and try to tead it on a page.

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Sep 1 '05 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
9558
by: John A. Irwin | last post by:
I'm very new to PHP and am trying to figure out how to parse out a variable "HTTP_REFERER". My reason for this is my site was recently "FEATURED" (sic) on a website called FARK.COM. Because of this I received over 100,000 Hits in less then one hour and it caused my host's server farm to crash. While I understand that I could move to a more robust Web Host, I would rather trap any further links from FARK and redirect them to a rejection...
9
30888
by: Jez | last post by:
Any ideas why I'm not able to use $_SERVER on my shared hosting account (PHP 4.1.2), but I can on my local server (PHP 4.3.3)? I imagine it has something to do with the different versions of PHP or perhaps php.ini, but I'm not sure what? Thanks! Jez
9
28675
by: deko | last post by:
I have a page that I don't want anyone to be able to link directly to. The page should only be accessed from gatepage.php. I tried this code, but keep getting errors - "header info already sent", or something like that... Am I missing something, or is there a better way to do this? <?php $ref = $_SERVER; //echo $ref; if ( $ref == 'http://www.mydomain.com/gatepage.php' ) {
2
5634
by: ssk | last post by:
Hello! I made a web site using PHP Open sources for message board. Everything's fine except one computer can't open a message writing page. The code that gives an error is the following. if(!eregi($HTTP_HOST,$HTTP_REFERER)) Error("Write in the normal way");
2
1666
by: M Smith | last post by:
On our web site we allow our members access to features hosted by another web site. The way the other web site authenticates users is to check the value of the HTTP_REFERER. If it comes from our Login.asp page it lets them in. When our users login to go to the other site, they login on our site's Login.asp page. When they click submit, our LoginCheck.asp page validates them and does a response.redirect to the other site. In most cases...
4
5287
by: Ringo Langly | last post by:
Hi everyone, We're using an outside vendor to provide some content for our website, and they use the http_referer variable to verify their content is only viewed from subscribing customers. Anyway, we're using the mm_menu javascript menu for our web menus, and under only Internet Explorer it's not passing the http_referer -- which means any site of theirs we link to from the menu doesn't work. This works fine in Firefox, Mozilla, and...
8
1856
by: tshad | last post by:
Why would HTTP_REFERER not be there in the Page_Load event? I am using it to determine whether a page was called from a particular page. I am doing: sTest = Request.ServerVariables("HTTP_REFERER") if (sTest = "") ORELSE (sTest.SubString(sTest.LastIndexOf("/")+1) <> "job_posting_new2.aspx") then newPosition = new Position
16
3778
by: Seguros Catatumbo | last post by:
Hi everyone. Is there a way i can find out the value of HTTP_REFERER when using application_error in global.asax? I am using: if (HttpContext.Current.Request.ServerVariables != null) { referencia = HttpContext.Current.Request.ServerVariables.ToString();
6
5355
by: Lorna | last post by:
I can't seem to get the ENV variable HTTP_REFERER when posting with CGI from one program to another. In my post program I have put in the <HEAD> HTTP_REFERER =my host - ie www.xyz.com (I have also tried removing it entirely in case that was causing problems. I have tried to extract the HTTP_REFERER in my receiving program with $http_ref = $ENV{'HTTP_REFERER'}; That didn't work so I just printed all variables with foreach $key...
0
8676
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9164
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8898
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7734
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6524
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3051
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 we have to send another system
2
2332
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.