471,854 Members | 1,551 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,854 software developers and data experts.

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 1099
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.

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.