Home > php教程 > php手册 > email address 生成图片PHP程序

email address 生成图片PHP程序

WBOY
Release: 2016-06-21 09:07:06
Original
954 people have browsed it

程序

【摘 要】 最近刚好一个项目需要用到,我就决定一边学一边做PHP.从PHP诞生之日起,PHP就开始在Web应用方面为广大的程序员服务。同时,作为针对Web开发量身定制的脚本语言,PHP一直秉承简单、开源的思想,这也使得PHP得以快速的发展,并且大力地推动Web2.0的出现与发展。
把下面的文件保存为index.php

然后把两个文件放在同一个目录就可以了.

这个程序主要是.
通过get获取值后生成.
一个图片格式的email地址.
主要是为了防止email搜索软件抓取email地址.


/*
MailX Managment System 0.8 Beta
*/
header("Content-type:image/png");
$mailaddress=$_GET['mailname'];
$mailaddresslen=strlen($mailaddress);
$mailaddressimages=imagecreate($mailaddresslen*10,25);
$lenadd=$mailaddresslen;
$fontsize="4";
$center=(imagesx($mailaddressimages)-8.3*strlen($mailaddress))/2;
$mailimagesbackground=ImageColorAllocate($mailaddressimages,231,196,43);
$mailimagesfacecolor=ImageColorAllocate($mailaddressimages,0,0,0);
ImageString($mailaddressimages,$fontsize,$center,5,$mailaddress,$mailimagesfacecolor);
Imagepng($mailaddressimages); 
ImageDestroy($mailaddressimages);
?>


把下面的文件保存为index.html




Welcome to domain.com

















You email:




Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template