├── .gitignore ├── README.md ├── config.m4 ├── core.h ├── php_tonyenc.h ├── tonyenc.c ├── tonyenc.php └── windows-dlls ├── php_tonyenc_php70_x64_nts.dll └── php_tonyenc_php70_x64_ts.dll /.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | !windows-dlls/* 4 | !windows-dlls/ 5 | !config.m4 6 | !core.h 7 | !php_tonyenc.h 8 | !tonyenc.c 9 | !tonyenc.php 10 | !README.md -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 介绍 2 | 3 | - 一个简洁、高性能、跨平台的 PHP7 代码加密扩展,当前版本为 0.2.2 4 | - 对 PHP7.3 的支持在 dev 分支,还没测试,感谢 @toxmc 5 | 6 | ## 特点 7 | 8 | - 简单快速,经实测,几乎不影响性能 9 | - 兼容 OPcache、Xdebug 等其他扩展 10 | - 兼容 Linux、macOS、Windows 等系统 11 | - 兼容 Apache、Nginx + PHP-fpm、命令行等运行模式 12 | - 加密算法较简单,这是出于速度考虑,但仍不易解密 13 | - 若项目的 php 文件很多,建议只加密部分重要代码文件 14 | - 要求 PHP >= 7.0,对 PHP7.3 的支持在 dev 分支,还没测试 15 | 16 | **加密前记得备份!!!** 17 | 18 | ## 安装 19 | 20 | 编译前请在 core.h 中做如下修改: 21 | ```c 22 | /* 这里定制你的加密特征头,不限长度,十六进制哦 */ 23 | const u_char tonyenc_header[] = { 24 | 0x66, 0x88, 0xff, 0x4f, 25 | 0x68, 0x86, 0x00, 0x56, 26 | 0x11, 0x16, 0x16, 0x18, 27 | }; 28 | 29 | /* 这里指定密钥,长一些更安全 */ 30 | const u_char tonyenc_key[] = { 31 | 0x9f, 0x49, 0x52, 0x00, 32 | 0x58, 0x9f, 0xff, 0x21, 33 | 0x3e, 0xfe, 0xea, 0xfa, 34 | 0xa6, 0x33, 0xf3, 0xc6, 35 | }; 36 | ``` 37 | 38 | #### 在 Linux、macOS 上编译 39 | ``` 40 | git clone https://github.com/lihancong/tonyenc.git 41 | cd tonyenc 42 | phpize 43 | ./configure 44 | make 45 | ``` 46 | 将编译好的文件 modules/tonyenc.so 加入到配置项 extension=tonyenc.so,重启 PHP 服务 47 | 48 | #### 在 Windows 上编译 49 | 50 | 已编译了以下模块,可供测试(这里的密钥与源代码中的不同,需要安装有 [VC14 运行库](https://www.microsoft.com/zh-CN/download/details.aspx?id=48145)): 51 | ```bash 52 | # php7.0 64位 线程安全版 53 | php_tonyenc_php70_ts_VC14_x64.dll 54 | # php7.0 64位 线程非安全版 55 | php_tonyenc_php70_nts_VC14_x64.dll 56 | ``` 57 | 手动编译方法见 issues 58 | 59 | 60 | ## 加密 61 | 62 | 代码中的 `tonyenc.php` 是加密工具: 63 | ```bash 64 | php tonyenc.php example.php dir/ 65 | ``` 66 | 这样即可加密 `example.php` 和 `dir` 目录下的所有 php 文件,PHP 在运行它们时会自动解密,够简单吧! 67 | 68 | ## 版权 69 | 70 | 允许转载、修改、商用 71 | 72 | 这是我开发的第一个扩展,如有不足欢迎指正 :) 73 | -------------------------------------------------------------------------------- /config.m4: -------------------------------------------------------------------------------- 1 | dnl $Id$ 2 | dnl config.m4 for extension tonyenc 3 | 4 | dnl Comments in this file start with the string 'dnl'. 5 | dnl Remove where necessary. This file will not work 6 | dnl without editing. 7 | 8 | dnl If your extension references something external, use with: 9 | 10 | dnl PHP_ARG_WITH(tonyenc, for tonyenc support, 11 | dnl Make sure that the comment is aligned: 12 | dnl [ --with-tonyenc Include tonyenc support]) 13 | 14 | dnl Otherwise use enable: 15 | 16 | PHP_ARG_ENABLE(tonyenc, whether to enable tonyenc support, 17 | Make sure that the comment is aligned: 18 | [ --enable-tonyenc Enable tonyenc support]) 19 | 20 | if test "$PHP_TONYENC" != "no"; then 21 | dnl Write more examples of tests here... 22 | 23 | dnl # --with-tonyenc -> check with-path 24 | dnl SEARCH_PATH="/usr/local /usr" # you might want to change this 25 | dnl SEARCH_FOR="/include/tonyenc.h" # you most likely want to change this 26 | dnl if test -r $PHP_TONYENC/$SEARCH_FOR; then # path given as parameter 27 | dnl TONYENC_DIR=$PHP_TONYENC 28 | dnl else # search default path list 29 | dnl AC_MSG_CHECKING([for tonyenc files in default path]) 30 | dnl for i in $SEARCH_PATH ; do 31 | dnl if test -r $i/$SEARCH_FOR; then 32 | dnl TONYENC_DIR=$i 33 | dnl AC_MSG_RESULT(found in $i) 34 | dnl fi 35 | dnl done 36 | dnl fi 37 | dnl 38 | dnl if test -z "$TONYENC_DIR"; then 39 | dnl AC_MSG_RESULT([not found]) 40 | dnl AC_MSG_ERROR([Please reinstall the tonyenc distribution]) 41 | dnl fi 42 | 43 | dnl # --with-tonyenc -> add include path 44 | dnl PHP_ADD_INCLUDE($TONYENC_DIR/include) 45 | 46 | dnl # --with-tonyenc -> check for lib and symbol presence 47 | dnl LIBNAME=tonyenc # you may want to change this 48 | dnl LIBSYMBOL=tonyenc # you most likely want to change this 49 | 50 | dnl PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL, 51 | dnl [ 52 | dnl PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $TONYENC_DIR/$PHP_LIBDIR, TONYENC_SHARED_LIBADD) 53 | dnl AC_DEFINE(HAVE_TONYENCLIB,1,[ ]) 54 | dnl ],[ 55 | dnl AC_MSG_ERROR([wrong tonyenc lib version or lib not found]) 56 | dnl ],[ 57 | dnl -L$TONYENC_DIR/$PHP_LIBDIR -lm 58 | dnl ]) 59 | dnl 60 | dnl PHP_SUBST(TONYENC_SHARED_LIBADD) 61 | 62 | PHP_NEW_EXTENSION(tonyenc, tonyenc.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) 63 | fi 64 | -------------------------------------------------------------------------------- /core.h: -------------------------------------------------------------------------------- 1 | /** 2 | * A high performance and cross-platform encrypt extension for PHP source code. 3 | * 4 | * @author: Tony 5 | * @site: lihancong.cn 6 | * @github: github.com/lihancong/tonyenc 7 | */ 8 | 9 | /* Modify tonyenc_header to disguise your encrypt file */ 10 | const u_char tonyenc_header[] = { 11 | 0x66, 0x88, 0xff, 0x4f, 12 | 0x68, 0x86, 0x00, 0x56, 13 | 0x11, 0x61, 0x16, 0x18, 14 | }; 15 | 16 | /* Modify tonyenc_key to set the secret key */ 17 | const u_char tonyenc_key[] = { 18 | 0x9f, 0x49, 0x52, 0x00, 19 | 0x58, 0x9f, 0xff, 0x23, 20 | 0x8e, 0xfe, 0xea, 0xfa, 21 | 0xa6, 0x33, 0xf3, 0xc6, 22 | }; 23 | 24 | 25 | #ifdef PHP_WIN32 26 | # define TONYENC_RES FILE* 27 | #else 28 | # define TONYENC_RES FILE* 29 | #endif 30 | 31 | zend_op_array *(*old_compile_file)(zend_file_handle *, int); 32 | 33 | zend_op_array *cgi_compile_file(zend_file_handle *, int); 34 | 35 | int tonyenc_ext_fopen(FILE *, struct stat *, TONYENC_RES *, const char *); 36 | 37 | void tonyenc_encode(char *, size_t); 38 | 39 | void tonyenc_decode(char *, size_t); 40 | 41 | 42 | zend_op_array *cgi_compile_file(zend_file_handle *file_handle, int type) 43 | { 44 | FILE *fp; 45 | zend_string *opened_path; 46 | struct stat stat_buf; 47 | int data_len; 48 | TONYENC_RES res = 0; 49 | 50 | /* FIXME: If in cli mode with no args */ 51 | if (!strcmp(file_handle->filename, "-")) 52 | goto final; 53 | 54 | /* Skip if phar */ 55 | int size_phar = sizeof("phar") - 1; 56 | if (strlen(file_handle->filename) > size_phar && !memcmp(file_handle->filename, "phar", size_phar)) { 57 | goto final; 58 | } 59 | 60 | if (file_handle->filename) { 61 | fp = zend_fopen(file_handle->filename, &opened_path); 62 | if (fp == NULL) 63 | goto final; 64 | } 65 | 66 | fstat(fileno(fp), &stat_buf); 67 | data_len = stat_buf.st_size; 68 | if (data_len >= sizeof(tonyenc_header)) { 69 | char *t = emalloc(sizeof(tonyenc_header)); 70 | size_t read_cnt = fread(t, sizeof(tonyenc_header), 1, fp); 71 | /* If not the encoded file */ 72 | if (memcmp(t, tonyenc_header, sizeof(tonyenc_header))) { 73 | efree(t); 74 | fclose(fp); 75 | goto final; 76 | } 77 | efree(t); 78 | } else { 79 | fclose(fp); 80 | goto final; 81 | } 82 | if (tonyenc_ext_fopen(fp, &stat_buf, &res, file_handle->filename)) 83 | goto final; 84 | 85 | if (file_handle->type == ZEND_HANDLE_FP) fclose(file_handle->handle.fp); 86 | if (file_handle->type == ZEND_HANDLE_FD) close(file_handle->handle.fd); 87 | 88 | #ifdef PHP_WIN32 89 | file_handle->handle.fp = res; 90 | file_handle->type = ZEND_HANDLE_FP; 91 | #else 92 | /* pipe() limits to buf size, so we can't use it. */ 93 | file_handle->handle.fp = res; 94 | file_handle->type = ZEND_HANDLE_FP; 95 | #endif 96 | 97 | /* zend_compile_file() would using the fp, so don't destroy it. */ 98 | 99 | final: 100 | return old_compile_file(file_handle, type); 101 | } 102 | 103 | 104 | int tonyenc_ext_fopen(FILE *fp, struct stat *stat_buf, TONYENC_RES *res, const char *file_name) 105 | { 106 | char *p_data; 107 | size_t data_len; 108 | size_t write_len; 109 | 110 | data_len = stat_buf->st_size - sizeof(tonyenc_header); 111 | p_data = (char *) emalloc(data_len); 112 | fseek(fp, sizeof(tonyenc_header), SEEK_SET); 113 | fread(p_data, data_len, 1, fp); 114 | fclose(fp); 115 | 116 | tonyenc_decode(p_data, data_len); 117 | 118 | 119 | #ifdef PHP_WIN32 120 | /* tmpfile_s() limits the number of calls, about to 2^32 in win7 */ 121 | if (tmpfile_s(res)) { 122 | php_error_docref(NULL, E_CORE_ERROR, "tonyenc: Failed to create temp file, may be too many open files.\n"); 123 | efree(p_data); 124 | return -1; 125 | } 126 | 127 | if (fwrite(p_data, data_len, 1, *res) != 1) { 128 | php_error_docref(NULL, E_CORE_ERROR, "tonyenc: Failed to write temp file.\n"); 129 | efree(p_data); 130 | fclose(*res); 131 | return -2; 132 | } 133 | rewind(*res); 134 | #else 135 | /* tmpfile() limits the number of calls, about to 2^32 in Linux */ 136 | *res = tmpfile(); 137 | if (*res == NULL) { 138 | php_error_docref(NULL, E_CORE_ERROR, "tonyenc: Failed to create temp file, may be too many open files.\n"); 139 | efree(p_data); 140 | return -1; 141 | } 142 | 143 | if (fwrite(p_data, data_len, 1, *res) != 1) { 144 | php_error_docref(NULL, E_CORE_ERROR, "tonyenc: Failed to write temp file.\n"); 145 | efree(p_data); 146 | fclose(*res); 147 | return -2; 148 | } 149 | rewind(*res); 150 | #endif 151 | 152 | efree(p_data); 153 | 154 | return SUCCESS; 155 | } 156 | 157 | 158 | void tonyenc_encode(char *data, size_t len) 159 | { 160 | size_t i, p = 0; 161 | for (i = 0; i < len; ++i) { 162 | if (i & 1) { 163 | p += tonyenc_key[p] + i; 164 | p %= sizeof(tonyenc_key); 165 | u_char t = tonyenc_key[p]; 166 | data[i] = ~(data[i] ^ t); 167 | } 168 | } 169 | } 170 | 171 | 172 | void tonyenc_decode(char *data, size_t len) 173 | { 174 | size_t i, p = 0; 175 | for (i = 0; i < len; ++i) { 176 | if (i & 1) { 177 | p += tonyenc_key[p] + i; 178 | p %= sizeof(tonyenc_key); 179 | u_char t = tonyenc_key[p]; 180 | data[i] = ~data[i] ^ t; 181 | } 182 | } 183 | } 184 | -------------------------------------------------------------------------------- /php_tonyenc.h: -------------------------------------------------------------------------------- 1 | /** 2 | +----------------------------------------------------------------------+ 3 | | PHP Version 7 | 4 | +----------------------------------------------------------------------+ 5 | | Copyright (c) 1997-2017 The PHP Group | 6 | +----------------------------------------------------------------------+ 7 | | This source file is subject to version 3.01 of the PHP license, | 8 | | that is bundled with this package in the file LICENSE, and is | 9 | | available through the world-wide-web at the following url: | 10 | | http://www.php.net/license/3_01.txt | 11 | | If you did not receive a copy of the PHP license and are unable to | 12 | | obtain it through the world-wide-web, please send a note to | 13 | | license@php.net so we can mail you a copy immediately. | 14 | +----------------------------------------------------------------------+ 15 | | Author: Tony lihancong.cn github.com/lihancong/tonyenc | 16 | +----------------------------------------------------------------------+ 17 | */ 18 | 19 | /* $Id$ */ 20 | 21 | #ifndef PHP_TONYENC_H 22 | #define PHP_TONYENC_H 23 | 24 | extern zend_module_entry tonyenc_module_entry; 25 | #define phpext_tonyenc_ptr &tonyenc_module_entry 26 | 27 | #define PHP_TONYENC_VERSION "0.2.2" /* Replace with version number for your extension */ 28 | 29 | #ifdef PHP_WIN32 30 | # define PHP_TONYENC_API __declspec(dllexport) 31 | #elif defined(__GNUC__) && __GNUC__ >= 4 32 | # define PHP_TONYENC_API __attribute__ ((visibility("default"))) 33 | #else 34 | # define PHP_TONYENC_API 35 | #endif 36 | 37 | #ifdef ZTS 38 | #include "TSRM.h" 39 | #endif 40 | 41 | /* 42 | Declare any global variables you may need between the BEGIN 43 | and END macros here: 44 | 45 | ZEND_BEGIN_MODULE_GLOBALS(tonyenc) 46 | zend_long global_value; 47 | char *global_string; 48 | ZEND_END_MODULE_GLOBALS(tonyenc) 49 | */ 50 | 51 | /* Always refer to the globals in your function as TONYENC_G(variable). 52 | You are encouraged to rename these macros something shorter, see 53 | examples in any other php module directory. 54 | */ 55 | #define TONYENC_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(tonyenc, v) 56 | 57 | #if defined(ZTS) && defined(COMPILE_DL_TONYENC) 58 | ZEND_TSRMLS_CACHE_EXTERN() 59 | #endif 60 | 61 | #endif /* PHP_TONYENC_H */ 62 | 63 | 64 | /* 65 | * Local variables: 66 | * tab-width: 4 67 | * c-basic-offset: 4 68 | * End: 69 | * vim600: noet sw=4 ts=4 fdm=marker 70 | * vim<600: noet sw=4 ts=4 71 | */ 72 | -------------------------------------------------------------------------------- /tonyenc.c: -------------------------------------------------------------------------------- 1 | /** 2 | +----------------------------------------------------------------------+ 3 | | PHP Version 7 | 4 | +----------------------------------------------------------------------+ 5 | | Copyright (c) 1997-2017 The PHP Group | 6 | +----------------------------------------------------------------------+ 7 | | This source file is subject to version 3.01 of the PHP license, | 8 | | that is bundled with this package in the file LICENSE, and is | 9 | | available through the world-wide-web at the following url: | 10 | | http://www.php.net/license/3_01.txt | 11 | | If you did not receive a copy of the PHP license and are unable to | 12 | | obtain it through the world-wide-web, please send a note to | 13 | | license@php.net so we can mail you a copy immediately. | 14 | +----------------------------------------------------------------------+ 15 | | Author: Tony htmln.com github.com/lihancong/tonyenc | 16 | +----------------------------------------------------------------------+ 17 | */ 18 | 19 | /* $Id$ */ 20 | 21 | #ifdef HAVE_CONFIG_H 22 | #include "config.h" 23 | #endif 24 | 25 | #include "php.h" 26 | #include "php_ini.h" 27 | #include "ext/standard/info.h" 28 | #include "php_tonyenc.h" 29 | 30 | #include "core.h" 31 | 32 | /* If you declare any globals in php_tonyenc.h uncomment this: 33 | ZEND_DECLARE_MODULE_GLOBALS(tonyenc) 34 | */ 35 | 36 | 37 | /* {{{ PHP_INI 38 | */ 39 | /* Remove comments and fill if you need to have entries in php.ini 40 | PHP_INI_BEGIN() 41 | STD_PHP_INI_ENTRY("tonyenc.global_value", "42", PHP_INI_ALL, OnUpdateLong, global_value, zend_tonyenc_globals, tonyenc_globals) 42 | STD_PHP_INI_ENTRY("tonyenc.global_string", "foobar", PHP_INI_ALL, OnUpdateString, global_string, zend_tonyenc_globals, tonyenc_globals) 43 | PHP_INI_END() 44 | */ 45 | /* }}} */ 46 | 47 | /* Remove the following function when you have successfully modified config.m4 48 | so that your module can be compiled into PHP, it exists only for testing 49 | purposes. */ 50 | 51 | /* Every user-visible function in PHP should document itself in the source */ 52 | /* {{{ */ 53 | PHP_FUNCTION(tonyenc_encode) 54 | { 55 | zend_string *strg; 56 | 57 | if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &strg) == FAILURE) { 58 | return; 59 | } 60 | 61 | /* If encoded */ 62 | if (!memcmp(ZSTR_VAL(strg), tonyenc_header, sizeof(tonyenc_header))) { 63 | RETURN_FALSE; 64 | } 65 | 66 | char *t = emalloc(sizeof(tonyenc_header) + ZSTR_LEN(strg)); 67 | memcpy(t, tonyenc_header, sizeof(tonyenc_header)); 68 | if (ZSTR_LEN(strg) > 0) { 69 | tonyenc_encode(ZSTR_VAL(strg), ZSTR_LEN(strg)); 70 | memcpy(t + sizeof(tonyenc_header), ZSTR_VAL(strg), ZSTR_LEN(strg)); 71 | } 72 | 73 | RETURN_STR(zend_string_init(t, sizeof(tonyenc_header) + ZSTR_LEN(strg), 0)); 74 | } 75 | /* }}} */ 76 | 77 | /* 78 | PHP_FUNCTION(tonyenc_decode) 79 | { 80 | zend_string *strg; 81 | 82 | if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &strg) == FAILURE) { 83 | return; 84 | } 85 | 86 | if (memcmp(ZSTR_VAL(strg), tonyenc_header, sizeof(tonyenc_header))) { 87 | RETURN_FALSE; 88 | } 89 | 90 | size_t len = ZSTR_LEN(strg) - sizeof(tonyenc_header); 91 | if (ZSTR_LEN(strg) > 0) { 92 | tonyenc_decode(ZSTR_VAL(strg) + sizeof(tonyenc_header), len); 93 | } 94 | 95 | RETURN_STR(zend_string_init(ZSTR_VAL(strg) + sizeof(tonyenc_header), len, 0)); 96 | } 97 | */ 98 | 99 | /* {{{ php_tonyenc_init_globals 100 | */ 101 | /* Uncomment this function if you have INI entries 102 | static void php_tonyenc_init_globals(zend_tonyenc_globals *tonyenc_globals) 103 | { 104 | tonyenc_globals->global_value = 0; 105 | tonyenc_globals->global_string = NULL; 106 | } 107 | */ 108 | /* }}} */ 109 | 110 | /* {{{ PHP_MINIT_FUNCTION 111 | */ 112 | PHP_MINIT_FUNCTION(tonyenc) 113 | { 114 | /* If you have INI entries, uncomment these lines 115 | REGISTER_INI_ENTRIES(); 116 | */ 117 | 118 | old_compile_file = zend_compile_file; 119 | zend_compile_file = cgi_compile_file; 120 | 121 | return SUCCESS; 122 | } 123 | /* }}} */ 124 | 125 | /* {{{ PHP_MSHUTDOWN_FUNCTION 126 | */ 127 | PHP_MSHUTDOWN_FUNCTION(tonyenc) 128 | { 129 | /* uncomment this line if you have INI entries 130 | UNREGISTER_INI_ENTRIES(); 131 | */ 132 | 133 | zend_compile_file = old_compile_file; 134 | 135 | return SUCCESS; 136 | } 137 | /* }}} */ 138 | 139 | /* Remove if there's nothing to do at request start */ 140 | /* {{{ PHP_RINIT_FUNCTION 141 | */ 142 | PHP_RINIT_FUNCTION(tonyenc) 143 | { 144 | #if defined(COMPILE_DL_TONYENC) && defined(ZTS) 145 | ZEND_TSRMLS_CACHE_UPDATE(); 146 | #endif 147 | return SUCCESS; 148 | } 149 | /* }}} */ 150 | 151 | /* Remove if there's nothing to do at request end */ 152 | /* {{{ PHP_RSHUTDOWN_FUNCTION 153 | */ 154 | PHP_RSHUTDOWN_FUNCTION(tonyenc) 155 | { 156 | return SUCCESS; 157 | } 158 | /* }}} */ 159 | 160 | /* {{{ PHP_MINFO_FUNCTION 161 | */ 162 | PHP_MINFO_FUNCTION(tonyenc) 163 | { 164 | php_info_print_table_start(); 165 | php_info_print_table_header(2, "Tonyenc Support", "enabled"); 166 | php_info_print_table_row(2, "Version", PHP_TONYENC_VERSION); 167 | php_info_print_table_row(2, "Open Sourced By", "htmln.com"); 168 | php_info_print_table_end(); 169 | 170 | /* Remove comments if you have entries in php.ini 171 | DISPLAY_INI_ENTRIES(); 172 | */ 173 | } 174 | /* }}} */ 175 | 176 | /* {{{ tonyenc_functions[] 177 | * 178 | * Every user visible function must have an entry in tonyenc_functions[]. 179 | */ 180 | const zend_function_entry tonyenc_functions[] = { 181 | PHP_FE(tonyenc_encode, NULL) 182 | PHP_FE_END /* Must be the last line in tonyenc_functions[] */ 183 | }; 184 | /* }}} */ 185 | 186 | /* {{{ tonyenc_module_entry 187 | */ 188 | zend_module_entry tonyenc_module_entry = { 189 | STANDARD_MODULE_HEADER, 190 | "tonyenc", 191 | tonyenc_functions, 192 | PHP_MINIT(tonyenc), 193 | PHP_MSHUTDOWN(tonyenc), 194 | NULL, /* Replace with NULL if there's nothing to do at request start */ 195 | NULL, /* Replace with NULL if there's nothing to do at request end */ 196 | PHP_MINFO(tonyenc), 197 | PHP_TONYENC_VERSION, 198 | STANDARD_MODULE_PROPERTIES 199 | }; 200 | /* }}} */ 201 | 202 | #ifdef COMPILE_DL_TONYENC 203 | #ifdef ZTS 204 | ZEND_TSRMLS_CACHE_DEFINE() 205 | #endif 206 | ZEND_GET_MODULE(tonyenc) 207 | #endif 208 | 209 | /* 210 | * Local variables: 211 | * tab-width: 4 212 | * c-basic-offset: 4 213 | * End: 214 | * vim600: noet sw=4 ts=4 fdm=marker 215 | * vim<600: noet sw=4 ts=4 216 | */ 217 | -------------------------------------------------------------------------------- /tonyenc.php: -------------------------------------------------------------------------------- 1 |