I need a ASP Classic vbscript function that will:
1. Analyze three variables on a webpage (title, description and keywords) -- passed as variables (title="", description="", keywords="") -- and determine the most frequent keyword phrase or phrases. The title should be more important than description or keywords. All non-valuable words like prepositions (of, on, for, to, etc.) and articles (the, a) should be ignored.
2. Connect to a database of products and search the title and description of all products to find the two *most* relevant product results (this entails ranking the products by how well the keyword phrase(s) of item 1 (above) match the products' titles and descriptions).
3. Find an area of the webpage that has at least 200 characters of non-table text (paragraphcs, line breaks and ordered lists are fine) and insert the product title, link and description inside of a right-aligned box labeled "advertisement". For example, on [login to view URL] you should determine the first available position between the <BODYTEXT> and </BODYTEXT> tags without a table being in close proximity (within 200 characters) to insert the "advertisement" right-aligned box. Assume that the body of the webpage will be in the format of body="" so you can insert the "advertisement" box into the string.
You'll be connecting to a SQL Server 2003 database. I cannot provide you access to a development server or SQL server for development -- you will need access to both.
Here's what I expect for completion of the project:
1. A vbscript function that takes three variable strings (title, description and keywords) and determines the most frequest keywords or phrases. See ([login to view URL]).
2. A vbscription function that reads all product titles and descriptions from a database and determines the two best matching products for the current web page content identified in item 1.
3. A vbscript function that determines an appropriate open space (at least two paragraphs into the article) within the body variable string to insert a right-aligned "advertisement" box (about 200 pixels wide) displaying the title, link and description of the two best matching products in item 2.
If the script can't connect to the database for any reason, the right-aligned "advertisement" box should default to a generic message such as "Search for [keywords] on the marketplace" instead of displaying the best matching products.
This should be a fun and challening small job. I'm looking for a great programmer with great communication skills and a can-do attitude. This function needs to be elegant and execute efficiently and quickly, so the sooner you can get into the database and out is better.