<% 'Image retrieval Cloaking Script, this will allow cloaking of where the image came from============ '================================================================================================== Dim imgid,mls,foundlocal,imgwidth,imgheight,strimage,strbrand,strsource1,strsource2 Dim strLinksVal,strRetVal,Obj,xObj,xObj2,strimgstring,strarrayupper,imgtype mls = Request.Querystring("MLS") imgid = Request.Querystring("IMG") imgtype = Request.Querystring("TYPE") imgwidth = Request.Querystring("W") imgheight = Request.Querystring("H") strbrand = LCase(Request.Querystring("B")) foundlocal = False strimage = "http://www.houseviewonline.com/IDX/smnophoto.gif" If imgid = 0 Then imgid = 1 End if 'image Retrieval Routine========================================= If MLS <> "" AND imgid <> "" AND imgwidth <> "" AND imgheight <> "" AND imgtype <> "" Then function GetBytes(objHTTP) Set xObj = Server.CreateObject("SOFTWING.AspTear") On Error Resume Next strRetVal = xObj.Retrieve(objHTTP,2,"","","") IF Err.Number = 0 Then GetBytes = True Elseif Err.Number <> 0 Then GetBytes = False End if Set xObj = Nothing end function function GetImage(objHTTP, objWIDTH, objHEIGHT, objBRAND, objSOURCE) Dim Obj Set Obj = Server.CreateObject("eKov.PicturePreviewer") Obj.LoadFromURL objHTTP Obj.Resize objWIDTH, objHEIGHT, 5 'Obj.FastResize objWIDTH, objHEIGHT IF objBRAND <> "" AND objSOURCE = 1 Then Obj.TextAlignment = 0 Obj.FontItalicOn = False Obj.FontBoldOn = True Obj.FontStrikeOutOn = False Obj.FontUnderlineOn = False Obj.FontName = "Arial" Obj.FontSize = (objHEIGHT / 10) / 2 Obj.FontColor = RGB(0,0,0) Obj.TextOut Obj.FontSize, objHEIGHT-Obj.FontSize , objBRAND End if Obj.Quality = 100 Response.ContentType = "image/jpeg" Response.Buffer = True Response.Clear Response.BinaryWrite Obj.GetImageAsJpeg Set Obj = nothing Response.End end function function GetLinks(objHTTP) Set xObj2 = Server.CreateObject("SOFTWING.AspTear") strRetVal = "" On Error Resume Next strLinksVal = xObj2.Retrieve(objHTTP,2,"","","") IF Err.Number = 0 Then GetLinks = True Elseif Err.Number <> 0 Then GetLinks = False End if Set xObj2 = Nothing end function Sub GetMainPhoto() If GetBytes("http://www.stlouisshowcase.com/images/" & mls & "/" & mls & "sm.jpg") Then Call GetImage("http://www.stlouisshowcase.com/images/" & mls & "/" & mls & "sm.jpg", imgwidth, imgheight, strbrand, 1) Else If GetBytes("http://maris.rapmls.com/listingpics/bigphoto/" & Right(mls,2) & "/" & mls & ".jpg") Then Call GetImage("http://maris.rapmls.com/listingpics/bigphoto/" & Right(mls,2) & "/" & mls & ".jpg", imgwidth, imgheight, strbrand, 2) Else Response.Redirect(strimage) End if End if End Sub If imgtype = "M" Then Call GetMainPhoto Elseif imgtype = "O" Then If GetLinks("http://www.stlouisshowcase.com/images/" & mls & "/outpgm.htm") then IF Instr(1,strLinksVal,".htm",1) AND strLinksVal <> "" Then strimgstring = Split(strLinksVal,".htm") strarrayupper = UBound(strimgstring) IF Cint(imgid) <= strarrayupper Then strfoundimg = Mid(strimgstring(imgid),Instr(1,strimgstring(imgid)," "" Then strimgstring = Split(strLinksVal,".htm") strarrayupper = UBound(strimgstring) IF Cint(imgid) <= strarrayupper Then strfoundimg = Mid(strimgstring(imgid),Instr(1,strimgstring(imgid),"