search queries save in a log file

This is a discussion on "search queries save in a log file" within the Other Programming Languages section. This forum, and the thread "search queries save in a log file are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Other Programming Languages

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Nov 24th, 2005, 13:01
New Member
Join Date: Nov 2005
Location: Toronto, born and raised.
Age: 43
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Daddyohhh99 Send a message via Skype™ to Daddyohhh99
search queries save in a log file

I need to have a log file or database that records what people are searching for from various forms on our site. So when they search for something, they get to a results page and the database or log file gets written to so I can check to see what the most popular search parameters are.
The server technology I am using is jsp.

thanks

D@VE
Reply With Quote

  #2 (permalink)  
Old Dec 2nd, 2005, 04:33
Reputable Member
Join Date: Jul 2005
Location: Melksham, Wilts, UK
Posts: 293
Thanks: 0
Thanked 0 Times in 0 Posts
Re: search queries save in a log file

request.getheader("Referer") will give you the referer header (i.e. the URL of the page that was searched for) within a JSP or Servlet. For arrivals from Google, and most other search engines, that will include the search terms. But note that the browser user can turn this off so that you can't be certain.

You say that you want to log this information for several pages / forms so it might be better to use your we server's log files instead. If you're running an Apache httpd (say to front an Apache Tomcat) then you should select the "Combined" log file format in httpd.conf which is commented out by default. With a Tomcat server (up to 5.0) this uses a similar mechanism but it has changed from 5,5 - you would need to download log4j from commons and configure it.
There are tools available to analyse common and (in your case) combined log file formats - I use analog, others use awstats - that will give you the reports you need.

From analog - complete search term reports

reqs: search term
-----: -----------
1417: mysql left join
853: perl ftp
796: ip lookup
513: java loops

And search word reports

reqs: search term
-----: -----------
18726: perl
17153: php
13096: mysql
10227: java
Reply With Quote
  #3 (permalink)  
Old Dec 2nd, 2005, 14:32
New Member
Join Date: Nov 2005
Location: Toronto, born and raised.
Age: 43
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Daddyohhh99 Send a message via Skype™ to Daddyohhh99
Re: search queries save in a log file

Thanks Grahame, what I am after, is tracking what users on my site are inputting into my forms. These forms submit to a third party site (we are a travel company, the forms submit to a company that provides the booking engine for us) Any thoughts on this?

cheers, Dave
Reply With Quote
  #4 (permalink)  
Old Jan 3rd, 2006, 17:20
New Member
Join Date: Jan 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: search queries save in a log file

If you are thinking in perl you can achieve this using some perl modules for the forum.

Regards
Support Terminal
Reply With Quote
  #5 (permalink)  
Old Jan 4th, 2006, 13:02
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
Re: search queries save in a log file

DaddyO .... You really need a custom solution written in JSP.... I would do some research regarding text file creation / editing using JSP as essentially all you need to do is append a search query to a file each time a search is performed.

Hope this helps.
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
Reply With Quote
  #6 (permalink)  
Old Jan 5th, 2006, 15:50
New Member
Join Date: Nov 2005
Location: Toronto, born and raised.
Age: 43
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Daddyohhh99 Send a message via Skype™ to Daddyohhh99
Re: search queries save in a log file

Thanks Rob,

I have just bought a few JSP recipe type books and hopefully I will find what I need in there. I am also salated to take a java prgramming course so maybe the teacher or someone there can guide me further.

regards

Dave
Reply With Quote
Reply

Tags
search, queries, save, log, file

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL queries alexgeek Databases 2 Sep 27th, 2007 08:41
search file content?? alkingg JavaScript Forum 2 Jun 11th, 2007 13:25
try to open php and asks if i want to open or save file steven rowlands PHP Forum 6 Feb 20th, 2007 21:42
Hyperlink to file download opens instead of save option mickyd Web Page Design 2 Sep 2nd, 2005 20:31
search a text FILE BY FIRST CHAR OF WORD gurbaksh Flash & Multimedia Forum 5 Aug 22nd, 2003 15:51


All times are GMT. The time now is 04:30.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43