OnAfterRequest Samples

Navigation: Contents   Index   Previous   Next

OnAfterRequest Samples

Writing to the user’s logfile

data.log="Finished request number "+inttostr(data.requestcount)+" with resultcode "+inttostr(request.resultcode)+" ("+request.result+")"

The following code dumps HTML and headers into the log

data.log=data.log+crlf+"==header===================================="+crlf+request.receivedheader+crlf+"============================================"

data.log=data.log+crlf+"==html======================================"+crlf+request.html+crlf+"============================================"

Writing the HTML (or any other data) of a request to a diskfile. Please edit the filename/filepath for your needs!

a=savestringtofile("d:\temp\Data of user number "  

      +inttostr(data.usernumber)+" request number "

      +inttostr(data.requestcount)+".txt",request.html)

if a<>0 then data.log="Could not write file (result="

      +inttostr(a)+")" end if

Navigation: Contents   Index   Previous   Next

  • EN
  • DE
  • ES
  • FR
  • IT