易截截图软件、单文件、免安装、纯绿色、仅160KB

PHP实例:用SESSION方法实现验证码

index.php(实现输入验证码页面)代码如下: Code代码如下: <html>
<head>
<title>check code</title>
</head>
<body>
<form name=check method=post action=check.php>
<input type=hidden name=init value=1>
验证码:<input type=text name=code maxlength=4 style="width=50px;">
<!--得到验证码图片-->
<img src=image.php>
<p>
<input type=submit value="提交">
</form>
</body>
</html>   image.php(验证码生成页面)代码如下: Code代码如下: <?php
session_start();
srand((double)microtime()*1000000); 
$authnum=rand(1000,9999);
session_register("authnum");
header("content-type:image/png");
        function creat_image( $width, $height, $authnum)
        {
                srand((double)microtime()*1000000); 
                 $im = imagecreate( $width, $height); 
                 $black = ImageColorAllocate( $im, 0,0,0); 
                 $white = ImageColorAllocate( $im, 255,255,255); 
                 $gray = ImageColorAllocate( $im, 200,200,200); 
                imagefill( $im,0,0, $gray); 
//将四位整数验证码绘入图片
                imag


相关文档:

php对图片添加水印类

 /*
* 功能:PHP
图片水印 (水印支持图片或文字)
* 参数:
*      $product_img    背景图片,即需要加水印的图片,暂只支持GIF,JPG,PNG格式;
*      $waterPos        水印位置,有10种状态,0为随机位置;
*  &n ......

64位动态php扩展库的编译

64位动态php扩展库的编译
 工作上需要,这个问题折腾了一阵子。不过当编译成功之后,心里还是相当的兴奋,感受到了一种成就感。也是工作中的一种乐趣。
现在将整个过程写下来,以备后续之需。
a.shared object
(1) download and install the apache
从网络中下载apache-2.0.48.tar.gz
存至/home/tmp
cd /home/ ......

PHP抓取新浪读书频道的小说,生成电子书

//想看什么电子书,先去新浪读书搜索,然后填入对应的参数即可
//http://vip.book.sina.com.cn/
//电子书参数
$array_book[0] = 38884;     //小说id
$array_book[1] = 22172;    //章节起始id
$array_book[2] = 32533;   //章节结束id
$array_book[3] = '中国特种部队 ......

PHP教程:插件机制在PHP中实现方案

 这篇文章的出发点是我对插件机制的理解,及其在PHP中的实现。此方案仅是插件机制在PHP中的实现方案之一,写下来和大家分享,欢迎大家一起讨论。
插件,亦即Plug-in,是指一类特定的功能模块(通常由第三方开发者实现),它的特点是:当你需要它的时候激活它,不需要它的时候禁用/删除它;且无论是激活还是禁用都不影 ......

PHP 发送邮件

 
PHP 发送邮件
作者:w3pop.com 翻译/整理:w3pop.com 发布:2007-04-28 修改:2007-06-17 浏览:14208 ::  :: 
 PHP Sessions
PHP allows you to send e-mails directly from a script.
PHP允许你通过脚本直接发送e-mail。
The PHP mail() Function
PHP mail()函数
The PHP m ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号