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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
| <% 'recuperation mot de google
dim i
dim j
dim testFin
dim compteur
dim compteurq
dim testq
dim N
i=0
dim google
google = Request.ServerVariables("HTTP_REFERER")
If Left(google, 17) = "http://www.google" Then
compteur=0
compteurq=0
for j=0 to len(google)-1
testq=(Mid(google,j+1,1))
If testq = "q" Then
compteurq=1
if compteurq=1 then
for i=j+2 to len(google)-1
testFin=(Mid(google,i+1,1))
if testFin="&" then
compteur=compteur+1
if compteur=1 then
N=(mid(google,j+3,i-j-2))
end if
end if
next
end if
end if
next
end if
N=replace(N,"+"," ")
if len(N)<>0 then
<%'AJOUT DU MOT DANS LA BD
' Declaration des variable
Dim con, sql_insert
sql_insert = "INSERT INTO MotClef(lib_mot, date_mot) VALUES ('" & N & "','"& Date_Max &"' )"
' Execution de la requete insert
conn.Execute sql_insert
' Fermeture de la connexion
conn.Close
Set conn = Nothing
end if
end if
%> |
Partager