Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Referer Recording 1

Status
Not open for further replies.
the
Code:
Request.ServerVariables("HTTP_REFERER")
code works under IIS http servers. Try it and see. Water is not bad as long as it stays out human body ;-)
 
I would suggest
tempURL = replace(URL,"tempURL = split(tempURL,"/")
newURL=tempURL(0) Saturday 12.00
im6.gif
im2.gif
im2.gif
20.00
im5.gif
im4.gif
im7.gif
3.00am
im8.gif
Sunday [img http
 
thanks but that is causing an error, here it is as i believe it needs to be in correspondence to the page

tempURL = replace(refererurl,"tempURL = split(tempURL,"/")
newURL=tempURL(0)

thanks

causes page cannot be displayed error
 
Dunno where that semicolon came from, it shouldnt be there Saturday 12.00
im6.gif
im2.gif
im2.gif
20.00
im5.gif
im4.gif
im7.gif
3.00am
im8.gif
Sunday [img http
 
How about just writing a function that accepts an address and removes the third slash on?
Code:
Function GetBaseAddress(fulladdr)
   Dim thrd
   thrd = InStr(7,fulladdr,"/",1)   'textual match starting at 7th character
   If thrd > 0 Then 
      GetBaseAddress = Left(fulladdr,thrd)
   Else
      GetBaseAddress = fulladdr
   EndIf
End Function

Thats untested, but it should work, just call it like so:
Dim refererBase
refererBase = GetBaseAddress(Request.ServerVariables("http_REFERER"))
Response.Write "User came from: " & refererBase


-Tarwn --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
For my next trick I will pull a hat out of a rabbit (if you think thats bad you should see how the pigeon feels...) :p
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top