Spam Crusher Enterprise

Processing...

<% EOLN = chr(13) + chr(10) PostData = "" Dim biData biData = Request.BinaryRead(Request.TotalBytes) 'Careful! It's binary! So, let's change it into 'something a bit more manageable. For nIndex = 1 to LenB(biData) PostData = PostData & Chr(AscB(MidB(biData,nIndex,1))) Next ContentType = Request.ServerVariables("HTTP_CONTENT_TYPE") ctArray = Split(ContentType, ";") bArray = Split(Trim(ctArray(1)), "=") Boundary = Trim(bArray(1)) 'Now use that to split up all the variables! FormData = Split(PostData, Boundary) InfoEnd = InStr(FormData(1), EOLN & EOLN) If InfoEnd > 0 Then 'Get info for this field, minus stuff at the end VarInfo = Mid(FormData(1), 3, InfoEnd - 3) 'Get value for this field, being sure to skip 'CrLf pairs at the start and the CrLf at the end FileContents = Mid(FormData(1), InfoEnd + 4, Len(FormData(1)) - InfoEnd - 7) 'Is this a file? End If '*** FileContents contains the file data EOLN = chr(13) + chr(10) Set SpamCrusher = Server.CreateObject("SpamCrusherEnterprise.SpamCrusherEnte.1") SpamCrusher.SetCurrentUser(Session("UserId")) Error = "" Error = SpamCrusher.ImportAddressBook(FileContents) SpamCrusher.Logoff() Response.Write(FileContents) Response.Redirect("friends.asp") Response.Write("") %>