<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>AntonelloCicchese.com &#187; Php</title>
	<atom:link href="http://www.antonellocicchese.com/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.antonellocicchese.com</link>
	<description></description>
	<lastBuildDate>Wed, 28 Apr 2010 20:19:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>post2pdf update 0.4</title>
		<link>http://www.antonellocicchese.com/2007/10/13/post2pdf-update-04/</link>
		<comments>http://www.antonellocicchese.com/2007/10/13/post2pdf-update-04/#comments</comments>
		<pubDate>Sat, 13 Oct 2007 11:05:42 +0000</pubDate>
		<dc:creator>antonello</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[exportation]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[post2pdf]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.antonellocicchese.com/2007/10/13/post2pdf-update-04/</guid>
		<description><![CDATA[Here it is, the new version with a lot of new features like default exportation action configurable&#8230;
Have a look

]]></description>
			<content:encoded><![CDATA[<p>Here it is, the new version with a lot of new features like default exportation action configurable&#8230;</p>
<p><a href="http://www.antonellocicchese.com/post2pdf-wordpress-plugin/">Have a look</a><br />
<!--post2pdf_exclude--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.antonellocicchese.com/2007/10/13/post2pdf-update-04/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>post2pdf 0.3.1 bug solved</title>
		<link>http://www.antonellocicchese.com/2007/05/21/post2pdf-bug-solved/</link>
		<comments>http://www.antonellocicchese.com/2007/05/21/post2pdf-bug-solved/#comments</comments>
		<pubDate>Mon, 21 May 2007 20:38:26 +0000</pubDate>
		<dc:creator>antonello</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.antonellocicchese.com/2007/05/21/post2pdf-bug-solved/</guid>
		<description><![CDATA[Due to Wordpress recent changes the previous 0.3 version of the plugin doesn&#8217;t work correctly with WP 2.2.
The problem seems to be solved now, so please downaload it again and let me know if you experience problems.
A causa di recenti cambiamenti nel codice di wordpress la vecchia versione 0.3 non funziona  correttamente, il problema [...]]]></description>
			<content:encoded><![CDATA[<p>Due to Wordpress recent changes the previous 0.3 version of the plugin doesn&#8217;t work correctly with WP 2.2.<br />
The problem seems to be solved now, so please downaload it again and let me know if you experience problems.</p>
<p>A causa di recenti cambiamenti nel codice di wordpress la vecchia versione 0.3 non funziona  correttamente, il problema sembra risolto, vi prego quindi di scaricare la nuova versione del plugin e farmi sapere se riscontrate degli errori.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.antonellocicchese.com/2007/05/21/post2pdf-bug-solved/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>post2pdf update 0.3</title>
		<link>http://www.antonellocicchese.com/2007/04/15/post2pdf-update-03/</link>
		<comments>http://www.antonellocicchese.com/2007/04/15/post2pdf-update-03/#comments</comments>
		<pubDate>Sun, 15 Apr 2007 11:42:42 +0000</pubDate>
		<dc:creator>antonello</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.antonellocicchese.com/2007/04/15/post2pdf-update-03/</guid>
		<description><![CDATA[Version 0.3 of post2pdf is finally out&#8230;
You can find in the new version some usefull addons as:

Export tag included to place the export button wherever you want in the post body, like this 
Configuration file added to change the html code and the default export and exclude tags

I hope you will like it&#8230; read more [...]]]></description>
			<content:encoded><![CDATA[<p>Version 0.3 of post2pdf is finally out&#8230;</p>
<p>You can find in the new version some usefull addons as:</p>
<ul>
<li>Export tag included to place the export button wherever you want in the post body, like this <!--post2pdf_export--></li>
<li>Configuration file added to change the html code and the default export and exclude tags</li>
</ul>
<p>I hope you will like it&#8230; <a href="http://www.antonellocicchese.com/post2pdf-wordpress-plugin/">read more about it</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.antonellocicchese.com/2007/04/15/post2pdf-update-03/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Regular expressions vol.1</title>
		<link>http://www.antonellocicchese.com/2007/03/24/regular-expressions-vol1/</link>
		<comments>http://www.antonellocicchese.com/2007/03/24/regular-expressions-vol1/#comments</comments>
		<pubDate>Sat, 24 Mar 2007 15:58:40 +0000</pubDate>
		<dc:creator>antonello</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Regex]]></category>
		<category><![CDATA[WebMaster]]></category>

		<guid isPermaLink="false">http://www.antonellocicchese.com/2007/03/24/regular-expressions-vol1/</guid>
		<description><![CDATA[Validazione email &#8211; Email validation:
^[_a-zA-Z0-9-]+(.[_a-zA-Z0-9-]+)*@[_a-zA-Z0-9-]+(.[_a-zA-Z0-9-]+)*(.[a-z]{2,3})$
 Parsing file di log di Apache &#8211; Apache log parsing:
(\d+\.\d+\.\d+\.\d+) (-&#124;\w*) (-&#124;\w*) \[(\d+\/\w+\/\d+):(\d+:\d+:\d+) -(\d\d\d\d)\] "([^"]*)" (\d+) (-&#124;\d+) "([^"]*)" "(.*)"\s*\Z
se utilizzate python è estremamente utile compilare l&#8217;espressione regolare che ho appena scritto in questo modo:
myregex = re.compile('(?P\d+\.\d+\.\d+\.\d+) (?P-&#124;\w*) (?P-&#124;\w*) \[(?P\d+\/\w+\/\d+):(?P\d+:\d+:\d+) -(?P\d\d\d\d)\] "(?P[^"]*)" (?P\d+) (?P-&#124;\d+) "(?P[^"]*)" "(?P.*)"\s*\Z')
in questo modo utilizzando questo codice:
log [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Validazione email &#8211; Email validation:</strong><br />
<code>^[_a-zA-Z0-9-]+(.[_a-zA-Z0-9-]+)*@[_a-zA-Z0-9-]+(.[_a-zA-Z0-9-]+)*(.[a-z]{2,3})$</code></p>
<p><strong> Parsing file di log di Apache &#8211; Apache log parsing:</strong><br />
<code>(\d+\.\d+\.\d+\.\d+) (-|\w*) (-|\w*) \[(\d+\/\w+\/\d+):(\d+:\d+:\d+) -(\d\d\d\d)\] "([^"]*)" (\d+) (-|\d+) "([^"]*)" "(.*)"\s*\Z</code></p>
<p>se utilizzate python è estremamente utile compilare l&#8217;espressione regolare che ho appena scritto in questo modo:<br />
<code>myregex = re.compile('(?P<ip>\d+\.\d+\.\d+\.\d+) (?P<identd>-|\w*) (?P<auth>-|\w*) \[(?P<date>\d+\/\w+\/\d+):(?P<time>\d+:\d+:\d+) -(?P<timezone>\d\d\d\d)\] "(?P<request>[^"]*)" (?P<response>\d+) (?P<byte>-|\d+) "(?P<referrer>[^"]*)" "(?P<browser>.*)"\s*\Z')</browser></referrer></byte></response></request></timezone></time></date></auth></identd></ip></code></p>
<p>in questo modo utilizzando questo codice:</p>
<pre lang="python">log = self.regex.match(row)
log_line = log.groupdict()</pre>
<p>nella variabile log_line otterrete un dizionario contenente come chiavi i valori che avete inserito nella fase di compilazione come ?P<nome> e come valore la relativa sottostringa, ad esempio log_line['ip'] = valore ip .</nome></p>
]]></content:encoded>
			<wfw:commentRss>http://www.antonellocicchese.com/2007/03/24/regular-expressions-vol1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>post2pdf update 0.2</title>
		<link>http://www.antonellocicchese.com/2007/02/06/post2pdf-update-02/</link>
		<comments>http://www.antonellocicchese.com/2007/02/06/post2pdf-update-02/#comments</comments>
		<pubDate>Tue, 06 Feb 2007 16:20:30 +0000</pubDate>
		<dc:creator>antonello</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.antonellocicchese.com/2007/02/06/post2pdf-update-02/</guid>
		<description><![CDATA[Great news, version 0.2 of post2pdf is finally out&#8230;
You can find in the new version some usefull addons as:

Visual editor button to insert exclusion tag
Html table support
Image support improved with a best effort techinque
Category exportation

I hope you will like it&#8230; read more about it
]]></description>
			<content:encoded><![CDATA[<p>Great news, version 0.2 of post2pdf is finally out&#8230;</p>
<p>You can find in the new version some usefull addons as:</p>
<ul>
<li>Visual editor button to insert exclusion tag</li>
<li>Html table support</li>
<li>Image support improved with a best effort techinque</li>
<li>Category exportation</li>
</ul>
<p>I hope you will like it&#8230; <a href="http://www.antonellocicchese.com/post2pdf-wordpress-plugin/">read more about it</a><!--post2pdf_exclude--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.antonellocicchese.com/2007/02/06/post2pdf-update-02/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>post2pdf update 0.1.4</title>
		<link>http://www.antonellocicchese.com/2007/01/18/post2pdf-update-014/</link>
		<comments>http://www.antonellocicchese.com/2007/01/18/post2pdf-update-014/#comments</comments>
		<pubDate>Thu, 18 Jan 2007 11:31:00 +0000</pubDate>
		<dc:creator>antonello</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.antonellocicchese.com/2007/01/18/post2pdf-update-014/</guid>
		<description><![CDATA[A little bug solved, new version released.
download here http://www.antonellocicchese.com/post2pdf-wordpress-plugin/


And I am currently testing the v0.2, look at my categories they could be exported now!
As soon as the new version will become more stable I&#8217;ll release it.
]]></description>
			<content:encoded><![CDATA[<p>A little bug solved, new version released.</p>
<p>download here <a href="http://www.antonellocicchese.com/post2pdf-wordpress-plugin/">http://www.antonellocicchese.com/post2pdf-wordpress-plugin/</a><br />
<!--post2pdf_exclude--><br />
<strong><br />
And I am currently testing the v0.2, look at my categories they could be exported now!<br />
As soon as the new version will become more stable I&#8217;ll release it.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.antonellocicchese.com/2007/01/18/post2pdf-update-014/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New post2pdf plugin page</title>
		<link>http://www.antonellocicchese.com/2007/01/11/new-post2pdf-plugin-page/</link>
		<comments>http://www.antonellocicchese.com/2007/01/11/new-post2pdf-plugin-page/#comments</comments>
		<pubDate>Thu, 11 Jan 2007 10:41:05 +0000</pubDate>
		<dc:creator>antonello</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.antonellocicchese.com/2007/01/11/new-post2pdf-plugin-page/</guid>
		<description><![CDATA[Ciao a tutti, vi comunico che ho appena spostato il materiale su post2pdf in una nuova pagina statica, questo è il link: post2pdf
Hi, i have moved all the content about post2pdf plugin in a new static page, and this is the link: post2pdf

]]></description>
			<content:encoded><![CDATA[<p>Ciao a tutti, vi comunico che ho appena spostato il materiale su post2pdf in una nuova pagina statica, questo è il link: <a href="http://www.antonellocicchese.com/post2pdf-wordpress-plugin/" target="_self">post2pdf</a></p>
<p>Hi, i have moved all the content about post2pdf plugin in a new static page, and this is the link: <a href="http://www.antonellocicchese.com/post2pdf-wordpress-plugin/" target="_self">post2pdf</a><br />
<!--post2pdf_exclude--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.antonellocicchese.com/2007/01/11/new-post2pdf-plugin-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress post2pdf plugin</title>
		<link>http://www.antonellocicchese.com/2006/12/19/wordpress-post2pdf-plugin/</link>
		<comments>http://www.antonellocicchese.com/2006/12/19/wordpress-post2pdf-plugin/#comments</comments>
		<pubDate>Mon, 18 Dec 2006 22:08:54 +0000</pubDate>
		<dc:creator>antonello</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.antonellocicchese.com/2006/12/19/wordpress-post2pdf-plugin/</guid>
		<description><![CDATA[
Post moved here

Hello, this is my brand new wordpress plugin, it is still in a beta version, so use it at your own risk.

What does it do? It converts all your posts in a pdf document, you don&#8217;t need any particular application installed on your server or php extention, all you need (is love) is [...]]]></description>
			<content:encoded><![CDATA[<p align="center">
<h1><a href="http://www.antonellocicchese.com/post2pdf-wordpress-plugin/" target="_self">Post moved here</a></h1>
</p>
<p><img align="left" title="Wordpress plugin" id="image61" alt="Wordpress plugin" src="http://www.antonellocicchese.com/wp-content/uploads/2006/12/wp-20-square-button.thumbnail.jpg" />Hello, this is my brand new wordpress plugin, it is still in a beta version, so use it at your own risk.<br />
<span id="more-57"></span><br />
What does it do? It converts all your posts in a pdf document, you don&#8217;t need any particular application installed on your server or php extention, all you need (is love) is the plugin unzipped in your plugin directory and then activated in Plugin tab!</p>
<p>Only a small subset of html tag are supported by this plugin now, and in some cases it doesn&#8217;t render the document in a very good shape, but as i said, it is a beta&#8230;</p>
<p>Tags currently supported are</p>
<pre lang="html4strict">img, a, b, i, li, ol, code, em, pre,  strong, font, h1, h2, h3, h4, br</pre>
<p>and images are restricted to jpg and png, so don&#8217;t expect too much, please.</p>
<p>This plugin is based on a pdf conversion class written by me and built on <a target="_blank" href="http://www.fpdf.org/">fpdf library</a>.</p>
<p>As soon as possible i will post also the pdf class and so you can read more about it and more about customization, at this moment no customizations are avaiilable for the plugin.</p>
<p><strong>Installation</strong>:</p>
<ol>
<li>Upload to your plugins folder, usually `wp-content/plugins/`</li>
<li>Activate the plugin on the plugin screen</li>
<li>For better results, if you use accented character like &#8220;à,é,è,ì,ò,ù&#8221; please set your wordpress encoding to ISO-8859-1 in Option/Reading menu.</li>
</ol>
<p><strong>Ver:</strong> 0.1.2<br />
<strong>State:</strong> beta<br />
<strong>Latest update:</strong> 07 january 2007</p>
<p>Here you can dowload the zip version of <a title="Post2Pdf" href="http://www.antonellocicchese.com/UserFiles/files/post2pdf.zip">Post2Pdf plugin</a> .<br />
Here you can dowload the gzip version of <a title="Post2Pdf" href="http://www.antonellocicchese.com/UserFiles/files/post2pdf.tar.gz">Post2Pdf plugin</a> .</p>
<p><strong>Update history:</strong></p>
<p>&#8211; 07 january 2007 &#8211;<br />
You can now exclude the plugin in a post or in a page simply including this tag in the text: <strong>&lt;!&#8211;post2pdf_exclude&#8211;&gt;</strong> (the string it&#8217;s without spaces)</p>
<p>&#8211; 20 december 2006 &#8211;<br />
Small bug resolved, image support improved.</p>
<p align="center">
<h1><a href="http://www.antonellocicchese.com/post2pdf-wordpress-plugin/" target="_self">Post moved here</a></h1></p>
]]></content:encoded>
			<wfw:commentRss>http://www.antonellocicchese.com/2006/12/19/wordpress-post2pdf-plugin/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Conversione colori da hex a rgb</title>
		<link>http://www.antonellocicchese.com/2006/12/01/conversione-colori-hex-rgb/</link>
		<comments>http://www.antonellocicchese.com/2006/12/01/conversione-colori-hex-rgb/#comments</comments>
		<pubDate>Fri, 01 Dec 2006 14:28:40 +0000</pubDate>
		<dc:creator>antonello</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[WebMaster]]></category>

		<guid isPermaLink="false">http://www.antonellocicchese.com/2006/12/01/conversione-colori-hex-rgb/</guid>
		<description><![CDATA[Vi presento un piccola funzione in grado di convertire un codice colore nel formato esadecimale (quello cioè utilizzato nei file html e css) in un codice RGB (Red, Green, Blue), restituendo un vettore le cui componenti corrispondono ai singoli colori.
Lo script è particolarmente utile quando si debbono utilizzare le librerie grafiche di PHP come ad [...]]]></description>
			<content:encoded><![CDATA[<p>Vi presento un piccola funzione in grado di convertire un codice colore nel formato esadecimale (quello cioè utilizzato nei file html e css) in un codice RGB (Red, Green, Blue), restituendo un vettore le cui componenti corrispondono ai singoli colori.</p>
<p>Lo script è particolarmente utile quando si debbono utilizzare le librerie grafiche di PHP come ad esempio la famosa GD Library, che in molte delle sue funzioni, richiede l&#8217;uso di colori nel formato RGB.</p>
<p>Questo è il codice della funzione:</p>
<pre lang="php">
/*----------------------------------------------*
* Funzione ColorConvert                        *
* Realizzato da: Antonello Cicchese            *
* http://www.antonellocicchese.com             *
* If you use this script                       *
* please keep this notice                      *
*----------------------------------------------*/

/*
Funzione per convertire un colore HEX in RGB
*/
function ColorConvert($color)
{
$red   = 100;
$green = 100;
$blue  = 100;
$col=array();
if( eregi( "[#]?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})", $color, $ret ) )
{
$red = hexdec( $ret[1] );
$green = hexdec( $ret[2] );
$blue = hexdec( $ret[3] );
}
$col[1]=$red;
$col[2]=$green;
$col[3]=$blue;
return($col);
}
?></pre>
<p>e questo è il link per scaricare lo script: <a title="Funzione php di conversione dei colori da hex a rgb" href="http://www.antonellocicchese.com/UserFiles/code/hex2rgb.php">hex2rgb.php download</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.antonellocicchese.com/2006/12/01/conversione-colori-hex-rgb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pubblicare email a prova di spam</title>
		<link>http://www.antonellocicchese.com/2006/11/30/pubblicare-email-a-prova-di-spam/</link>
		<comments>http://www.antonellocicchese.com/2006/11/30/pubblicare-email-a-prova-di-spam/#comments</comments>
		<pubDate>Thu, 30 Nov 2006 17:33:40 +0000</pubDate>
		<dc:creator>antonello</dc:creator>
				<category><![CDATA[Guide]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[WebMaster]]></category>

		<guid isPermaLink="false">http://www.antonellocicchese.com/2006/11/30/pubblicare-email-a-prova-di-spam/</guid>
		<description><![CDATA[Per tutti quanti coloro che desiderano pubblicare degli indirizzi email visibili sulle loro pagine web, ma sono terrorizzati dallo spam, questo semplice script in php vi consente di mettervi in parte al riparo da questo problema.
Quello che fa lo script è produrre un&#8217;immagine PNG al volo contenente l&#8217;indirizzo email da voi passato, inoltre per evitare [...]]]></description>
			<content:encoded><![CDATA[<p>Per tutti quanti coloro che desiderano pubblicare degli indirizzi email visibili sulle loro pagine web, ma sono terrorizzati dallo spam, questo semplice script in php vi consente di mettervi in parte al riparo da questo problema.</p>
<p>Quello che fa lo script è produrre un&#8217;immagine PNG al volo contenente l&#8217;indirizzo email da voi passato, inoltre per evitare che gli spider dediti alla raccolta di email riconoscano nel vostro codice html l&#8217;indirizzo, questo può essere invalidato con due tecniche <em>(che in realtà possono essere anche abinate insieme)</em>:</p>
<ol>
<li>con l&#8217;inserimento di un numero arbitrario di spazi bianchi all&#8217;interno dell&#8217;email</li>
<li>con la sostituzione del carattere @ con la stringa [___AT___] (<em>N.B. sono tre gli underscore prima e dopo AT</em>).</li>
</ol>
<p>Lo script prevede anche la possibilità di <strong>rendere lo sfondo dell&#8217;immagine trasparente</strong> in modo da adattarla allo sfondo della pagina sulla quale deve visualizzare l&#8217;immagine, per questa funzionalità <strong>basterà decommentare la linea 15 del file emailToImage.php</strong></p>
<p>Per quanto riguarda l&#8217;utilizzo del file vi propongo qui di seguito un breve codice HTML <em>(perdonatemi se non è un codice perfetto ma non è questo l&#8217;intento dell&#8217;articolo)</em>:
<p>Error: Could not open Test_emailToImage.html</p>
<p>mentre per quanto riguarda il codice dello script PHP <span id="more-52"></span> è questo
</p>
<pre lang="php">
/*---------------------------------------------     *
* EmailToImage.php                                  *
* Realizzato da: Antonello Cicchese                 *
* http://www.antonellocicchese.com                  *
* If you use this script                            *
* please keep this notice                           *
*-----------------------------------------------    */

function emailToImage ( $email )
{
if($email){
/* Ripulisco l'email dagli spazi se è stata scritta come nome    @    dominio.xx */
$email = ereg_replace(" ","",$email);
/* Produco un'email valida se è stata scritta come nome[___AT___]dominio.xx */
$email = ereg_replace("\[___AT___\]","@",$email);

$length = strlen($email);
$imgOutput = ImageCreateTrueColor($length*8,20);
$black = ImageColorAllocate($imgOutput, 0, 0, 0); /* Alloco il colore nero per il testo*/
$white = ImageColorAllocate($imgOutput, 255, 255, 255); /* Alloco il colore bianco per lo sfondo */
ImageFill($imgOutput,0,0,$white); /* Riempio lo sfondo con il bianco */
//ImageColorTransparent($imgOutput,$white); /* Se attivato rende lo sfondo trasparente */
ImageString($imgOutput, 3, $length/2, 3, $email, $black); /* Scrivo l'email centrata */
/* Produco l'immagine di output */
header("Content-type: image/png");
header("Content-Disposition:inline;filename=".$email.".png");
ImagePng($imgOutput);
ImageDestroy($imgOutput);
}
return;
}

if(isset($_GET['email'])) emailToImage($_GET['email']);
</pre>
<p>Come è facile vedere nel file html il trucco c&#8217;è e si vede, basta inserire nella pagina uno o più tag img il cui attributo  src punti verso il file php che produce l&#8217;immagine seguito dalla variabile &#8220;email&#8221;, preceduta da un ? e dal carattere &#038;, che contiene il valore dell&#8217;email da convertire in immagine, scritta in uno dei due formati consentiti, e verrà visualizzata l&#8217;immagine risultante.Questo è il link per scaricare il file html <a target="_blank" title="Pagina html di Test per email to Image" href="http://www.antonellocicchese.com/UserFiles/code/Test_emailToImage.html">Test_emailToImage.html</a><br />
e questo è il link per scaricare lo script php  <a title="Funzione per convertire testo in immagini" href="http://www.antonellocicchese.com/UserFiles/code/emailToImage.php">emailToImage.php</a>mentre questo è il risultato del suo utilizzo: <img title="Esempio di realizzazione immagine da email" alt="Esempio di realizzazione immagine da email" src="http://www.antonellocicchese.com/UserFiles/code/emailToImage.php?&#038;email=info%20%20%20%5B___AT___%5D%20antonellocicchese.com" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.antonellocicchese.com/2006/11/30/pubblicare-email-a-prova-di-spam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
