email address 產生圖片PHP程式

來源:互聯網
上載者:User
程式

【摘 要】 最近剛好一個項目需要用到,我就決定一邊學一邊做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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" />
<head>
<title>Welcome to domain.com</title>
<meta content="all" name="robots" />
<meta content="webmaster@domain.com,US" name="author" />
<meta content="www.domain.com,Reprint from then webseits" name=Copyright />
<meta content="Welcome to domain.com!" name=description />
<meta content="About For China News Sports Entertainment Shop Business Travel" name=keywords />
<meta http-equiv=Content-Language content="iso-8859-1" />
<link rev=stylesheet media=all href="css/style01.css" type=text/css rel=stylesheet />
<style type=text/css media=all>@import url("css/style01.css");</style>
<meta http-equiv="Content-Language" content="en" />
<meta http-equiv="pics-label" content='(pics-1.1 "http://www.icra.org/ratingsv02.html" l gen true for "http://www.domain.com" r (nz 1 vz 1 lz 1 oz 1 cz 1) gen true for "http://www.domain.com" r (nz 1 vz 1 lz 1 oz 1 cz 1))' />
<meta http-equiv="reply-to" content="webmaster@domain.com" />
<meta name="Author" content="domain.com employee" />
<meta name="Copyright" content="Copyright (C) 2002-2005 xrss.cn All signature Rights Reserved." />
<meta content="MSHTML 6.00.3790.0" name="generator" />
</head>
<body>
<form action="index.php" mothod="post">
You email:<input name="mailname" type="text" value="Webmaster@domain.com" /><br /><input type="submit" value="確定" />
</form>



相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.