<% Server.ScriptTimeOut = 320 If Request.Cookies("Webmaster") <> "Validated" Then Response.Redirect("/ctrfiles/stats/login.asp") End if IF Request.Form("Continue") = "Continue" Then Dim Connect,sqlnew,RS,xmlIsValidTour,xmlaid,xmlmls,xmlagent,xmlagency,xmlkey,xmlagencyid,xmlagentid function SoapTest(valmls,valaid,valkey) SoapTest = SoapTest & "" SoapTest = SoapTest & "" SoapTest = SoapTest & "" SoapTest = SoapTest & "" & valmls & "" SoapTest = SoapTest & "" & valaid & "" SoapTest = SoapTest & "" & valkey & "" SoapTest = SoapTest & "" SoapTest = SoapTest & "" SoapTest = SoapTest & "" end function function IsValidTour(valmls,valaid,valkey,valserver) IsValidTour = False Dim xmldom,xmlhttp set xmldom = server.CreateObject("Microsoft.XMLDOM") set xmlhttp = server.CreateObject("Microsoft.XMLHTTP") xmlhttp.open "POST", valserver, false xmlhttp.setRequestHeader "Man", "POST" & " " & valserver & " HTTP/1.1" xmlhttp.setRequestHeader "MessageType", "CALL" xmlhttp.setRequestHeader "ContentType", "text/xml" xmlhttp.send(SoapTest(valmls,valaid,valkey)) if xmlhttp.Status = 200 then Set xmldom = xmlhttp.responseXML xmlIsValidTour = xmldom.selectSingleNode("SOAP:Envelope/SOAP:Body/Tour/VALID").Text xmlmls = xmldom.selectSingleNode("SOAP:Envelope/SOAP:Body/Tour/MLS").Text xmlagent = xmldom.selectSingleNode("SOAP:Envelope/SOAP:Body/Tour/Agent").Text xmlagency = xmldom.selectSingleNode("SOAP:Envelope/SOAP:Body/Tour/Agency").Text xmlagencyid = xmldom.selectSingleNode("SOAP:Envelope/SOAP:Body/Tour/AgencyID").Text xmlagentid = xmldom.selectSingleNode("SOAP:Envelope/SOAP:Body/Tour/AgentID").Text xmlkey = xmldom.selectSingleNode("SOAP:Envelope/SOAP:Body/Tour/Key").Text If xmlIsValidTour = "Yes" Then IsValidTour = True Else IsValidTour = False End if Else xmlIsValidTour = "No" xmlaid = "Didn't Work
" xmlmls = "status=" & xmlhttp.status xmlagent = "
" & xmlhttp.statusText xmlagency = "
" & Request.ServerVariables("ALL_HTTP") xmlagencyid = "
" xmlagentid = "
" xmlkey = "
HTTP Request Erorr" IsValidTour = False End if set xmlhttp = nothing set xmldom = nothing end function Set Connect = Server.CreateObject("ADODB.Connection") Connect.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=D:\webroot\localuser\houseview\database\houseview.mdb;" sqlnew="Select ID,MLS,Pending,Grouping From Listings WHERE Trim(Pending) = '" & "No" & "' ORDER BY MLS ASC" Connect.execute("UPDATE Listings Set HZ='"& "no" & "'") Set RS = Connect.execute(sqlnew) If Not RS.BOF Then RS.MoveFirst Do Until RS.EOF If Cint(RS.Fields("Grouping")) = 3 then 'Abernathy Home Shows---------------------------------------------------------- If IsValidTour(RS.Fields("MLS"),5,"HZMHVO1","http://www.homezonemedia.com/SOAP/") Then Response.Write("" & RS.Fields("MLS") & " - HomeZoneMedia
") Connect.execute("UPDATE Listings Set Listings.HZ = '" & "yes" & "' WHERE Listings.ID = " & RS.Fields("ID")) End if ElseIf Cint(RS.Fields("Grouping")) = 3 then 'RealtourLive Capaha------------------------------------------------------------- If IsValidTour(RS.Fields("MLS"),5,"RTLHVO1","http://www.realtourlive.com/SOAP/") Then Response.Write("" & RS.Fields("MLS") & " - RealTourLive Capaha
") Connect.execute("UPDATE Listings Set Listings.HZ = '" & "yes" & "' WHERE Listings.ID = " & RS.Fields("ID")) End if Else 'RealtourLive------------------------------------------------------------------------------------------------------ If IsValidTour(RS.Fields("MLS"),1,"RTLHVO1","http://www.realtourlive.com/SOAP/") Then Response.Write("" & RS.Fields("MLS") & " - RealTourLive
") Connect.execute("UPDATE Listings Set Listings.HZ = '" & "yes" & "' WHERE Listings.ID = " & RS.Fields("ID")) End if End if RS.MoveNext Loop End if '******Close All Connections************* Connect.Close Set Connect = Nothing Set RS = Nothing '******Close All Connections************* Response.Write("
Update Successful! Remember to Update Text Files!
") End if %>

This will Syncronize www.RealTourLive.com Generated Tours to
www.houseviewonline.com listings. to place a Tour Notification on the Listing