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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting the querystring out of the HTTP REFERRER

Status
Not open for further replies.

Smarty

Programmer
Apr 12, 2001
191
0
0
BE
I have a set of server variables. The HTTP REFERRER is present and I can see what is coming through. In this HTTP REFERRER are a number of arguments in the querystring that i would like to use. Is this possible. These arguments are not present in the current url
 
I do not understand your question!
You say that you can see what is comming through and that there are a number of arguments in the query string. After that you say that these arguments are not present in the current URL ?????

What is the referrer?

If you want to do something with the arguments use the following example

Code:
DIM strArg1
DIM strArg2
DIM strArg3

strArg1 = request.querystring("arg1")
strArg2 = request.querystring("arg2")
strArg3 = request.querystring("arg3")

if request.querystring("arg1") <> "" then
response.write(strArg1) & vbCrLF
end if

if request.querystring("arg2") <> "" then
response.write(strArg2) & vbCrLF
end if

if request.querystring("arg3") <> "" then
response.write(strArg3) & vbCrLF
end if

Maybe this helps U further
 
The referrer address is where the person was, not where they are going (current page).

So say I was at google and searched for "blue cheese" and clicked on a results link to your site. "Blue cheese" would not necessarally be in the querystring linking to your site, but it was part of the address for the page I was previously on.

Ok, so onward to parsing it. Just treat the querystring like a string and parse it out. ie:
1) Do an inStr to find the question mark
2) Do a Mid or Right to get everything after the quesiton mark
3) Do a split on & to break all the name/value pairs into an array
4) loop through and breakdown each name=value in the array.

-T

barcode_1.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top