// calculate a Adler32 checksum with the bytes data[start..len-1] $s1 = 1; $s2 = 0; for ($n = $start; $n < strlen($data); $n++) { $s1 = ($s1 + ord($data[$n])) % 65521; $s2 = ($s2 + $s1) % 65521; } $adler = ($s2 << 16) | $s1;
$data .= chr(($adler >> 24) & 255); $data .= chr(($adler >> 16) & 255); $data .= chr(($adler >> 8) & 255); $data .= chr($adler & 255); add_chunk("IDAT"); // IEND: marks the end of the PNG-file $data = ""; add_chunk("IEND"); // 列印图象
echo($result); ?> //如何调用,其实很简单,将上面存为Timeimg.php //然后新建一个页面如下: <html> <head> <title>test</title> <meta http-equiv="Content-Type" content="text/html"> </head> <body> <img src="http://www.jb51.net/article/Timeimg.php"> //以图象连接方式调用PHP文件 </body> </html>
(编辑:焦作站长网)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|