Session("action")="Downloaded EQ Emulated" <% ' Check for access to this file set conn=Server.CreateObject("ADODB.Connection") conn.Provider="Microsoft.Jet.OLEDB.4.0" conn.Open "c:\Inetpub\database\users.mdb" set rs=Server.CreateObject("ADODB.recordset") rs.Open "Select emulated from users where email='" & session("email") & "'", conn if rs.Fields("emulated") = False then rs.close conn.close Response.Redirect("http://www.undergroundguides.com/everquestfree.htm") else rs.close conn.close end if %> <% 'Set the content type to the specific type that you are sending. Response.ContentType = "application/pdf" Const adTypeBinary = 1 Dim strFilePath strFilePath = "C:\Inetpub\guides\EQE1_1.pdf" 'This is the path to the file on disk. Set objStream = Server.CreateObject("ADODB.Stream") objStream.Open objStream.Type = adTypeBinary objStream.LoadFromFile strFilePath Response.BinaryWrite objStream.Read objStream.Close Set objStream = Nothing %>