New in version 6.3.0: See the new features.
Save the web request contentΒΆ
get_web_content() |
Save web request content into a file |
SYNTAX
get_web_content(filename)
Stores the current web request content into the specified filename. This function can be used regardless of the content_type sent.
The function getenv() can be used to query CONTENT_TYPE and CONTENT_LENGTH to determine in advance the content type and length of the information saved by get_web_content().
The function returns 0 (OK) or a negative value to indicate an error. The only possible errors for this function are:
WWW_ERR_NO_CONTENT: No content has been sent in the client request
WWW_ERR_FILE_CREATION: The file could not be created
EXAMPLE
The get_web_content will save the content in the savecontent.out file:
!temp result,,i2
/* Save the content on File 'savecontent.out' */
result = get_web_content("savecontent.out")
if (result != WWW_ERR_OK) {
web_status(500, "Internal server error")
put "get_web_content Error=" / tostr(result)
end
}
RELATED TOPICS |