Hi I am using a code to get the referral URL as you can see below:
sRef = encode(Request.ServerVariables("HTTP_REFERER"))
This code is getting the following URL: http://www.rzammit.com/pages/linux-form.asp?adv=101&loc=349
From that url I want to grab the ADV and LOC (Request.querystring doesnt work)
Any help please on how I can do this? All this is happening in a script.
Treat the sRef as a string and use Mid to get the values. Following code should be a starting point to get where you want to reach!
I can't believe I have done this. ASP Classic IS my first web programming love so I had to :)
With this function in your page you can query any variable by passing the variable name and URL string to GetVarValue!
(PS: if this answer works, accept this answer, it will do wonders to my StackOverflow Repo :) )
Use a Regexp and a dictionary to extract structured info from a string:
You may have to tinker with the simplistic pattern, but this approach scales much better than the Instr way.