Hello,
I was curious as to whether there is a way to store more than 32K of data in the response buffer. What I would like to do is to capture the entire HTML output of a rather large page, save it to a document, redirect and then email the given document. I'm trying to avoid simply creating the document and then having an obscene number of "SEND PACKET" commands... I was looking into using the "Save Output" command, but couldn't capture more than 32K of data. Is there something I could put in the "On Execute End" handler that would allow me to access and process the entire returned HTML?
I am using Active4D version 3.0.0 build 5 on a Windows machine. 4D 2003 is running as the web server.
Thanks for the help, - Clay
Clay,
I _think_ you can do what you want but you will probably have to write some 4D Code to do it.
As you probably know 4d's Text variables are limited to 32K. If you need to store data larger than that you can use a BLOB.
When you say "capture the entire HTML output or a rather large page..." I'll assume this is an external page. You didn't say how you are capturing it? Also since you want to email it I'm not clear where the response buffer comes into play. Are you attaching it or trying to send the captured page as an HTML email message? If it is the latter then you probably will have to "chunk it out" using SEND PACKET or some variation of that technique.
I've captured external HTML files with ITK in the past by doing something like this (pseudocode).
REPEAT
$chunkText := Get Chunk of HTML Page
TEXT TO BLOB($chunkText; $htmlBLOB; text without length; *) `actual 4D command
UNTIL PageCaptureComplete
Then use 4D's BLOB TO DOCUMENT command to to save your captured file to disk.
You could probably subsitutute the TCP/IP commands in 4D Internet Commands instead of ITK. I think ITK code for capturing HTML files can be found at www.4dzine.com. This technote might also be useful http://www.4d.com/docs/CMU/CMU79741.HTM.
You might also want to look at the URL commands that are available in the QFree plug-in.
The command "
QF_URLDownloadToFile" might do everything you need for you with respect to capturin g the file. There is also a "QF_URLDownloadToBLOB" command.
http://www.escape.gr/q/q_download.html
hth,
Brad
_______________________________________________ Active4D-dev mailing list [email protected] http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/
