摘要:        
实现获取http内容的php函数。代码如下:<?phpfunction http_open($url, $data, $cookie = null, $method = "GET", $timeout = 60) {$options = array();$options['http']['method'] = $method;$options['http']['user_agent'] = $_SERVER['HTTP_USER_AGENT'];$options['http'    阅读全文
        
            posted @ 2014-02-17 06:53
un123
阅读(335)
评论(0)
推荐(0)
        
        
            
        
        
摘要:        
一个加解密类。如果你想在用户忘记密码时为他或她找回原来的密码,那么这个类是个好用的工具用户注册的密码一般不会明文保存,总得加个密先。最简单的当然是在数据库sql语句中调用md5函数加密用户密码。这里介绍一个加解密类。如果你想在用户忘记密码时为他或她找回原来的密码,那么这个类是个好用的工具。当然,这个加解密类也可用于其他用途。skey = hash("md5", $key, true); //32位skey}public function safe_b64encode($string) {$data = base64_encode($string);$data = str_r    阅读全文
        
            posted @ 2014-02-17 06:52
un123
阅读(415)
评论(0)
推荐(0)
        
        
            
        
        
摘要:        
php加密解密示例,代码如下:';echo '解密:'.encrypt($token, 'D', 'jbxue');/********************************************函数名称:encrypt函数作用:加密解密字符串使用方法:加密 :encrypt('str','E','qingdou');解密 :encrypt('被加密过的字符串','D','qingdou');参数说明:$string :需要加密解密的    阅读全文
        
            posted @ 2014-02-17 06:50
un123
阅读(2753)
评论(0)
推荐(0)
        
        
            
        
        
摘要:        
php实现的aes加密类,代码中有使用方法。bit = $bit;$this->key = $key;$this->iv = $iv;$this->mode = $mode;switch($this->bit) {case 192:$this->cipher = MCRYPT_RIJNDAEL_192; break;case 256:$this->cipher = MCRYPT_RIJNDAEL_256; break;default: $this->cipher = MCRYPT_RIJNDAEL_128;} // www.jbxue.comswitc    阅读全文
        
            posted @ 2014-02-17 06:49
un123
阅读(2505)
评论(0)
推荐(0)
        
        
 
                    
                     
                    
                 
                    
                 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号