<?php class Cookie { /** * 解密已经加密了的cookie * * @param string $encryptedText * @return st…
/** * 常用对称加密算法类 * 支持密钥:64/128/256 bit(字节长度8/16/32) * 支持算法:DES/AES(根据密钥长度自动匹配使用:DES:64bit A…
一个简单的方法来发送带有附件的HTML电子邮件。 <?php // Set who this goes to: $to = array('Billy Bob','billy@…
注意函数transfer_time()中的参数$time必须为Unix时间戳,如果不是请先用strtotime()将其转换成Unix时间戳 <?php date_defaul…
将一张JPG图像转换成ASCII码。 <html> <head> <title>Ascii</title> <style>…
<?php $fp = fopen('sample.csv','r') or die("can't open file"); print "&l…
image.php <?php // Font directory + font name $font = 'fonts/Disney.ttf'; // Total numb…
一段php生成随机颜色的代码,如:FF00FF function random_color(){ mt_srand((double)microtime()*1000000); $c…
表单代码 <form name="form1" method="post" action="admin_upfile.php…
这个代码使用 cURL来取得一张图片,然后在页面上展示它的缩略图。但不保存。 <?php //$url = "http://share.meebo.com/cont…
此代码将帮助你学习如何将图像转换成一个base64字符串。 <title>Image to Base64 String</title> <fields…
<?php /** * * @param String $string * @return float * * Returns a float between 0 and 1…