469,328 Members | 1,294 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,328 developers. It's quick & easy.

Checking to see if a referring url/link matches

I know I've used something like this in the past, can't put my finger
on it, tho...
I need to find out the method/keyword for checking to see if a user is
clicking into one webpage from a certain other webpage or url:

hypothetical example:
<%if referringurl = "http://www.yahoo.com" then

'do a function or task

end if%>

What would be the keyword or method/function for "referringurl" in the
above example?

Thanks
Chum
Jul 19 '05 #1
4 1075
Function CheckReferer(sWhat, sMatch)
Select Case sWhat
Case sMatch
CheckReferer = True
Case Else
CheckReferer = False
End Select
End Function

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
"Chumley the Walrus" <sp*******@yahoo.com> wrote in message
news:1e**************************@posting.google.c om...
I know I've used something like this in the past, can't put my finger
on it, tho...
I need to find out the method/keyword for checking to see if a user is
clicking into one webpage from a certain other webpage or url:

hypothetical example:
<%if referringurl = "http://www.yahoo.com" then

'do a function or task

end if%>

What would be the keyword or method/function for "referringurl" in the
above example?

Thanks
Chum

Jul 19 '05 #2
Forgot to add, to use the function, you'd simply do;

<%
If CheckReferer(Request.ServerVariables("HTTP_REFERER "),
"http://www.yourdomain.com") Then
Response.Write "Yipee, they match"
Else
Response.Write "Oh dear, they don't match"
End If
%>

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
"Steven Burn" <pv*@noyb.com> wrote in message
news:#H**************@TK2MSFTNGP10.phx.gbl...
Function CheckReferer(sWhat, sMatch)
Select Case sWhat
Case sMatch
CheckReferer = True
Case Else
CheckReferer = False
End Select
End Function

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
"Chumley the Walrus" <sp*******@yahoo.com> wrote in message
news:1e**************************@posting.google.c om...
I know I've used something like this in the past, can't put my finger
on it, tho...
I need to find out the method/keyword for checking to see if a user is
clicking into one webpage from a certain other webpage or url:

hypothetical example:
<%if referringurl = "http://www.yahoo.com" then

'do a function or task

end if%>

What would be the keyword or method/function for "referringurl" in the
above example?

Thanks
Chum


Jul 19 '05 #3
Steven Burn wrote on 01 jul 2004 in
microsoft.public.inetserver.asp.general:
Function CheckReferer(sWhat, sMatch)
Select Case sWhat
Case sMatch
CheckReferer = True
Case Else
CheckReferer = False
End Select
End Function


Wouldn't that be the same as:
Function CheckReferer(sWhat, sMatch)
CheckReferer = (sWhat = sMatch)
End Function
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #4
It would ;o) (I'd not thought of that, hehe)

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn*******************@194.109.133.29...
Steven Burn wrote on 01 jul 2004 in
microsoft.public.inetserver.asp.general:
Function CheckReferer(sWhat, sMatch)
Select Case sWhat
Case sMatch
CheckReferer = True
Case Else
CheckReferer = False
End Select
End Function


Wouldn't that be the same as:
Function CheckReferer(sWhat, sMatch)
CheckReferer = (sWhat = sMatch)
End Function
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Jul 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Jenkins | last post: by
8 posts views Thread by Clifford W. Racz | last post: by
22 posts views Thread by Qopit | last post: by
5 posts views Thread by Christina | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by listenups61195 | last post: by
reply views Thread by haryvincent176 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.