ph_webaddblob PowerHome formula function
Description
Adds blob data to a PSP blob output page.
Syntax
ph_webaddblob ( type, parm1 )
Argument Description
type The type of blob data to add. Use 1 to convert parm1 string data into blob data. Use 2 to read the file specified in parm1 and add it to the blob output. Use 3 to retrieve the URL specified in parm1 into the blob output. Use 4 to add binary data contained in parm1 that has been previously encoded using the s2h function. The data will be decoded to binary and added to the blob output.
parm1 String. If the type is 1, the string is converted to a blob and added to the blob output page. If the type is 2, then parm1 should point to the full path and filename of a file to append to the blob output page. If type is 3, then parm1 should contain the URL of a file or webpage to be retrieved and appended to the blob output file. If type is 4, then parm1 should contain data that was encoded using the s2h function.
Return value
Integer. Returns 0 if successful, 1 if an error ocurrs.
Usage
This function is only useful from within PSP pages. Every PSP page contains a blob output page. In a normal PSP page, output blob page is empty and the file is searched for formulas enclosed within PSP tags that are evaluated and then replaced with the results. The resulting file is then returned from the webserver. If data is added to the blob output page using the ph_webaddblob function, then the blob output page is instead returned from the webserver instead of the evaluated PSP.

See also ph_webclearblob.