Search : 
  Powered by FindinSite

• Examples home
• Getting started
• Automated encryption
• Compare ASP servers
• Cookies test centre
• Database browser
• Menuing system
• Office Web Components
• Searching CDs
• SecureCD
• Shopping cart
• Slide show
• Sync demo
• Timed passwords
• User entry control

• ASP support
• Database CDs
• Evaluation download

• Case studies
• Examples
• Features
• License and pricing
• What they say
Search engine for CDs
Search for text in web pages AND in database tables.

The Spy-CD search applet
Spy-CD is a java applet search tool for CDs that finds text in a range of different file formats.

Spy-CD-Wizard scans HTML pages, PDF, Word DOC/RTF, Excel XLS, PowerPoint PPT and TXT files and creates a list of search words. The Spy-CD applet lets users search this list of words and navigate directly to the page containing the word sought. The sought word is highlighted on the target page.

A free evaluation copy of Spy-CD can be downloaded here.

If you decide to use Spy-CD and Dynamic-CD together on the same CD, please look at the Spy-CD documentation for assistance.

The Spy-CD »»» Dynamic-CD connection

Screen shot of Spy-CD (not a functional applet)

Add the processing power of Dynamic-CD to search pages generated from a database.

If your CD generates output from a database, you could generate all possible pages and have Spy-CD-Wizard scan those as well. The disadvantage of this approach is that each generated page is likely to be identical to the others, apart from the specific data inserted from the database. If a user searches for one of these identical words, they will see an enormous list of matches.

A better approach is to write a Dynamic-CD script that generates from the database the set of words that you would like your users to be able to search for. You then have Spy-CD-Wizard scan the URL of this script, the script runs and generates the set of search words which Spy-CD-Wizard then incorporates into its search list.

When a user searches for a word that appears on a page generated from the database, Spy-CD sends the search word to another Dynamic-CD script which handles the database query.

For example
Suppose we have a client contact database, such as that used in the database demo, and we want our users to be able to search for contact names.

First we write a script that generates a set of links :


  SET RS = Con.Execute( "SELECT * FROM [memData]")
  Response.Write "<HTML><HEAD><TITLE></TITLE></HEAD><BODY>" + vbCrLf
    Response.Write "<A HREF=" + CHR(34) + "catchspy.asp?"
    Response.Write "contName="
    Response.Write Server.URLEncode( RS( "contact")) + CHR(34)
    Response.Write "</A><BR>" + vbCrLf
  Response.Write "</BODY></HTML>"
If you run this script, it generates a stunningly blank page, but in fact if you view the source, you will find :
generated output

  <A HREF="catchspy.asp?contName=Maria+Anders"></A><BR>
  <A HREF="catchspy.asp?contName=Ana+Trujillo"></A><BR>
  <A HREF="catchspy.asp?contName=Antonio+Moreno"></A><BR>
  <A HREF="catchspy.asp?contName=Yang+Wang"></A><BR>
  <A HREF="catchspy.asp?contName=Pedro+Afonso"></A><BR>
  <A HREF="catchspy.asp?contName=Elizabeth+Brown"></A><BR>
  <A HREF="catchspy.asp?contName=Sven+Ottlieb"></A><BR>
  <A HREF="catchspy.asp?contName=Janine+Labrune"></A><BR>
Spy-CD-Wizard will follow the links to catchspy.asp, which does nothing other than add a <TITLE> and print out the contact name :
catchspy.asp (generate version)

  Response.Write "<HTML><HEAD><TITLE>Contact Details</TITLE>"
  Response.Write "</HEAD><BODY>" + vbCrLf
  Response.Write Request.QueryString( "contName") + vbCrLf
  Response.Write "</BODY></HTML>"
The result of this process is that Spy-CD-Wizard incorporates a set of contact names ... "Maria Anders", "Ana Trujillo", "Antonio Moreno" ... into its search list, each associated to a page entitled Contact Details.

We never run these scripts ourselves ; we let Spy-CD-Wizard run them under Dynamic-CD. For the production CD, we create a replacement script for catchspy.asp which handles processing the search word sent by Spy-CD :

catchspy.asp (production version)

<HTML><TITLE>Contact Details</TITLE>
  ' pick up search criterion
  thisContact = Request.QueryString( "contName")

  thisSQL = "SELECT * FROM [memData] WHERE contact='" &_
    thisContact +"'"
  SET RS = Con.Execute( thisSQL)

  Response.Write "<P>Contact details for <B>" &_
    RS( "contact") + "</B>"
  Response.Write RS( "contact")
  Response.Write "<BR>" + RS( "address")
  Response.Write "<BR>" + RS( "city") + ", " + RS( "postcode")
  Response.Write "<BR>" + RS( "country")

Spy-CD sends the catchspy.asp script a query string with complete information about the search undertaken by the user. The catchspy.asp script can perform any processing desired. The processing power of Dynamic-CD makes the results of the search completely customisable.

Setting up this process to work correctly is slightly complicated - more details are given here ...

© Copyright 2000-2007 PHD Computer Consultants Ltd