% //Response.Write("testing...") //Response.Write("User Agent:" & Request.ServerVariables("HTTP_USER_AGENT")) // Check if ["HTTP_USER_AGENT"].Contains("Googlebot")) // ... or Googlebot, MSNbot, and Yahoo Slurp //Dim spidercheck //Spidercheck = Request.ServerVariables("HTTP_USER_AGENT") //If Spidercheck <> "Googlebot" Then //Server.Redirect("visitorpage.asp") // If request is made by google bot send email //Set Mail = Server.CreateObject("CDONTS.NewMail") //Mail.To = "johndublon@njtec.com" //Mail.From = "jophndublon@njtec.com" //Mail.Body = "body goes here" //Mail.Subject = "Testing email from JSmooch.com" //Mail.Send //Set Mail = Nothing //sUserAgent = Request.ServerVariables("HTTP_USER_AGENT") //strString //strKey = "GoogleBot" //If InStr(1, sUserAgent, strKey, vbTextCompare) > 0 //take action you choose //End If dim strKey // dim vbTextCompare vbTextCompare =1 sUserAgent = Request.ServerVariables("HTTP_USER_AGENT") Set Mail = Server.CreateObject("CDONTS.NewMail") //Response.write(sUserAgent) strKey = "Googlebot" If InStr(1, sUserAgent, strKey, vbTextCompare) > 0 Then 'Response.write("Googlebot was here") Mail.To = "stas.njaircond@njtec.com" Mail.From = "stas.njaircond@njtec.com" Mail.Subject = "MSN bot scanned njairaircond.com" Mail.Body = "Body goes here" Mail.Send End If strKey = "MSNbot" If InStr(1, sUserAgent, strKey, vbTextCompare) > 0 Then 'Response.write("MSNbot was here") Mail.To = "stas.njaircond@njtec.com" Mail.From = "stas.njaircond@njtec.com" Mail.Subject = "MSN bot scanned njaircond.com" Mail.Body = "Body goes here" // Mail.Send End If strKey = "Yahoo Slurp" If InStr(1, sUserAgent, strKey, vbTextCompare) > 0 Then 'Response.write("Yahoo was here") Mail.To = "stas.njaircond@njtec.com" Mail.From = "stas.njaircond@njtec.com" Mail.Subject = "Yahoo scanned njaircond.com" Mail.Body = "Body goes here" Mail.Send End If //Send details of all other visitors Mail.To = "stas.njaircond@njtec.com" Mail.From = "stas.njaircond@njtec.com" Mail.Subject = sUserAgent & "visited njairc temonial" Mail.Body = "Referer: " & Request.ServerVariables("HTTP_REFERER") & " Remote Address: " & Request.ServerVariables("REMOTE_ADDR") & " Language: " & Request.ServerVariables("HTTP_ACCEPT_LANGUAGE") Mail.Send Set Mail = Nothing %>