In your extension's PHP_MINIT_FUNCTION:
sapi_register_input_filter(sqlite_sapi_input_filter);
The filter function's signature:
unsigned int sqlite_sapi_input_filter(
int arg, /* 0 = POST, 1 = GET, 2 = COOKIE */
char *var_name, /* The original variables name */
char **val, /* The original variables value */
unsigned int val_len, /* The original variables length */
unsigned int *new_val_len /* The length of the modified
* variable */
)
The function should return:
- 0: if the variable should be discarded
- 1: if the variable should be registered