One day I break out crank, if I every arrive a website, over there can immediately the news that my need watchs v, that is not very wonderful. Next I think more thorough ground considers this issue, sit to the chair to take a pencil, do not know what oneself write however. Come so, I or begin to make do code they.
My friend left a small-sized site, originally I am designed. This is examine the good platform of my idea. So I draw up code, uploaded a file. Call a person excitement really, process work rises evil spirit it is satisfactory, the idea that also proves me at the same time is good really.
Had read report of tendency of the person that a few networks are used before, among them a rule gives me impression very deep. If be clicked in 3,saying is most user inside the content that cannot find oneself to need, can leave this site immediately. My code can be aimed at this problem, insurance user should nod a mouse to find a cause only. In my example, suppose an user went up Yahoo, retrieve key word to be) of fittings of equipment of Fireplace Accessories(flight. In the result that give out, he comes to the site of my friend, will see ” the picture that you are searching the model of written characters such as Fireplace Accessories” . Catch the clew that he can get on according to the website, receive the page that wants to go continuously.
The first step that you should make, be an initiative variable is built in Global.asa file, in placing the Sub Session_onStart() order in you.
| It is quotative content below: Sub Session_onStart() Referer = Trim(Request.ServerVariables(”HTTP_REFERER” ) ) If Referer = “” Then Referer = “None “ End If Session(”Referer” ) = Referer End Sub |
Then we begin to look how to fulfil the main function of the program.
Because Url passed code, want a leader of the person that call in above all so point to data reductive and didymous our useful thing. Build an ASP page, call it Decode.asp, it is the main force of our program. The first function is to want what pass to encode to point to a head to undertake decipher. The process is a bit long, and very direct, without what full of twists and turns, if you disrelish a trouble, the class of attend in a advanced studies of ” net bug that is inferior to Www.popunet.com finds the article above ” , with ” copy / stickup ” old law.
Source code
The 2nd thing that wants is: From URL head information depart gives inquiry share- - we need this talent.
| It is quotative content below: ‘ inquires a field from the depart in pointing to URL. Function IsProduct(pStr) If PStr <>"" And LCase(pStr) <>”None” Then ‘ searchs a field backward Temp = InStrRev(pStr, “/ ” ) ‘ gets the seat with detached catalog TempStr = Right(pStr, temp) ‘ gets concerned data length Temp2 = Len(pStr) ‘ gets inquiring data goes PStr = Mid(pStr, temp, temp2) ‘ set returns functional value IsProduct = PStr Else IsProduct = ” “ End If End Function |
It is the specific standard that wants establish to search then. To achieve this goal, build ” of space of two static states to point to? Search point to data
| It is quotative content below: Function Finder(byRef ProdList, byVal RefList) ‘ faintness inquires RefList = LCase(refList) ‘ is searched circularly through pressing with a finger match a field For I = 0 To UBound(prodList) - 1 If InStr(refList, LCase(prodList(i, 0))) Then ‘ is found match THolder = THolder&”Are You Looking For ” _ &”" _ &ProdList(i, 0)&0) 0) End If ‘ circulates the 2nd times Next ‘ returns a result Finder = THolderEnd Function |
Pass an Inclue, the Decode.asp that has done us is put to any pages that need this function, success.
Specific as follows:
| It is quotative content below: If ‘ points to a head to be empty, v this function If LCase(Session("Referer" )) <>"None" OR Session("Referer" ) <>”" Then’ is analytic point to data Response.Write VbCrLf&”" Then’ is analytic point to data Response.Write VbCrLf “_&Finder(pArray, URLDecode(isProduct(Session(” Referer “)))) _&URLDecode(isProduct(Session(” Referer “)))) _ URLDecode(isProduct(Session(” Referer “)))) _&VbCrLf End If |
