1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 #ifndef PHP_FILTER_H
23 #define PHP_FILTER_H
24
25 #include "SAPI.h"
26 #include "zend_API.h"
27 #include "php.h"
28 #include "php_ini.h"
29 #include "ext/standard/info.h"
30 #include "ext/standard/php_string.h"
31 #include "ext/standard/html.h"
32 #include "php_variables.h"
33
34 extern zend_module_entry filter_module_entry;
35 #define phpext_filter_ptr &filter_module_entry
36
37 #ifdef ZTS
38 #include "TSRM.h"
39 #endif
40
41 PHP_MINIT_FUNCTION(filter);
42 PHP_MSHUTDOWN_FUNCTION(filter);
43 PHP_RINIT_FUNCTION(filter);
44 PHP_RSHUTDOWN_FUNCTION(filter);
45 PHP_MINFO_FUNCTION(filter);
46
47 PHP_FUNCTION(filter_input);
48 PHP_FUNCTION(filter_var);
49 PHP_FUNCTION(filter_input_array);
50 PHP_FUNCTION(filter_var_array);
51 PHP_FUNCTION(filter_list);
52 PHP_FUNCTION(filter_has_var);
53 PHP_FUNCTION(filter_id);
54
55 ZEND_BEGIN_MODULE_GLOBALS(filter)
56 zval *post_array;
57 zval *get_array;
58 zval *cookie_array;
59 zval *env_array;
60 zval *server_array;
61 zval *session_array;
62 long default_filter;
63 long default_filter_flags;
64 ZEND_END_MODULE_GLOBALS(filter)
65
66 #ifdef ZTS
67 #define IF_G(v) TSRMG(filter_globals_id, zend_filter_globals *, v)
68 #else
69 #define IF_G(v) (filter_globals.v)
70 #endif
71
72
73 #define PHP_INPUT_FILTER_PARAM_DECL zval *value, long flags, zval *option_array, char *charset TSRMLS_DC
74 void php_filter_int(PHP_INPUT_FILTER_PARAM_DECL);
75 void php_filter_boolean(PHP_INPUT_FILTER_PARAM_DECL);
76 void php_filter_float(PHP_INPUT_FILTER_PARAM_DECL);
77 void php_filter_validate_regexp(PHP_INPUT_FILTER_PARAM_DECL);
78 void php_filter_validate_url(PHP_INPUT_FILTER_PARAM_DECL);
79 void php_filter_validate_email(PHP_INPUT_FILTER_PARAM_DECL);
80 void php_filter_validate_ip(PHP_INPUT_FILTER_PARAM_DECL);
81 void php_filter_validate_mac(PHP_INPUT_FILTER_PARAM_DECL);
82
83 void php_filter_string(PHP_INPUT_FILTER_PARAM_DECL);
84 void php_filter_encoded(PHP_INPUT_FILTER_PARAM_DECL);
85 void php_filter_special_chars(PHP_INPUT_FILTER_PARAM_DECL);
86 void php_filter_full_special_chars(PHP_INPUT_FILTER_PARAM_DECL);
87 void php_filter_unsafe_raw(PHP_INPUT_FILTER_PARAM_DECL);
88 void php_filter_email(PHP_INPUT_FILTER_PARAM_DECL);
89 void php_filter_url(PHP_INPUT_FILTER_PARAM_DECL);
90 void php_filter_number_int(PHP_INPUT_FILTER_PARAM_DECL);
91 void php_filter_number_float(PHP_INPUT_FILTER_PARAM_DECL);
92 void php_filter_magic_quotes(PHP_INPUT_FILTER_PARAM_DECL);
93
94 void php_filter_callback(PHP_INPUT_FILTER_PARAM_DECL);
95
96 #endif
97
98
99
100
101
102
103
104