Re: how to see what users are searching



You could try using
<form action="something.asp" method="get"><input name=SearchString>
instead of
<form action="something.asp" method="post"><input name=SearchString>
so the query appears in the address bar ?
something.asp?SearchString=words+typed+in

.... and in the "cs-uri-query" column of the log files.
There is a limit on the amoint of info you can pass using GET,
and it exposes the workings slightly.

You may have to change 'Request.Form("SearchString")' to
'Request.Querystring("SearchString")' ,
[or just 'Request("SearchString")' which will work either way]

"robix73@xxxxxxxxx" wrote:

I'm sorry
I thank you for the answer but I cannot understand it;
is this a code that I should write in my hmtl search page?

Roberto Gerlando




On 5 Mar, 22:36, "Don Grover" <dgro...@xxxxxxxxxxxxx> wrote:
I just write to a text file re below asp sub:
strLogFileName = CStr("Remote Access." & Year(Date) & ".log")
'enter your preferred file name here

'Make a entry in the log
WriteToLog Request.ServerVariables("REMOTE_ADDR") & " " & "Search log files
Catalog: " & sCatalog & " Searching For: " & sSearchString

<%
'Specific Write to Logfile & close , cleanup Sub
Sub WriteToLog(strNewEntry)
Dim objLogFileFSO, objLogFileTS, strLogEntry
Set objLogFileFSO = CreateObject("Scripting.FileSystemObject")
If objLogFileFSO.FileExists(strLogFilepath & strLogFileName) Then
Set objLogFileTS = objLogFileFSO.OpenTextFile(strLogFilepath &
strLogFileName, ForAppending)
Else
Set objLogFileTS = objLogFileFSO.CreateTextFile(strLogFilepath &
strLogFileName)
End If
strLogEntry = Request.ServerVariables("SERVER_NAME") & " - " &
Request.ServerVariables("HTTP_X_FORWARDED_FOR") & " - " &
FormatDateTime(Now) & " - "
strLogEntry = strLogEntry & strNewEntry
objLogFileTS.WriteLine strLogEntry
objLogFileTS.Close
Set objLogFileTS = Nothing
Set objLogFileFSO = Nothing
End Sub
%>

<robi...@xxxxxxxxx> wrote in message

news:1173114586.194544.239630@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx



Hello to all
in my web server as you know i run iis; the log file is in the w3c
format.
I'd like to see what people search.
in these log files, i can see what document they open as a result of
query but I cannot see what the type in the search box;
i can read that they post all the time my idq file and after they get
a document, but i cannot what they typed in the search box
(userresctiction)

Is there any way to log the search query?
tnx in advance
all the time
RobertoGerlando- Nascondi testo tra virgolette -

- Mostra testo tra virgolette -



.



Relevant Pages

  • Re: how to see what users are searching
    ... Dim objLogFileFSO, objLogFileTS, strLogEntry ... Set objLogFileTS = objLogFileFSO.CreateTextFile(strLogFilepath & ... in my web server as you know i run iis; the log file is in the w3c ... RobertoGerlando- Nascondi testo tra virgolette - ...
    (microsoft.public.inetserver.indexserver)
  • Re: how to see what users are searching
    ... 'Specific Write to Logfile & close, cleanup Sub ... Dim objLogFileFSO, objLogFileTS, strLogEntry ... Set objLogFileTS = objLogFileFSO.CreateTextFile(strLogFilepath & ... Is there any way to log the search query? ...
    (microsoft.public.inetserver.indexserver)

Loading