T.Mallard Well, at the same time the keyword list is made, it’s filed under product number in the database. This was an important pass and since it really was fast to add words to the omit list, I thought for the results, it took zero coding time, but definitely took script processing time. The next pass transforms the table data to set up the following step of inserting the keywords into the pages, with a final pass in this series, gns_dat_03i.asp, to take off the trailing comma after these keywords were added, an ugly detail which I took another pass for.
set conn1 = server.createobject(“ADODB.Connection“)
conn1.open “Provider=Microsoft.Jet.OLEDB.3.51; Data Source=X:websharewwwrootgnscgigns_01.mdb“ set rsInput = server.createobject(“ADODB.Recordset“) set rsCreate = server.createobject(“ADODB.Recordset“) set rsOutput = server.createobject(“ADODB.Recordset“) if i 100 then if i 10 then
ctaba = “metas_00” & i & “a“ else
ctaba = “metas_0” & i & “a“ end if else
ctaba = “metas” & i & “a” end if if i 100 then if i 10 then
htmlpage = “d:websharewwwrootgnsv1prod_00” & i & “.html“
htmlOut = “d:websharewwwrootgnsv1prod_00” & i & “a.html“ else
htmlpage = “d:websharewwwrootgnsv1prod_0” & i & “.html“
htmlOut = “d:websharewwwrootgnsv1prod_0” & i & “a.html“ end if else
htmlpage = “d:websharewwwrootgnsv1prod_” & i & “.html“
htmlOut = “d:websharewwwrootgnsv1prod_” & i & “a.html“ end if
set conn2 = server.createobject(“Scripting.FileSystemObject“) set input = conn2.OpenTextFile(htmlpage, 1, True)
if not input.atendofstream then
apage = input.readall
start = instr(1, apage, ““) if start > 0then
place = start + 8
set output = conn2.CreateTextFile(htmlOut, 8,True)
rsInput.open ctaba, conn1, 2, 3, 2 while not rsInput.EOF and not rsInput.BOF
metas = metas & rsInput(“kword“) & “,“
rsInput.movenext wend if not isempty(metas) then
metas = mid(metas, 1, len(metas)-1) else
metas = “no_keywords“ end if
mtag = “<meta name="““keywords”” content=”“” & metas & “”“>“
thepage = mid(apage, 1, place) & mtag &mid(apage, place)
output.write(thepage)
lines = lines + 1 response.write(thepage) response.write(i & “:i “) response.write(start & “ “) response.write(“place: ” & place & “ “) response.write(“lines: ” & lines & “ “) end if end if set rsOutput = nothing set rsCreate = nothing set rsInput = nothing
input.close set conn1= nothing set conn2= nothing set conn3= nothing %>
Get the Free Newsletter!
Subscribe to Daily Tech Insider for top news, trends & analysis
This email address is invalid.
Get the Free Newsletter!
Subscribe to Daily Tech Insider for top news, trends & analysis