<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss version="2.0">

<channel>
<title>Tutoriels Informatique (InfoWebMaster)</title>
<link>http://www.infowebmaster.fr/tutoriel/</link>
<description>Tutoriels didactiques de qualit� pour les webmasters</description>
<lastBuildDate>Tue, 05 Oct 2010 19:36:05 +0100</lastBuildDate>

<copyright>InfoWebMaster.fr</copyright>
<feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="infowebmaster-tutoriels" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="infowebmaster-tutoriels" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="infowebmaster-tutoriels" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="infowebmaster-tutoriels" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="infowebmaster-tutoriels" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="infowebmaster-tutoriels" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="infowebmaster-tutoriels" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="infowebmaster-tutoriels" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="infowebmaster-tutoriels" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="infowebmaster-tutoriels" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="infowebmaster-tutoriels" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="infowebmaster-tutoriels" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/infowebmaster-tutoriels" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="infowebmaster-tutoriels" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
<title>[jQuery] Cr�er un bouton de retour en haut de page</title>
<link>http://www.infowebmaster.fr/tutoriel/jquery-bouton-retour-haut</link>
<description>La biblioth�que jQuery est gratuite et permet d'ajouter des effets en Javascript sur un site web. Ce tutoriel explique comment cr�er un bouton qui permet de retourner en haut de page, gr�ce � un effet de scroll plus agr�able � regarder qu'un effet basique qui consiste � "sauter" en haut de page.&lt;br&gt;Pour tester ce que permet de faire ce tutoriel, il est possible d'utiliser cette page d'exemple: &lt;a target="" title="" href="http://www.infowebmaster.fr/demo/jquery/bouton-retour-en-haut.html"&gt;bouton jQuery de retour en haut de page&lt;/a&gt;.&lt;br&gt;&lt;h2&gt;Pr�requis&lt;/h2&gt;Il n'est pas n�cessaire d'avoir des connaissances en Javascript, ni m�me de grande connaissance en XHTML. Il faut juste �tre un peu d�brouillard et avoir un site sur lequel il est possible de personnaliser la source.&lt;br&gt;&lt;h2&gt;Installer la biblioth�que jQuery&lt;/h2&gt;La premi�re �tape consiste � ajouter la biblioth�que jQuery dans la source de la page web. Il y a un code � utiliser pour que cette biblioth�que puisse s'utiliser. Pour cela il faut ajouter le code suivant entre les balises &amp;lt;head&amp;gt; et &amp;lt;/head&amp;gt; de la page web:&lt;br&gt;&lt;div style="margin-left: 40px; background-color: rgb(255, 255, 204);"&gt;&lt;pre&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;script&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;type&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;text/javascript&lt;/span&gt;" &lt;span style="color: rgb(255, 0, 0);"&gt;src&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;Ce code r�cup�re la biblioth�que jQuery sur une adresse externe. L'avantage, c'est que certains sites utilisent d�j� ce code et que les visiteurs peuvent donc d�j� avoir la biblioth�que en cache sur le navigateur. En d'autres mots, il n'y a pas besoin de la t�l�charger � nouveau, ce qui acc�l�re le temps d'affichage des pages web.&lt;br&gt;Alternativement, il est possible de se rendre sur le site de &lt;a target="" title="" href="http://jquery.com/"&gt;jQuery&lt;/a&gt;, de t�l�charger la derni�re version de la biblioth�que, de l'envoyer sur un site web et d'adapter le code pr�c�dent en rempla�ant la valeur de &lt;span style="color: rgb(255, 0, 0);"&gt;src&lt;/span&gt;.&lt;br&gt;&lt;h2&gt;Bouton XHTML&lt;/h2&gt;La seconde �tape consiste � ajouter le bouton dans le corps de la page. Il y a plusieurs fa�ons de cr�er un tel bouton. Pour faire simple, le code suivant peut �tre ins�r� en bas de page:&lt;br&gt;&lt;div style="margin-left: 40px; background-color: rgb(255, 255, 204);"&gt;&lt;pre&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;div&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;href&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;#header&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;gt;&lt;/span&gt;Retour en haut&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;Ce code cr�er un lien. Par d�faut il permet de retourner en haut de page sans effet. Il faut ajouter un code pour que jQuery am�liore l'effet pour retourner en haut.&lt;br&gt;&lt;h2&gt;Code jQuery&lt;/h2&gt;Pour finir, il faut ins�rer ce code Javascript dans le code de la page web, entre &amp;lt;head&amp;gt; et &amp;lt;/head&amp;gt;:&lt;br&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;script&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;type&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;text/javascript&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;$(&lt;span style="color: rgb(0, 0, 204);"&gt;function&lt;/span&gt;() {&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; $('a[href=#header]').click(&lt;span style="color: rgb(0, 0, 204);"&gt;function&lt;/span&gt;(){&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $('html').animate({scrollTop:0}, 'slow');&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(0, 0, 204);"&gt;return false&lt;/span&gt;;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; });&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;});&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204); color: rgb(0, 0, 153);"&gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;Ce code donne un effet d'animation, lorsqu'un internaute clique sur un lien qui pointe vers une ancre "header". Pour tester le r�sultat il faut ouvrir une page web qui est suffisamment longue, descendre sur la page et cliquer sur le lien "Retour en haut". Normalement, le r�sultat sera le m�me que l'effet sur la &lt;a target="" title="" href="http://www.infowebmaster.fr/demo/jquery/bouton-retour-en-haut.html"&gt;page d'exemple de ce tutoriel&lt;/a&gt;.&lt;br&gt;
		&lt;br /&gt;&lt;br /&gt;
		Source: &lt;a href="http://www.infowebmaster.fr/tutoriel/jquery-bouton-retour-haut"&gt;[jQuery] Cr�er un bouton de retour en haut de page&lt;/a&gt;.
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/vMlFnv0kv2zkry11FCdm_xGSw5g/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vMlFnv0kv2zkry11FCdm_xGSw5g/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/vMlFnv0kv2zkry11FCdm_xGSw5g/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vMlFnv0kv2zkry11FCdm_xGSw5g/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description>
<pubDate>Tue, 05 Oct 2010 17:17:53 +0100</pubDate>
<guid>http://www.infowebmaster.fr/tutoriel/jquery-bouton-retour-haut</guid>
</item>

<item>
<title>Cr�er et installer un favicon</title>
<link>http://www.infowebmaster.fr/tutoriel/creer-installer-favicon</link>
<description>Le &lt;a target="" title="" href="http://www.infowebmaster.fr/85,news-le-favicon.html"&gt;favicon&lt;/a&gt; est une petite ic�ne sur les sites web, qui se retrouve juste � c�t� de la barre o� il y a la barre d'URL (voir la capture d'�cran ci-dessous). Cette petite image donne une identit� visuelle � un site pour �tre retrouv�e plus facilement dans les favoris. Ce petit tutoriel explique comment cr�er et mettre une telle image sur un site web.&lt;br&gt;&lt;div style="text-align: center;"&gt;&lt;img alt="" src="http://www.infowebmaster.fr/img/capture/logiciel/url-infowebmaster-fr.jpg" align="none"&gt;&lt;br&gt;&lt;/div&gt;&lt;h2&gt;Format accept�&lt;/h2&gt;En g�n�ral les sites web choisissent le format ico, png ou gif. Malheureusement, tous les navigateurs ne g�rent pas tous ces formats. Les vieilles versions d'internet explorer affichent uniquement les images au format ico. De m�me, la dimension d'un favicon peut �tre de 16*16 pixels ou de 32*32 pixels, mais pour internet explorer il faut se contenter d'une image au format 16*16.&lt;br&gt;Le favicon peut avoir l'opportunit� d'�tre anim� (image GIF).&lt;br&gt;&lt;br&gt;&lt;h2&gt;Cr�er le favicon&lt;/h2&gt;Il y a plusieurs mani�res de cr�er un favicon. Deux techniques vont �tre pr�sent�es.&lt;br&gt;&lt;h3&gt;Transformer une image en favicon&lt;/h3&gt;Il existe plusieurs ressources en ligne pour cr�er un favicon � partir d'une image ou � cr�er � partir d'un �diteur sp�cifique. Les liens suivants sont des outils en ligne gratuits pour cet usage:&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;a target="" title="" href="http://www.html-kit.com/favicon/"&gt;http://www.html-kit.com/favicon/&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a target="" title="" href="http://tools.dynamicdrive.com/favicon/"&gt;http://tools.dynamicdrive.com/favicon/&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a target="" title="" href="http://www.favicongenerator.com/"&gt;http://www.favicongenerator.com/&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a target="" title="" href="http://favikon.com/"&gt;http://favikon.com/&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a target="" title="" href="http://www.degraeve.com/favicon/"&gt;http://www.degraeve.com/favicon/&lt;/a&gt;&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;La plupart de ces sites permettent d'envoyer une image et de la transformer automatiquement en favicon.&lt;br&gt;&lt;h3&gt;Utiliser un logiciel&lt;/h3&gt;Il est possible de cr�er un favicon � partir d'un logiciel de graphisme tel que Gimp. L'id�al est d'utiliser une image au format PNG ou ICO avec une dimension de 16*16px. Un tutoriel indiqu� "&lt;a target="" title="" href="http://www.infowebmaster.fr/tutoriel/reduire-poids-images"&gt;r�duire le poids des images&lt;/a&gt;" explique comment redimensionner une image avec Gimp.&lt;br&gt;&lt;h2&gt;Installer le favicon&lt;/h2&gt;La premi�re �tape consiste � envoyer l'image sur le site web.&lt;br&gt;Par d�faut les navigateurs c�l�brent tel que Firefox, Google Chrome, Opera ou encore Safari v�rifient si une image existe sous le nom "favicon.ico" � la racine d'un site. De cette fa�on, m�me si le site n'a pas fait de lien vers le favicon, le navigateur est en mesure de l'afficher. Toutefois, pour les autres navigateurs et logiciels en tout genre qui peuvent reprendre cette petite ic�ne, il faut utiliser un code particulier. Le code ci-dessous est � utiliser:&lt;br&gt;&lt;div style="margin-left: 40px; background-color: rgb(255, 255, 204);"&gt;&lt;pre&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;link&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;rel&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;icon&lt;/span&gt;" &lt;span style="color: rgb(255, 0, 0);"&gt;href&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;favicon.ico&lt;/span&gt;" &lt;span style="color: rgb(0, 0, 153);"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;Ou celui-ci:&lt;br&gt;&lt;div style="margin-left: 40px; background-color: rgb(255, 255, 204);"&gt;&lt;pre&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;link&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;rel&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;shortcut icon&lt;/span&gt;" &lt;span style="color: rgb(255, 0, 0);"&gt;type&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;image/x-icon&lt;/span&gt;" &lt;span style="color: rgb(255, 0, 0);"&gt;href&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;favicon.ico&lt;/span&gt;" &lt;span style="color: rgb(0, 0, 153);"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;En utilisant une image d'un format autre que "ico" il faut utiliser le code suivant, mais l'adapter selon le format de l'image:&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Format PNG&lt;/span&gt;: modifier &lt;span style="color: rgb(255, 0, 0);"&gt;type &lt;/span&gt;par "&lt;span style="color: rgb(102, 0, 153);"&gt;image/png&lt;/span&gt;"&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Format GIF&lt;/span&gt;: modifier &lt;span style="color: rgb(255, 0, 0);"&gt;type &lt;/span&gt;par "&lt;span style="color: rgb(102, 0, 153);"&gt;image/gif&lt;/span&gt;"&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Format JPEG&lt;/span&gt;: modifier &lt;span style="color: rgb(255, 0, 0);"&gt;type &lt;/span&gt;par "&lt;span style="color: rgb(102, 0, 153);"&gt;image/jpeg&lt;/span&gt;"&lt;/li&gt;&lt;/ul&gt;Finalement, le code doit �tre ins�r� sur les pages en s'assurant de deux choses:&lt;br&gt;&lt;ol&gt;&lt;li&gt;Placer le code entre les balises &lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;head&amp;gt;&lt;/span&gt; et &lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Adapter l'adresse de &lt;span style="color: rgb(255, 0, 0);"&gt;href&lt;/span&gt; s'il le faut&lt;/li&gt;&lt;/ol&gt;Puis, il ne reste plus qu'� tester le r�sultat.&lt;br&gt;&lt;span style="font-weight: bold;"&gt;Information&lt;/span&gt;: il faut s'assurer de rafraichir la page web de votre site au cas o� la page utilise un cache.&lt;br&gt;
		&lt;br /&gt;&lt;br /&gt;
		Source: &lt;a href="http://www.infowebmaster.fr/tutoriel/creer-installer-favicon"&gt;Cr�er et installer un favicon&lt;/a&gt;.
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Q0rwBR4ZFqiOV8z2fFCojfKhNA4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Q0rwBR4ZFqiOV8z2fFCojfKhNA4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Q0rwBR4ZFqiOV8z2fFCojfKhNA4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Q0rwBR4ZFqiOV8z2fFCojfKhNA4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description>
<pubDate>Sun, 03 Oct 2010 22:32:08 +0100</pubDate>
<guid>http://www.infowebmaster.fr/tutoriel/creer-installer-favicon</guid>
</item>

<item>
<title>[PHP] V�rifier le format d'une adresse email</title>
<link>http://www.infowebmaster.fr/tutoriel/verifier-format-email-php</link>
<description>Dans le langage PHP il est parfois n�cessaire de v�rifier la bonne conformit� d'une adresse email. C'est pratique par exemple pour v�rifier qu'un utilisateur � indiqu� une adresse email correct et non une suite de caract�re qui n'a rien � voir. Il existe plusieurs fa�ons en PHP pour v�rifier le format d'une adresse email. L'astuce ne permet pas de v�rifier que l'adresse email existe, mais de v�rifier qu'une chaine de caract�re respecte le m�me format qu'une adresse email.&lt;br&gt;&lt;h2&gt;Pr�requis&lt;/h2&gt;Ce tutoriel donne des exemples de code PHP. Pour bien comprendre et appliquer ce qui est expliqu�, il faut avoir des notions de bases en PHP.&lt;br&gt;&lt;h2&gt;Utiliser la fonction filter_var()&lt;/h2&gt;Fort heureusement, il y a une fonction PHP qui permet de v�rifier facilement si une chaine de caract�re ressemble � un email. Il s'agit de la fonction &lt;a target="" title="" href="http://php.net/manual/fr/function.filter-var.php"&gt;filter_var()&lt;/a&gt;. Le second param�tre de cette fonction doit �tre "FILTER_VALIDATE_EMAIL".&lt;br&gt;&lt;pre style="background-color: rgb(255, 255, 204); color: rgb(255, 0, 0);"&gt;&amp;lt;?php&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;//$email = 'test'; // test avec une chaine qui n'est pas une adresse email&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;$email&lt;/span&gt; = 'test@example.com'; &lt;span style="color: rgb(0, 153, 0);"&gt;// test avec une chaine qui est une adresse email&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&lt;br&gt;&lt;span style="color: rgb(0, 0, 204);"&gt;if &lt;/span&gt;(filter_var(&lt;span style="color: rgb(0, 0, 153);"&gt;$email&lt;/span&gt;, FILTER_VALIDATE_EMAIL)) { &lt;span style="color: rgb(0, 153, 0);"&gt;// V�rifie si la chaine ressemble � un email&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(0, 0, 204);"&gt;echo &lt;/span&gt;'Cet email est correct.';&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;} &lt;span style="color: rgb(0, 0, 204);"&gt;else &lt;/span&gt;{&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(0, 0, 204);"&gt;echo &lt;/span&gt;'Cet email a un format non adapt�.';&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;}&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204); color: rgb(255, 0, 0);"&gt;?&amp;gt;&lt;/pre&gt;En utilisant ce code tel quel, le message "Cet email est correct" devrait s'afficher. Il est possible de d�placer les deux slashs de la premi�re ligne � la deuxi�me ligne, pour tester ce code avec un code qui ne ressemble pas � une adresse email.&lt;br&gt;&lt;h2&gt;Utiliser une expression r�guli�re&lt;/h2&gt;Le code pr�c�dent peut �tre r�alis� de fa�on similaire avec une expression r�guli�re (une REGEX). Le code PHP ci-dessous est donc pratiquement identique met utilise une REGEX.&lt;br&gt;&lt;pre style="background-color: rgb(255, 255, 204); color: rgb(255, 0, 0);"&gt;&amp;lt;?php&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;//$email = 'test'; // test avec une chaine qui n'est pas une adresse email&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;$email&lt;/span&gt; = 'test@example.com'; &lt;span style="color: rgb(0, 153, 0);"&gt;// test avec une chaine qui est une adresse email&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&lt;br&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(0, 0, 204);"&gt;if&lt;/span&gt; (preg_match('#^[\w.-]+@[\w.-]+\.[a-z]{2,6}$#i', &lt;span style="color: rgb(0, 0, 153);"&gt;$email&lt;/span&gt;)) { &lt;span style="color: rgb(0, 153, 0);"&gt;// V�rifie si la chaine ressemble � un email&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(0, 0, 204);"&gt;echo &lt;/span&gt;'Cet email est correct.';&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;} &lt;span style="color: rgb(0, 0, 204);"&gt;else &lt;/span&gt;{&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(0, 0, 204);"&gt;echo &lt;/span&gt;'Cet email a un format non adapt�.';&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;}&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204); color: rgb(255, 0, 0);"&gt;?&amp;gt;&lt;/pre&gt;En testant ce code PHP, normalement le r�sultat sera le m�me que pr�c�demment, la page affichera "Cet email est correct".&lt;br&gt;
		&lt;br /&gt;&lt;br /&gt;
		Source: &lt;a href="http://www.infowebmaster.fr/tutoriel/verifier-format-email-php"&gt;[PHP] V�rifier le format d'une adresse email&lt;/a&gt;.
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/pRb1UzoP5wDw3IPr8OONGKCgT-E/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pRb1UzoP5wDw3IPr8OONGKCgT-E/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/pRb1UzoP5wDw3IPr8OONGKCgT-E/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pRb1UzoP5wDw3IPr8OONGKCgT-E/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description>
<pubDate>Sat, 02 Oct 2010 00:03:11 +0100</pubDate>
<guid>http://www.infowebmaster.fr/tutoriel/verifier-format-email-php</guid>
</item>

<item>
<title>S�curiser un dossier (avec htpasswd)</title>
<link>http://www.infowebmaster.fr/tutoriel/securiser-dossier-htpasswd</link>
<description>&lt;p&gt;Sur un site web il peut �tre recommand� de s�curiser certains 
dossiers tels que la partie administration. Cela est facilement possible
 si la partie administration se trouve dans un dossier sp�cifique 
(exemple: un dossier appel� "&lt;em&gt;admin&lt;/em&gt;").&lt;br&gt;
Une m�thode assez simple pour tr�s bien s�curiser un tel dossier serait d'utiliser un fichier "&lt;strong&gt;.htpasswd&lt;/strong&gt;". Cet article va expliquer dans ce tutoriel comment r�aliser une telle protection.&lt;/p&gt;

&lt;h3&gt;Tutoriel&lt;/h3&gt;
&lt;p&gt;Il faut noter que la m�thode d�crite dans ce cours s'utilise avec 
des serveurs qui fonctionnent sous Apache. Si un autre type de serveur 
est utilis� sur un site web, alors il est possible que �a ne fonctionne 
pas.&lt;/p&gt;


&lt;h3&gt;S�curisation d'un dossier&lt;/h3&gt;
&lt;p&gt;Lorsqu'il y a une protection par htpasswd une fen�tre s'ouvre pour 
demander un nom d'utilisateur et un mot de passe. Une fois le tutoriel 
termin�, voici un exemple de la fen�tre qui s'ouvrira lorsqu'un 
utilisateur souhaitera acc�der au dossier s�curis�:&lt;/p&gt;
&lt;div class="picture"&gt;&lt;img src="../img/divers/authentification-requise.png" alt="Fen�tre authentification requise"&gt;&lt;br&gt;
Fen�tre n�cessitant une authentification&lt;/div&gt;

&lt;p&gt;En entrant les bonnes donn�es (le nom d'utilisateur avec son mot de 
passe associ�) alors il est possible d'acc�der au dossier. Dans le cas 
contraire la page ne sera pas autoris� � �tre ouverte et il y aura alors
 une erreur 401 (&lt;em&gt;aussi appel�e "Unauthorized"&lt;/em&gt;).&lt;/p&gt;


&lt;h2&gt;Cr�ation du fichier htaccess&lt;/h2&gt;
&lt;p&gt;La premi�re �tape pour s�curiser un dossier c'est de cr�er un fichier &lt;strong&gt;htaccess&lt;/strong&gt;.
 Ce fichier permet de s�curiser un dossier et permet d'indiquer au 
serveur o� se situe le pseudo et le mot de passe. Ainsi, le serveur 
saura quel sont les utilisateurs autoris� � acc�der � la zone s�curis�e.&lt;/p&gt;
&lt;p&gt;Le dossier htaccess doit �tre cr�� � partir du bloc-notes windows ou 
d'un �diteur de texte quelconque. Il faut noter que vous devez 
absolument ne pas lui donner d'extension (tel que .txt ou .doc). Le nom 
exact que vous devez lui donner c'est: ".htaccess". Cela pose souvent un
 soucis car le syst�me d'exploitation Windows ne permet pas de commencer
 un nom de fichier par un point. En raison de ce probl�me, il faut 
uniquement appeler le fichier "htaccess" pour le moment (&lt;em&gt;sans le premier point et sans extension&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;Le fichier htaccess doit ensuite contenir le code suivant:&lt;/p&gt;
&lt;div class="CadreCodage"&gt;
	&lt;strong&gt;Code pour le fichier .htaccess:&lt;/strong&gt;
	&lt;div class="codage"&gt;AuthName "Page d'administration prot�g�e, veuillez vous identifier"&lt;br&gt;
	AuthType Basic&lt;br&gt;
	AuthUserFile "/home/dossier/www/votre-repertoire/admin/.htpasswd"&lt;br&gt;
	Require valid-user&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Toutefois, la ligne "AuthUserFile" doit imp�rativement �tre modifi�e 
pour qu'elle corresponde � votre site. Chaque site web poss�de un chemin
 absolu qui diff�re selon les h�bergeurs. Par cons�quent, il est 
n�cessaire d'effectuer une certaine manipulation pour le connaitre. 
Voici la manipulation a effectuer pour connaitre le chemin absolu de 
votre h�bergeur.&lt;/p&gt;
&lt;p&gt;Il est tout d'abord obliger d'utiliser une page PHP. Pour vous donner
 un exemple clair, il est recommand� de cr�er une page expr�s pour 
d�terminer ce chemin absolu (que vous pouvez appel� "chemin-absolu.php" 
par exemple). Dedans il faut utiliser la fonction PHP "&lt;a href="http://php.net/manual/fr/function.realpath.php"&gt;realpath&lt;/a&gt;". Autrement dit, il faut copier le texte suivant sur la page que vous venez juste de cr�er:&lt;/p&gt;

&lt;div class="CadreCodage"&gt;
	&lt;strong&gt;Code PHP � ins�rer sur la page "chemin-absolu.php":&lt;/strong&gt;
	&lt;div class="codage"&gt;&amp;lt;?php&lt;br&gt;
	echo realpath("chemin-absolu.php");&lt;br&gt;
	?&amp;gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Une fois que c'est fait, il ne reste plus qu'� uploader la page 
"chemin-absolu.php" sur le serveur (dans le dossier � s�curiser, tel que
 "admin"). Puis, il faut ouvrir cette page dans un navigateur web (par 
exemple � la page: http://www.example.com/admin/chemin-absolu.php).&lt;br&gt;
Une fois la page ouverte, vous obtenez un chemin. C'est ce chemin qui va �tre utilis� dans le code donn� pr�c�demment (&lt;em&gt;� la place o� il y avait AuthUserFile&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;En ayant suivis correctement les instructions, le fichier appel� 
"htaccess" est pr�s � �tre utilis�. Il faut l'uploader sur le serveur. 
Finalement, il est possible de renommer le nom du fichier sur le serveur
 en ajoutant un "point" au d�but du nom "htaccess". De ce fait, le 
fichier s'appelle dor�navant "&lt;em&gt;.htaccess&lt;/em&gt;".&lt;/p&gt;


&lt;h2&gt;Cr�ation du fichier htpasswd&lt;/h2&gt;
&lt;p&gt;Cette �tape est beaucoup plus simple (&lt;em&gt;le plus dur � �t� effectu�&lt;/em&gt;). Le fichier &lt;strong&gt;htpasswd&lt;/strong&gt;
 comporte les informations avec les noms des utilisateurs qui peuvent 
acc�der au dossier. Pour chaque utilisateur il y a un mot de passe 
associ�. Il faut savoir qu'il peut y avoir autant d'utilisateur que 
souhait�.&lt;/p&gt;
&lt;p&gt;Il y a un code particulier � ins�rer dans le fichier "&lt;em&gt;.htpasswd&lt;/em&gt;",
 car le mot de passe est cod� (pour �viter qu'il puisse �tre r�cup�r� 
par un utilisateur malveillant). Voici un exemple concret de code 
envisageable dans un tel fichier (exemple fictif):&lt;/p&gt;
&lt;div class="CadreCodage"&gt;
	&lt;strong&gt;Exemple de code � ins�rer sur la page ".htpasswd":&lt;/strong&gt;
	&lt;div class="codage"&gt;nom-utilisateur1:$1$hdkZ3x0v$iADjlj7l3V6T8dDuv3UhB/&lt;br&gt;
	nom-utilisateur2:$1$rRAJj8b6$bAa4BugX0ehWRHdo0Cbks/&lt;br&gt;
	nom-utilisateur3:$1$HtWwWac.$AoNSxMUcr.9aw2u5gP5Tu0&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Sur ce code, il est possible de voir le nom d'utilisateur � gauche et le mot de passe crypt� � droite.&lt;/p&gt;
&lt;div class="InfoMoyen"&gt;&lt;p&gt;A noter que les webmasters qui ont un espace 
d'h�bergement sur free n'ont pas besoin d'avoir un mot de passe crypt�. 
Ce qui donne un code tel que celui-ci:&lt;/p&gt;
&lt;div class="CadreCodage"&gt;
	&lt;strong&gt;Exemple de code � ins�rer sur la page ".htpasswd":&lt;/strong&gt;
	&lt;div class="codage"&gt;nom-utilisateur1:mot_de_passe&lt;br&gt;
	nom-utilisateur2:motdepasse&lt;br&gt;
	nom-utilisateur3:password&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Pour g�n�rer chacune des lignes il y a un outil pour &lt;a href="../outils/crypter-htpasswd.php"&gt;g�n�rer un fichier ".htpasswd"&lt;/a&gt;.
 En utilisant cet outil, il est possible d'obtenir tr�s facilement le 
code � ins�rer sur la page ".htpasswd". Rendez-vous sur cette page, 
inscrivez votre nom d'utilisateur et votre mot de passe, puis 
cryptez-les pour savoir le code qu'il faut ins�rer sur la page 
".htpasswd". Lorsque vous aurez g�n�rer le code � l'aide du g�n�rateur 
de code htpasswd pour la page associ�e vous aurez juste � l'ajouter a 
votre dossier admin et ce sera fini.&lt;br&gt;Il ne faut pas perdre de vue qu'il faut cr�er la page "htpasswd" (&lt;em&gt;sans le point pour les utilisateurs de Windows&lt;/em&gt;) puis penser � rajouter le point au d�but du nom du fichier.&lt;/p&gt;&lt;h2&gt;Protection suppl�mentaire&lt;/h2&gt;&lt;p&gt;Ce cours viens d'expliquer comment cr�er un fichier intitul� ".htpasswd", mais il est possible de nommer le fichier diff�remment, ce nom n'est pas obligatoire. Il est par exemple possible de nommer le fichier ".htnomdefichiersecuriter". De cette mani�re, si un pirate informatique recherche un fichier intitul� ".htpasswd" il ne trouvera rien sous ce nom.&lt;br&gt;&lt;/p&gt;
		&lt;br /&gt;&lt;br /&gt;
		Source: &lt;a href="http://www.infowebmaster.fr/tutoriel/securiser-dossier-htpasswd"&gt;S�curiser un dossier (avec htpasswd)&lt;/a&gt;.
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/02N0UlqgijPPEMdzH3-7_KnH8-k/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/02N0UlqgijPPEMdzH3-7_KnH8-k/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/02N0UlqgijPPEMdzH3-7_KnH8-k/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/02N0UlqgijPPEMdzH3-7_KnH8-k/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description>
<pubDate>Fri, 01 Oct 2010 14:44:14 +0100</pubDate>
<guid>http://www.infowebmaster.fr/tutoriel/securiser-dossier-htpasswd</guid>
</item>

<item>
<title>Cr�er une page web en PHP</title>
<link>http://www.infowebmaster.fr/tutoriel/creer-page-web-php</link>
<description>Ce cours simple permet de cr�er une petite page PHP simple. Il n'est pas n�cessaire de connaitre PHP pour r�ussir ce tutoriel. C'est le cours de base avant d'essayer d'aller plus loin avec PHP. A la fin du cours vous aurez cr�� une page PHP � mettre en ligne sur un site web.&lt;br&gt;&lt;h2&gt;Pr�requis&lt;/h2&gt;Pour bien comprendre ce tutoriel il est vivement recommand� d'avoir lu le cours pour &lt;a target="" title="" href="http://www.infowebmaster.fr/tutoriel/creer-page-xhtml-simple"&gt;cr�er sa premi�re page en XHTML&lt;/a&gt;. Car une page simple en PHP poss�de au minimum du contenu en XHTML et parce qu'il faut savoir comment utiliser l'�diteur de texte &lt;span style="font-weight: bold;"&gt;Notepad++&lt;/span&gt;.&lt;br&gt;Dans ce pr�c�dent tutoriel, vous avez cr�� une page web intitul� "page.html". Pour poursuivre ce tutoriel, vous devez obligatoirement avoir cette page.&lt;br&gt;&lt;h2&gt;Transformer la page en PHP&lt;/h2&gt;La premi�re �tape consiste � ouvrir le fichier "page.html" avec Notepad++. Une fois que c'est fait, il faut cliquer sur "fichier" -&amp;gt; "enregistrer sous". C'est alors qu'une fen�tre s'ouvre. Pour transformer la page de l'XHTML au PHP il faut s�lectionner le type PHP (dans la liste d�roulante � droite de "type:").&lt;br&gt;&lt;div style="text-align: center;"&gt;&lt;img alt="" src="http://www.infowebmaster.fr/public/image/capture/notepad-enregistrer-sous-php.jpg" align="none"&gt;&lt;br&gt;&lt;/div&gt;Enfin, il suffit de cliquer sur "Enregistrer" et la page PHP sera ainsi cr��.&lt;br&gt;&lt;span style="font-weight: bold;"&gt;Information&lt;/span&gt;: n'essayez pas de l'ouvrir avec un navigateur web, �a ne fonctionnera pas. Une page PHP doit obligatoirement �tre trait�e par un serveur web (ou un logiciel qui simule un serveur web). Pour voir la page, il faut donc l'envoyer sur votre espace d'h�bergement web.&lt;br&gt;&lt;h2&gt;Ins�rer du code PHP&lt;br&gt;&lt;/h2&gt;En reprenant le code XHTML d�j� pr�sent sur la page, il est possible d'ajouter une ligne suppl�mentaire �crite en PHP. Voici le nouveau code:&lt;br&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;lt;!DOCTYPE html PUBLIC "&lt;span style="color: rgb(102, 0, 153);"&gt;-//W3C//DTD XHTML 1.0 Strict//EN&lt;/span&gt;" "&lt;span style="color: rgb(102, 0, 153);"&gt;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&lt;/span&gt;"&amp;gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;html&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;xmlns&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;http://www.w3.org/1999/xhtml&lt;/span&gt;" xml:lang="&lt;span style="color: rgb(102, 0, 153);"&gt;fr&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204); color: rgb(0, 0, 153);"&gt;&amp;nbsp; &amp;lt;head&amp;gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt;&lt;/span&gt;Titre de la page&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;meta&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;http-equiv&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;Content-Type&lt;/span&gt;" &lt;span style="color: rgb(255, 0, 0);"&gt;content&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;text/html; charset=iso-8859-1&lt;/span&gt;" &lt;span style="color: rgb(0, 0, 153);"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204); color: rgb(0, 0, 153);"&gt;&amp;nbsp; &amp;lt;/head&amp;gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204); color: rgb(0, 0, 153);"&gt;&amp;nbsp; &amp;lt;body&amp;gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;p&amp;gt;&lt;/span&gt;Contenu de la page.&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;?php&lt;/span&gt; &lt;span style="color: rgb(0, 0, 204);"&gt;echo &lt;/span&gt;'&amp;lt;p&amp;gt;Cette ligne est �crite en PHP&amp;lt;/p&amp;gt;'; &lt;span style="color: rgb(255, 0, 0);"&gt;?&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; &lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204); color: rgb(0, 0, 153);"&gt;&amp;lt;/html&amp;gt;&lt;/pre&gt;Tout ce qui se trouve entre &amp;lt;?php et ?&amp;gt; est interpr�t� comme du code PHP. Par ailleurs, il faut savoir que "echo" est une instruction qui stipule du texte � afficher. Tout le texte qui sera plac� entre les deux guillemets sera visible dans le code source de la page. Mais le code "&amp;lt;?php" ou m�me l'instruction "echo" ne sera pas visible dans la source de la page XHTML.&lt;br&gt;Pour voir le r�sultat dans un navigateur web, il faut bien entendu envoyer la page web sur un espace d'h�bergement (ou sur un logiciel qui simule un serveur web).&lt;br&gt;
		&lt;br /&gt;&lt;br /&gt;
		Source: &lt;a href="http://www.infowebmaster.fr/tutoriel/creer-page-web-php"&gt;Cr�er une page web en PHP&lt;/a&gt;.
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/iNAcrxdDrJWgiQgCVzU1fA_R_gI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/iNAcrxdDrJWgiQgCVzU1fA_R_gI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/iNAcrxdDrJWgiQgCVzU1fA_R_gI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/iNAcrxdDrJWgiQgCVzU1fA_R_gI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description>
<pubDate>Thu, 30 Sep 2010 15:15:58 +0100</pubDate>
<guid>http://www.infowebmaster.fr/tutoriel/creer-page-web-php</guid>
</item>

<item>
<title>Cr�er une page de contact en PHP</title>
<link>http://www.infowebmaster.fr/tutoriel/creer-page-contact-php</link>
<description>Ce petit tutoriel permet de cr�er une page web de contact en PHP. Ajout� � un site web, les visiteurs pourront contacter le webmaster du site. Ce cours est facile � r�aliser car tous les codes sont fournit et des explications sont fournissent. Ainsi, vous pouvez r�ussir � cr�er la page de contact en PHP, m�me si vous ne connaissez pas ce langage informatique.&lt;br&gt;&lt;h2&gt;Pr�requis&lt;/h2&gt;Il faut savoir comment cr�er une page web en PHP pour pouvoir y int�grer les codes suivants. De plus, pour mieux comprendre ce qui suis, c'est mieux si vous connaissez un peu le XHTML et le PHP (mais pas indispensable si vous �tes d�brouillard).&lt;br&gt;Quoi qu'il en soit, les tutoriels suivant peuvent aider si vous ne connaissez pas certain points abord�s plus loin.&lt;br&gt;&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;a target="" title="" href="http://www.infowebmaster.fr/tutoriel/creer-page-xhtml-simple"&gt;Cr�er une page XHTML simple&lt;/a&gt;&lt;br&gt;&lt;/li&gt;&lt;li&gt;&lt;a target="" title="" href="http://www.infowebmaster.fr/tutoriel/envoyer-email-php"&gt;Envoyer un email en PHP&lt;/a&gt;&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;D�finition des besoins&lt;/h2&gt;Cette petite partie d�finit ce qui va �tre cr�� tout au long de ce tutoriel. Les points ci-dessous permettent de stipuler les contraintes du formulaire de contact.&lt;br&gt;&lt;ul&gt;&lt;li&gt;Demander le nom et pr�nom, l'email (pour pouvoir r�pondre � l'internaute apr�s qu'il est envoy� le message) et le message en lui-m�me&lt;/li&gt;&lt;li&gt;Obliger � l'utilisateur de pr�ciser son email et le message (le nom et le pr�nom �tant facultatifs)&lt;/li&gt;&lt;li&gt;V�rifier que l'email ressemble � un email (pour �viter que l'internaute �crive n'importe quoi)&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Cr�er le formulaire XHTML&lt;/h2&gt;Le code ci-dessous est celui du formulaire en XHTML. Il faut copier et coller l'ensemble de ce code source sur une nouvelle page web.&lt;br&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;lt;!DOCTYPE html PUBLIC "&lt;span style="color: rgb(102, 0, 153);"&gt;-//W3C//DTD XHTML 1.0 Strict//EN&lt;/span&gt;" "&lt;span style="color: rgb(102, 0, 153);"&gt;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&lt;/span&gt;"&amp;gt;&lt;span style="color: rgb(0, 0, 204);"&gt;&lt;br&gt;&amp;lt;html&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;xmlns&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;http://www.w3.org/1999/xhtml&lt;/span&gt;" xml:lang="&lt;span style="color: rgb(102, 0, 153);"&gt;fr&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 204);"&gt;&amp;gt;&lt;br&gt;&lt;/span&gt;&amp;nbsp; &lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 204);"&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt;&lt;/span&gt;Titre de la page&lt;span style="color: rgb(0, 0, 204);"&gt;&amp;lt;/title&amp;gt;&lt;br&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 204);"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;meta&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;http-equiv&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;Content-Type&lt;/span&gt;" &lt;span style="color: rgb(255, 0, 0);"&gt;content&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;text/html; charset=iso-8859-1&lt;/span&gt;" &lt;span style="color: rgb(0, 0, 204);"&gt;/&amp;gt;&lt;br&gt;&lt;/span&gt;&amp;nbsp; &lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;br style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;nbsp; &amp;lt;body&amp;gt;&lt;/span&gt;&lt;br&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;h1&amp;gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Contacter le webmaster&lt;/span&gt;&amp;lt;/h1&amp;gt;&lt;br&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!-- Ceci est un commentaire HTML. Le code PHP devra remplac� cette ligne --&amp;gt;&lt;/span&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;form&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;method&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;post&lt;/span&gt;" &lt;span style="color: rgb(255, 0, 0);"&gt;action&lt;/span&gt;="&lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;?php&lt;/span&gt; &lt;span style="color: rgb(0, 0, 204);"&gt;echo&lt;/span&gt; strip_tags(&lt;span style="color: rgb(0, 0, 153);"&gt;$_SERVER[&lt;/span&gt;'REQUEST_URI'&lt;span style="color: rgb(0, 0, 153);"&gt;]&lt;/span&gt;); &lt;span style="color: rgb(255, 0, 0);"&gt;?&amp;gt;&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;gt;&lt;/span&gt;&lt;br style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;p&amp;gt;&lt;/span&gt;Votre nom et pr�nom: &lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;input&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;type&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;text&lt;/span&gt;" &lt;span style="color: rgb(255, 0, 0);"&gt;name&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;nom&lt;/span&gt;" &lt;span style="color: rgb(255, 0, 0);"&gt;size&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;30&lt;/span&gt;" &lt;span style="color: rgb(0, 0, 153);"&gt;/&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Votre email: &lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;span&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;style&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;color:#ff0000;&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;gt;&lt;/span&gt;*&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;: &lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;input&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;type&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;text&lt;/span&gt;" &lt;span style="color: rgb(255, 0, 0);"&gt;name&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;email&lt;/span&gt;" &lt;span style="color: rgb(255, 0, 0);"&gt;size&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;30&lt;/span&gt;" &lt;span style="color: rgb(0, 0, 153);"&gt;/&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;br style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;p&amp;gt;&lt;/span&gt;Message &lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;span&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;style&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;color:#ff0000;&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;gt;&lt;/span&gt;*&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;:&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;br style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;textarea&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;name&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;message&lt;/span&gt;" &lt;span style="color: rgb(255, 0, 0);"&gt;cols&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;60&lt;/span&gt;" &lt;span style="color: rgb(255, 0, 0);"&gt;rows&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;10&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;gt;&amp;lt;/textarea&amp;gt;&lt;/span&gt;&lt;br&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!-- Ici pourra �tre ajout� un captcha anti-spam (plus tard) --&amp;gt;&lt;/span&gt;&lt;br style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;p&amp;gt;&amp;lt;input&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;type&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;submit&lt;/span&gt;" &lt;span style="color: rgb(255, 0, 0);"&gt;name&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;submit&lt;/span&gt;" &lt;span style="color: rgb(255, 0, 0);"&gt;value&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;Envoyer&lt;/span&gt;" &lt;span style="color: rgb(0, 0, 153);"&gt;/&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;br style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/form&amp;gt;&lt;/span&gt;&lt;br&gt;&amp;nbsp; &lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;br style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/pre&gt;Si vous utilisez un logiciel particulier pour la cr�ation des pages web, ce qui importe le plus est le code compris entre &amp;lt;body&amp;gt; et &amp;lt;/body&amp;gt;.&lt;br&gt;&lt;span style="font-weight: bold;"&gt;Information&lt;/span&gt;: il y a un bout de code en PHP (celui situ� entre &amp;lt;?php et ?&amp;gt;). Il stipule l'URL courante de la page. Il d�finit que l'adresse o� le formulaire sera trait� est l'adresse courante.&lt;br&gt;&lt;h2&gt;Cr�er le code PHP&lt;/h2&gt;L'utilisation seule du code XHTML permet uniquement d'afficher le formulaire. Mais il faut maintenant cr�er le code qui va r�cup�rer les informations et les envoyer par email lorsque le visiteur cliquera sur le bouton "&lt;span style="font-style: italic;"&gt;Envoyer&lt;/span&gt;".&lt;br&gt;&lt;h3&gt;Code simple&lt;/h3&gt;&lt;pre style="background-color: rgb(255, 255, 204); color: rgb(255, 0, 0);"&gt;&amp;lt;?php&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204); color: rgb(0, 153, 0);"&gt;// S'il y des donn�es de post�es&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(0, 0, 204);"&gt;if&lt;/span&gt; (&lt;span style="color: rgb(0, 0, 153);"&gt;$_SERVER&lt;/span&gt;['REQUEST_METHOD']=='POST') {&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204); color: rgb(0, 153, 0);"&gt;&amp;nbsp; // (1) Code PHP pour traiter l'envoi de l'email&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204); color: rgb(0, 153, 0);"&gt;&amp;nbsp; &lt;br&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204); color: rgb(0, 153, 0);"&gt;&amp;nbsp; // R�cup�ration des variables et s�curisation des donn�es&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; &lt;span style="color: rgb(0, 0, 153);"&gt;$nom&lt;/span&gt; = htmlentities(&lt;span style="color: rgb(0, 0, 153);"&gt;$_POST&lt;/span&gt;['nom']); &lt;span style="color: rgb(0, 153, 0);"&gt;// htmlentities() convertit des caract�res "sp�ciaux" en �quivalent HTML&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; &lt;span style="color: rgb(0, 0, 153);"&gt;$email&lt;/span&gt; = htmlentities(&lt;span style="color: rgb(0, 0, 153);"&gt;$_POST&lt;/span&gt;['email']);&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; &lt;span style="color: rgb(0, 0, 153);"&gt;$message&lt;/span&gt; = htmlentities(&lt;span style="color: rgb(0, 0, 153);"&gt;$_POST&lt;/span&gt;['message']);&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; &lt;br&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; &lt;span style="color: rgb(0, 153, 0);"&gt;// Variables concernant l'email&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; &lt;span style="color: rgb(0, 0, 153);"&gt;$destinataire&lt;/span&gt; = 'contact@example.com'; &lt;span style="color: rgb(0, 153, 0);"&gt;// Adresse email du webmaster (� personnaliser)&lt;br&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; &lt;span style="color: rgb(0, 0, 153);"&gt;$sujet&lt;/span&gt; = 'Titre du message'; &lt;span style="color: rgb(0, 153, 0);"&gt;// Titre de l'email&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; &lt;span style="color: rgb(0, 0, 153);"&gt;$contenu&lt;/span&gt; = '&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;Titre du message&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;';&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; &lt;span style="color: rgb(0, 0, 153);"&gt;$contenu&lt;/span&gt; .= '&amp;lt;p&amp;gt;Bonjour, vous avez re�u un message � partir de votre site web.&amp;lt;/p&amp;gt;';&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; &lt;span style="color: rgb(0, 0, 153);"&gt;$contenu&lt;/span&gt; .= '&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Nom&amp;lt;/strong&amp;gt;: '.&lt;span style="color: rgb(0, 0, 153);"&gt;$nom&lt;/span&gt;.'&amp;lt;/p&amp;gt;';&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; &lt;span style="color: rgb(0, 0, 153);"&gt;$contenu&lt;/span&gt; .= '&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Email&amp;lt;/strong&amp;gt;: '.&lt;span style="color: rgb(0, 0, 153);"&gt;$email&lt;/span&gt;.'&amp;lt;/p&amp;gt;';&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;nbsp; $contenu&lt;/span&gt; .= '&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Message&amp;lt;/strong&amp;gt;: '.&lt;span style="color: rgb(0, 0, 153);"&gt;$message&lt;/span&gt;.'&amp;lt;/p&amp;gt;';&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;nbsp; $contenu&lt;/span&gt; .= '&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;'; &lt;span style="color: rgb(0, 153, 0);"&gt;// Contenu du message de l'email (en XHTML)&lt;br&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; &lt;br&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; &lt;span style="color: rgb(0, 153, 0);"&gt;// Pour envoyer un email HTML, l'en-t�te Content-type doit �tre d�fini&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; &lt;span style="color: rgb(0, 0, 153);"&gt;$headers&lt;/span&gt; = 'MIME-Version: 1.0'."\r\n";&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; &lt;span style="color: rgb(0, 0, 153);"&gt;$headers&lt;/span&gt; .= 'Content-type: text/html; charset=iso-8859-1'."\r\n";&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; &lt;br&gt;&amp;nbsp; &lt;span style="color: rgb(0, 153, 0);"&gt;// Envoyer l'email&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; mail(&lt;span style="color: rgb(0, 0, 153);"&gt;$destinataire&lt;/span&gt;, &lt;span style="color: rgb(0, 0, 153);"&gt;$sujet&lt;/span&gt;, &lt;span style="color: rgb(0, 0, 153);"&gt;$contenu&lt;/span&gt;, &lt;span style="color: rgb(0, 0, 153);"&gt;$headers&lt;/span&gt;); &lt;span style="color: rgb(0, 153, 0);"&gt;// Fonction principale qui envoi l'email&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; &lt;span style="color: rgb(0, 0, 204);"&gt;echo&lt;/span&gt; '&amp;lt;h2&amp;gt;Message envoy�!&amp;lt;/h2&amp;gt;'; &lt;span style="color: rgb(0, 153, 0);"&gt;// Afficher un message pour indiquer que le message a �t� envoy�&lt;br&gt;&amp;nbsp; &lt;br&gt;&amp;nbsp; // (2) Fin du code pour traiter l'envoi de l'email&lt;br&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;}&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204); color: rgb(255, 0, 0);"&gt;?&amp;gt;&lt;/pre&gt;Le code est suffisamment comment� pour �tre comment� une nouvelle fois.&lt;br&gt;&lt;h3&gt;�viter les erreurs&lt;/h3&gt;Par d�faut le programme pr�c�dent ne respecte pas le cahier des charges. Il 
faut ajouter du code pour �viter l'envoi de l'email si l'utilisateur � oubli� d'indiquer le 
message ou un email valide. Le code ci-dessous reprend donc ce qui a d�j� �t� fait et ajoute des �l�ments suppl�mentaires. Encore une fois, il y a de nombreux commentaires pour comprendre la signification du code.&lt;br&gt;&lt;pre style="background-color: rgb(255, 255, 204); color: rgb(255, 0, 0);"&gt;&amp;lt;?php&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204); color: rgb(0, 153, 0);"&gt;// S'il y des donn�es de post�es&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(0, 0, 204);"&gt;if&lt;/span&gt; (&lt;span style="color: rgb(0, 0, 153);"&gt;$_SERVER&lt;/span&gt;['REQUEST_METHOD']=='POST') {&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; &lt;span style="color: rgb(0, 153, 0);"&gt;// Code PHP pour traiter l'envoi de l'email&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; &lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; &lt;span style="color: rgb(0, 0, 153);"&gt;$nombreErreur&lt;/span&gt; = 0; &lt;span style="color: rgb(0, 153, 0);"&gt;// Variable qui compte le nombre d'erreur&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; &lt;br&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&amp;nbsp; // D�finit toutes les erreurs possibles&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; &lt;span style="color: rgb(0, 0, 204);"&gt;if&lt;/span&gt; (!&lt;span style="color: rgb(0, 0, 204);"&gt;isset&lt;/span&gt;(&lt;span style="color: rgb(0, 0, 153);"&gt;$_POST&lt;/span&gt;['email'])) { &lt;span style="color: rgb(0, 153, 0);"&gt;// Si la variable "email" du formulaire n'existe pas (il y a un probl�me)&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(0, 0, 153);"&gt;$nombreErreur&lt;/span&gt;++; &lt;span style="color: rgb(0, 153, 0);"&gt;// On incr�mente la variable qui compte les erreurs&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(0, 0, 153);"&gt;$erreur1&lt;/span&gt; = '&amp;lt;p&amp;gt;Il y a un probl�me avec la variable "email".&amp;lt;/p&amp;gt;';&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; } &lt;span style="color: rgb(0, 0, 204);"&gt;else&lt;/span&gt; { &lt;span style="color: rgb(0, 153, 0);"&gt;// Sinon, cela signifie que la variable existe (c'est normal)&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(0, 0, 204);"&gt;if&lt;/span&gt; (&lt;span style="color: rgb(0, 0, 204);"&gt;empty&lt;/span&gt;(&lt;span style="color: rgb(0, 0, 153);"&gt;$_POST&lt;/span&gt;['email'])) { &lt;span style="color: rgb(0, 153, 0);"&gt;// Si la variable est vide&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(0, 0, 153);"&gt;$nombreErreur&lt;/span&gt;++; &lt;span style="color: rgb(0, 153, 0);"&gt;// On incr�mente la variable qui compte les erreurs&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(0, 0, 153);"&gt;$erreur2&lt;/span&gt; = '&amp;lt;p&amp;gt;Vous avez oubli� de donner votre email.&amp;lt;/p&amp;gt;';&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;span style="color: rgb(0, 0, 204);"&gt;else&lt;/span&gt; {&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(0, 0, 204);"&gt;if&lt;/span&gt; (!filter_var(&lt;span style="color: rgb(0, 0, 153);"&gt;$_POST&lt;/span&gt;['email'], FILTER_VALIDATE_EMAIL)) {&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(0, 0, 153);"&gt;$nombreErreur&lt;/span&gt;++; &lt;span style="color: rgb(0, 153, 0);"&gt;// On incr�mente la variable qui compte les erreurs&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(0, 0, 153);"&gt;$erreur3&lt;/span&gt; = '&amp;lt;p&amp;gt;Cet email ne ressemble pas un email.&amp;lt;/p&amp;gt;';&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; }&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; &lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; &lt;span style="color: rgb(0, 0, 204);"&gt;if&lt;/span&gt; (!&lt;span style="color: rgb(0, 0, 204);"&gt;isset&lt;/span&gt;(&lt;span style="color: rgb(0, 0, 153);"&gt;$_POST&lt;/span&gt;['message'])) {&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(0, 0, 153);"&gt;$nombreErreur&lt;/span&gt;++;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(0, 0, 153);"&gt;$erreur4&lt;/span&gt; = '&amp;lt;p&amp;gt;Il y a un probl�me avec la variable "message".&amp;lt;/p&amp;gt;';&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; } &lt;span style="color: rgb(0, 0, 204);"&gt;else&lt;/span&gt; {&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(0, 0, 204);"&gt;if&lt;/span&gt; (&lt;span style="color: rgb(0, 0, 204);"&gt;empty&lt;/span&gt;(&lt;span style="color: rgb(0, 0, 153);"&gt;$_POST&lt;/span&gt;['message'])) {&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(0, 0, 153);"&gt;$nombreErreur&lt;/span&gt;++;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(0, 0, 153);"&gt;$erreur5&lt;/span&gt; = '&amp;lt;p&amp;gt;Vous avez oubli� de donner un message.&amp;lt;/p&amp;gt;';&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; }&lt;br&gt;&amp;nbsp; &lt;br&gt;&amp;nbsp; &lt;span style="color: rgb(0, 153, 0);"&gt;// (3) Ici, il sera possible d'ajouter plus tard un code pour v�rifier un captcha anti-spam.&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; &lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; &lt;span style="color: rgb(0, 0, 204);"&gt;if&lt;/span&gt; (&lt;span style="color: rgb(0, 0, 153);"&gt;$nombreErreur&lt;/span&gt;==0) { &lt;span style="color: rgb(0, 153, 0);"&gt;// S'il n'y a pas d'erreur&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(0, 153, 0);"&gt;// Ici il faut ajouter tout le code pour envoyer l'email.&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Dans le code pr�sent� au chapitre pr�c�dent, cela signifie au code entre les commentaires (1) et (2).&lt;br&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; } &lt;span style="color: rgb(0, 0, 204);"&gt;else&lt;/span&gt; { &lt;span style="color: rgb(0, 153, 0);"&gt;// S'il y a un moins une erreur&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(0, 0, 204);"&gt;echo&lt;/span&gt; '&amp;lt;div style="border:1px solid #ff0000; padding:5px;"&amp;gt;';&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(0, 0, 204);"&gt;echo&lt;/span&gt; '&amp;lt;p style="color:#ff0000;"&amp;gt;D�sol�, il y a eu '.&lt;span style="color: rgb(0, 0, 153);"&gt;$nombreErreur&lt;/span&gt;.' erreur(s). Voici le d�tail des erreurs:&amp;lt;/p&amp;gt;';&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(0, 0, 204);"&gt;if&lt;/span&gt; (&lt;span style="color: rgb(0, 0, 204);"&gt;isset&lt;/span&gt;(&lt;span style="color: rgb(0, 0, 153);"&gt;$erreur1&lt;/span&gt;)) &lt;span style="color: rgb(0, 0, 204);"&gt;echo&lt;/span&gt; '&amp;lt;p&amp;gt;'.&lt;span style="color: rgb(0, 0, 153);"&gt;$erreur1&lt;/span&gt;.'&amp;lt;/p&amp;gt;';&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(0, 0, 204);"&gt;if&lt;/span&gt; (&lt;span style="color: rgb(0, 0, 204);"&gt;isset&lt;/span&gt;(&lt;span style="color: rgb(0, 0, 153);"&gt;$erreur2&lt;/span&gt;)) &lt;span style="color: rgb(0, 0, 204);"&gt;echo&lt;/span&gt; '&amp;lt;p&amp;gt;'.&lt;span style="color: rgb(0, 0, 153);"&gt;$erreur2&lt;/span&gt;.'&amp;lt;/p&amp;gt;';&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(0, 0, 204);"&gt;if&lt;/span&gt; (&lt;span style="color: rgb(0, 0, 204);"&gt;isset&lt;/span&gt;(&lt;span style="color: rgb(0, 0, 153);"&gt;$erreur3&lt;/span&gt;)) &lt;span style="color: rgb(0, 0, 204);"&gt;echo&lt;/span&gt; '&amp;lt;p&amp;gt;'.&lt;span style="color: rgb(0, 0, 153);"&gt;$erreur3&lt;/span&gt;.'&amp;lt;/p&amp;gt;';&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(0, 0, 204);"&gt;if&lt;/span&gt; (&lt;span style="color: rgb(0, 0, 204);"&gt;isset&lt;/span&gt;(&lt;span style="color: rgb(0, 0, 153);"&gt;$erreur4&lt;/span&gt;)) &lt;span style="color: rgb(0, 0, 204);"&gt;echo&lt;/span&gt; '&amp;lt;p&amp;gt;'.&lt;span style="color: rgb(0, 0, 153);"&gt;$erreur4&lt;/span&gt;.'&amp;lt;/p&amp;gt;';&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(0, 0, 204);"&gt;if&lt;/span&gt; (&lt;span style="color: rgb(0, 0, 204);"&gt;isset&lt;/span&gt;(&lt;span style="color: rgb(0, 0, 153);"&gt;$erreur5&lt;/span&gt;)) &lt;span style="color: rgb(0, 0, 204);"&gt;echo&lt;/span&gt; '&amp;lt;p&amp;gt;'.&lt;span style="color: rgb(0, 0, 153);"&gt;$erreur5&lt;/span&gt;.'&amp;lt;/p&amp;gt;';&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(0, 153, 0);"&gt;// (4) Ici, il sera possible d'ajouter un code d'erreur suppl�mentaire si un captcha anti-spam est erron�.&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: rgb(0, 0, 204);"&gt;echo&lt;/span&gt; '&amp;lt;/div&amp;gt;';&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; }&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;}&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204); color: rgb(255, 0, 0);"&gt;?&amp;gt;&lt;/pre&gt;Et voil�, avec ce nouveau code, il y aura des erreurs d'affich�es si le visiteur oubli d'inscrire des informations l� o� c'est obligatoire et il y aura une erreur s'il entre une fausse adresse email. Vous pouvez copier/coller le code (en l'adaptant l� o� c'est demand�) pour v�rifier soi-m�me la bonne conformit� du code.&lt;br&gt;&lt;h2&gt;Mettre un captcha anti-spam simple&lt;/h2&gt;Le code cr�� jusqu'� pr�sent est tr�s pratique, mais il peut �tre exploit� par des robots. Pour se prot�ger contre de telles utilisations il faut utiliser un captcha anti-spam. Il s'agit d'une protection que seuls les humains peuvent passer. Les robots feront normalement un erreur. Pour faire tr�s simple, le formulaire va demander aux humains de r�pondre � une petite question qui sera: "Quel est le r�sultat de 1+3" (les humains devront r�pondre: 4).&lt;br&gt;Pour cela il faut ajouter ce champ au formulaire XHTML:&lt;br&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Combien font 1+3: &lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;span&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;style&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;color:#ff0000;&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;gt;&lt;/span&gt;*&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;: &lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;input&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;type&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;text&lt;/span&gt;" &lt;span style="color: rgb(255, 0, 0);"&gt;name&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;captcha&lt;/span&gt;" &lt;span style="color: rgb(255, 0, 0);"&gt;size&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;2&lt;/span&gt;" &lt;span style="color: rgb(0, 0, 153);"&gt;/&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;/pre&gt;Enfin, il faut ajouter le code PHP qui va g�rer cette nouvelle contrainte. Voici le code qui doit �tre ajout� au commentaire (3):&lt;br&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;?php&lt;/span&gt;&lt;br&gt;  &lt;span style="color: rgb(0, 0, 204);"&gt;if&lt;/span&gt; (!&lt;span style="color: rgb(0, 0, 204);"&gt;isset&lt;/span&gt;(&lt;span style="color: rgb(0, 0, 153);"&gt;$_POST&lt;/span&gt;['captcha'])) {&lt;br&gt;    &lt;span style="color: rgb(0, 0, 153);"&gt;$nombreErreur&lt;/span&gt;++;&lt;br&gt;    &lt;span style="color: rgb(0, 0, 153);"&gt;$erreur6&lt;/span&gt; = '&amp;lt;p&amp;gt;Il y a un probl�me avec la variable "captcha".&amp;lt;/p&amp;gt;';&lt;br&gt;  } &lt;span style="color: rgb(0, 0, 204);"&gt;else&lt;/span&gt; {&lt;br&gt;    &lt;span style="color: rgb(0, 0, 204);"&gt;if&lt;/span&gt; (&lt;span style="color: rgb(0, 0, 153);"&gt;$_POST&lt;/span&gt;['captcha']!=4) { &lt;span style="color: rgb(0, 153, 0);"&gt;// V�rifier que le r�sultat de l'�quation est �gal � 4&lt;/span&gt;&lt;br&gt;      &lt;span style="color: rgb(0, 0, 153);"&gt;$nombreErreur&lt;/span&gt;++;&lt;br&gt;      &lt;span style="color: rgb(0, 0, 153);"&gt;$erreur7&lt;/span&gt; = '&amp;lt;p&amp;gt;D�sol�, le captcha anti-spam est erron�.&amp;lt;/p&amp;gt;';&lt;br&gt;    }&lt;br&gt;  }&lt;br&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204); color: rgb(255, 0, 0);"&gt;?&amp;gt;&lt;/pre&gt;Maintenant qu'une nouvelle contrainte est d�finit, il faut ajouter un code PHP � l'emplacement du commentaire (4) afin de sp�cifier le message � afficher pour les erreurs $erreur6 et $erreur7:&lt;br&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;?php&lt;/span&gt;&lt;br&gt;	&lt;span style="color: rgb(0, 0, 204);"&gt;if&lt;/span&gt; (&lt;span style="color: rgb(0, 0, 204);"&gt;isset&lt;/span&gt;(&lt;span style="color: rgb(0, 0, 153);"&gt;$erreur6&lt;/span&gt;)) &lt;span style="color: rgb(0, 0, 204);"&gt;echo&lt;/span&gt; '&amp;lt;p&amp;gt;'.&lt;span style="color: rgb(0, 0, 153);"&gt;$erreur6&lt;/span&gt;.'&amp;lt;/p&amp;gt;';&lt;br&gt;	&lt;span style="color: rgb(0, 0, 204);"&gt;if&lt;/span&gt; (&lt;span style="color: rgb(0, 0, 204);"&gt;isset&lt;/span&gt;(&lt;span style="color: rgb(0, 0, 153);"&gt;$erreur7&lt;/span&gt;)) &lt;span style="color: rgb(0, 0, 204);"&gt;echo&lt;/span&gt; '&amp;lt;p&amp;gt;'.&lt;span style="color: rgb(0, 0, 153);"&gt;$erreur7&lt;/span&gt;.'&amp;lt;/p&amp;gt;';&lt;br&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204); color: rgb(255, 0, 0);"&gt;?&amp;gt;&lt;/pre&gt;Une fois mis en place, la page de contact sera am�lior�e d'une mani�re basique contre les robots de spam.&lt;br&gt;&lt;h2&gt;T�l�charger la page de contact PHP&lt;/h2&gt;Pour simplifier tout ce qui a �t� dit, et au cas o� vous n'avez pas compris o� et comment ajouter les codes, vous pouvez &lt;a target="" title="" href="http://www.infowebmaster.fr/public/document/tutoriel-page-contact.txt"&gt;t�l�charger le code de la page de contact&lt;/a&gt;. Ce fichier est au format texte, mais contient tout le code n�cessaire. Il suffit de renommer la page en ".php" et de l'installer sur votre site pour pouvoir l'utiliser.&lt;br&gt;
		&lt;br /&gt;&lt;br /&gt;
		Source: &lt;a href="http://www.infowebmaster.fr/tutoriel/creer-page-contact-php"&gt;Cr�er une page de contact en PHP&lt;/a&gt;.
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/JFgZ7go6dl7nVnm_J6Q7PiPypj0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JFgZ7go6dl7nVnm_J6Q7PiPypj0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/JFgZ7go6dl7nVnm_J6Q7PiPypj0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JFgZ7go6dl7nVnm_J6Q7PiPypj0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description>
<pubDate>Thu, 30 Sep 2010 13:59:46 +0100</pubDate>
<guid>http://www.infowebmaster.fr/tutoriel/creer-page-contact-php</guid>
</item>

<item>
<title>Cr�er une page XHTML simple</title>
<link>http://www.infowebmaster.fr/tutoriel/creer-page-xhtml-simple</link>
<description>Ce
 petit cours pour d�butant explique comment cr�er une page web (en 
XHTML), m�me si vous n'y connaissez rien en informatique et 
programmation. A la fin de ce tutoriel, vous aurez cr�� une premi�re 
petite page web et obtenu des connaissances de bases en XHTML.&lt;br&gt;&lt;h2&gt;Pr�requis&lt;/h2&gt;Il
 est n�cessaire d'avoir envie d'apprendre quelques bases sur le langage X
HTML et de poss�der un �diteur de texte basique. Si vous n'en avez pas, je vous 
sugg�re de &lt;a target="" title="" href="http://notepad-plus-plus.org/fr/download"&gt;t�l�charger Notepad++&lt;/a&gt;, qui est un �diteur texte tr�s pratique pour la programmation.&lt;br&gt;&lt;h2&gt;Cr�er un fichier XHTML&lt;br&gt;
&lt;/h2&gt;La premi�re chose � faire consiste � ouvrir une nouvelle page 
("fichier" -&amp;gt; "nouveau"). Puis il faut enregistrer cette page vierge 
au format XHTML. Pour cela il faut cliquer sur "fichier" -&amp;gt; 
"enregistrer sous", choisir l'endroit o� la page web doit �tre 
enregistr�e et indiquer un nom tel que "page.html". Pour information, il
 y a deux extensions possibles ".html" ou ".htm". Pour finir, il faut 
cliquer sur "Enregistrer" pour sauver la toute fraiche page nouvellement
 cr��e.&lt;br&gt;
&lt;h2&gt;Code d'une page XHTML simple&lt;/h2&gt;La page web est donc cr��, mais elle est vierge. Pour cr�� une page web simple il faut copier et coller le code XHTML suivant:&lt;br&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&amp;lt;!DOCTYPE html PUBLIC "&lt;span style="color: rgb(102, 0, 153);"&gt;-//W3C//DTD XHTML 1.0 Strict//EN&lt;/span&gt;" "&lt;span style="color: rgb(102, 0, 153);"&gt;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&lt;/span&gt;"&amp;gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(0, 0, 204);"&gt;&amp;lt;html&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;xmlns&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;http://www.w3.org/1999/xhtml&lt;/span&gt;" xml:lang="&lt;span style="color: rgb(102, 0, 153);"&gt;fr&lt;/span&gt;"&lt;span style="color: rgb(0, 0, 204);"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="color: rgb(0, 0, 204); background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; &amp;lt;head&amp;gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(0, 0, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt;&lt;/span&gt;Titre de la page&lt;span style="color: rgb(0, 0, 204);"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(0, 0, 204);"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;meta&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;http-equiv&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;Content-Type&lt;/span&gt;" &lt;span style="color: rgb(255, 0, 0);"&gt;content&lt;/span&gt;="&lt;span style="color: rgb(102, 0, 153);"&gt;text/html; charset=iso-8859-1&lt;/span&gt;" &lt;span style="color: rgb(0, 0, 204);"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="color: rgb(0, 0, 204); background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; &amp;lt;/head&amp;gt;&lt;/pre&gt;&lt;pre style="color: rgb(0, 0, 204); background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; &amp;lt;body&amp;gt;&lt;/pre&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(0, 0, 204);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;p&amp;gt;&lt;/span&gt;Contenu de la page.&lt;span style="color: rgb(0, 0, 204);"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="color: rgb(0, 0, 204); background-color: rgb(255, 255, 204);"&gt;&amp;nbsp; &amp;lt;/body&amp;gt;&lt;/pre&gt;&lt;pre style="color: rgb(0, 0, 204); background-color: rgb(255, 255, 204);"&gt;&amp;lt;/html&amp;gt;&lt;/pre&gt;Une fois ce code cr��, il faut enregistrer en s�lectionnant "fichier" -&amp;gt; "enregistrer". Voil�, la page est cr��e.&lt;br&gt;&lt;h2&gt;Ouvrir la page web&lt;/h2&gt;Maintenant que la page est cr��, il doit y avoir un fichier de ce type � l'endroit o� vous avez enregistr� la page:&lt;br&gt;&lt;div style="text-align: center;"&gt;&lt;img alt="" src="../public/image/capture/windows-fichier-html.jpg" align="none"&gt;&lt;br&gt;&lt;/div&gt;Pour
 ouvrir la page avec un navigateur web (exemple: Internet Explorer, 
Firefox ...) il faut double-cliquer sur le fichier. Si vous utilisez 
Firefox vous devriez voir une page de ce type:&lt;br&gt;&lt;div style="text-align: center;"&gt;&lt;img alt="" src="../public/image/capture/page-web-xhtml-simple-500px.jpg" align="none"&gt;&lt;br&gt;&lt;/div&gt;Vous pouvez dors et d�j� remarquer que le titre "&lt;span style="font-style: italic;"&gt;Titre de la page&lt;/span&gt;" est visible en haut du navigateur et que le contenu "&lt;span style="font-style: italic;"&gt;Contenu de la page&lt;/span&gt;" est visible sur la page.&lt;br&gt;&lt;h2&gt;Comprendre le code&lt;/h2&gt;Vous avez d�j� surement compris o� vous devez agir pour modifier le titre et le contenu. Voici des explications plus d�taill�es:&lt;br&gt;&lt;ul&gt;&lt;li&gt;La
 premi�re ligne stipule le doctype. �a donne des informations sur le 
code qui le succ�de, pour que les navigateurs web sachent comment 
afficher la page&lt;/li&gt;&lt;li&gt;La page web est comprise entre &amp;lt;html&amp;gt; et &amp;lt;/html&amp;gt;&lt;/li&gt;&lt;li&gt;Le code entre &amp;lt;head&amp;gt; et &amp;lt;/head&amp;gt; est interpr�t� par le navigateur et stipule des directives pour la page web&lt;/li&gt;&lt;li&gt;Le texte entre &amp;lt;title&amp;gt; et &amp;lt;/title&amp;gt; est tout simplement le &lt;a target="" title="" href="../25,news-site-efficace-titre-principal.html"&gt;titre principal d'une page web&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Le texte qui commence par &amp;lt;meta ...&amp;gt; d�finie le codage des caract�res&lt;br&gt;&lt;/li&gt;&lt;li&gt;Le code entre &amp;lt;body&amp;gt; et &amp;lt;/body&amp;gt; c'est le texte qui sera visible sur la page&lt;/li&gt;&lt;li&gt;La balise &amp;lt;p&amp;gt; d�finit un paragraphe. Le texte pr�sent entre &amp;lt;p&amp;gt; et &amp;lt;/p&amp;gt; est le texte d'un paragraphe&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Aller plus loin&lt;/h2&gt;Pour
 aller plus loin, il est possible d'essayer d'autre balises XHTML. Par 
exemple pour mettre du texte en gras il faut placer du texte entre 
&amp;lt;strong&amp;gt; et &amp;lt;/strong&amp;gt;. Et puis pour mettre du texte en 
italique il faut le mettre en &amp;lt;em&amp;gt; et &amp;lt;/em&amp;gt;.
		&lt;br /&gt;&lt;br /&gt;
		Source: &lt;a href="http://www.infowebmaster.fr/tutoriel/creer-page-xhtml-simple"&gt;Cr�er une page XHTML simple&lt;/a&gt;.
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5WZVDHQjk9u4oWMVT2lZ9WtSLYM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5WZVDHQjk9u4oWMVT2lZ9WtSLYM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/5WZVDHQjk9u4oWMVT2lZ9WtSLYM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5WZVDHQjk9u4oWMVT2lZ9WtSLYM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description>
<pubDate>Tue, 28 Sep 2010 23:19:11 +0100</pubDate>
<guid>http://www.infowebmaster.fr/tutoriel/creer-page-xhtml-simple</guid>
</item>

<item>
<title>Envoyer un email en PHP</title>
<link>http://www.infowebmaster.fr/tutoriel/envoyer-email-php</link>
<description>Le langage PHP permet d'envoyer des email facilement gr�ce � la fonction &lt;a target="" title="" href="http://php.net/manual/fr/function.mail.php"&gt;mail()&lt;/a&gt;. Ce tutoriel va expliquer comment envoyer facilement un email gr�ce � cette fonction. Plusieurs codes seront fournit pour envoyer des emails basiques, ou au format HTML ou encore avec des en-t�tes suppl�mentaires qui permettent de faire des emails qui passent plus facilement les filtres anti-spam.&lt;br&gt;&lt;h2&gt;Pr�requis&lt;/h2&gt;Il est n�cessaire d'avoir un espace web et de savoir comment cr�er une page en PHP. L'id�al est d'avoir des notions en PHP pour comprendre les codes donn�es ci-apr�s.&lt;br&gt;&lt;h2&gt;Envoyer un email au format texte basique&lt;/h2&gt;Le code PHP ci-dessous permet d'envoyer un email basique � n'importe quelle adresse email.&lt;br&gt;&lt;pre&gt;&lt;span style="color: rgb(255, 0, 0); background-color: rgb(255, 255, 204);"&gt;&amp;lt;?php&lt;/span&gt;&lt;br style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(0, 0, 153); background-color: rgb(255, 255, 204);"&gt;$destinataire&lt;/span&gt;&lt;span style="background-color: rgb(255, 255, 204);"&gt; = 'contact@example.com'; &lt;/span&gt;&lt;span style="color: rgb(0, 153, 0); background-color: rgb(255, 255, 204);"&gt;// Adresse email du destinataire&lt;/span&gt;&lt;br style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(0, 0, 153); background-color: rgb(255, 255, 204);"&gt;$sujet&lt;/span&gt;&lt;span style="background-color: rgb(255, 255, 204);"&gt; = 'Titre du message'; &lt;/span&gt;&lt;span style="color: rgb(0, 153, 0); background-color: rgb(255, 255, 204);"&gt;// Titre de l'email&lt;/span&gt;&lt;br style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(0, 0, 153); background-color: rgb(255, 255, 204);"&gt;$message&lt;/span&gt;&lt;span style="background-color: rgb(255, 255, 204);"&gt; = 'Bonjour. Ceci est un message qui sera envoy� par email. Au revoir.'; &lt;/span&gt;&lt;span style="color: rgb(0, 153, 0); background-color: rgb(255, 255, 204);"&gt;// Contenu du message de l'email&lt;/span&gt;&lt;br style="background-color: rgb(255, 255, 204);"&gt;&lt;br style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="background-color: rgb(255, 255, 204);"&gt;mail(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153); background-color: rgb(255, 255, 204);"&gt;$destinataire&lt;/span&gt;&lt;span style="background-color: rgb(255, 255, 204);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 153); background-color: rgb(255, 255, 204);"&gt;$sujet&lt;/span&gt;&lt;span style="background-color: rgb(255, 255, 204);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 153); background-color: rgb(255, 255, 204);"&gt;$message&lt;/span&gt;&lt;span style="background-color: rgb(255, 255, 204);"&gt;); &lt;/span&gt;&lt;span style="color: rgb(0, 153, 0); background-color: rgb(255, 255, 204);"&gt;// Fonction principale qui envoi l'email&lt;/span&gt;&lt;br style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(0, 0, 204); background-color: rgb(255, 255, 204);"&gt;echo&lt;/span&gt;&lt;span style="background-color: rgb(255, 255, 204);"&gt; 'Email envoy�!';&lt;/span&gt;&lt;br style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(255, 0, 0); background-color: rgb(255, 255, 204);"&gt;?&amp;gt;&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;Les trois variables &lt;span style="font-weight: bold;"&gt;$destinataire&lt;/span&gt;, &lt;span style="font-weight: bold;"&gt;$sujet&lt;/span&gt; et &lt;span style="font-weight: bold;"&gt;$message&lt;/span&gt; contiennent les principales informations (� personnaliser) de l'email.&lt;br&gt;&lt;h2&gt;Envoyer un email au format HTML&lt;/h2&gt;Alors que le code pr�sent� dans le chapitre ci-dessus est tr�s basique, l'autre code, pr�sent� ci-dessous est au format HTML pour pouvoir personnaliser et agr�menter le message (ajouter des images, un design ...).&lt;br&gt;&lt;pre style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;?php&lt;/span&gt;&lt;br&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;$destinataire&lt;/span&gt; = 'contact@example.com'; &lt;span style="color: rgb(0, 153, 0);"&gt;// Adresse email du destinataire&lt;/span&gt;&lt;br&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;$sujet&lt;/span&gt; = 'Titre du message'; &lt;span style="color: rgb(0, 153, 0);"&gt;// Titre de l'email&lt;/span&gt;&lt;br&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;$message&lt;/span&gt; = '&amp;lt;html&amp;gt;&lt;br&gt;&amp;lt;head&amp;gt;&lt;br&gt;&amp;lt;title&amp;gt;Titre du message&amp;lt;/title&amp;gt;&lt;br&gt;&amp;lt;/head&amp;gt;&lt;br&gt;&amp;lt;body&amp;gt;&lt;br&gt;&amp;lt;p&amp;gt;Contenu du message. Les balises &amp;lt;strong&amp;gt;HTML&amp;lt;/strong&amp;gt; peuvent �tre utilis�e.&amp;lt;/p&amp;gt;&lt;br&gt;&amp;lt;/body&amp;gt;&lt;br&gt;&amp;lt;/html&amp;gt;'; &lt;span style="color: rgb(0, 153, 0);"&gt;// Contenu du message de l'email&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;// Pour envoyer un email HTML, l'en-t�te Content-type doit �tre d�fini&lt;/span&gt;&lt;br&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;$headers&lt;/span&gt; = 'MIME-Version: 1.0'."\r\n";&lt;br&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;$headers&lt;/span&gt; .= 'Content-type: text/html; charset=iso-8859-1'."\r\n";&lt;br&gt;&lt;br&gt;mail(&lt;span style="color: rgb(0, 0, 153);"&gt;$destinataire&lt;/span&gt;, &lt;span style="color: rgb(0, 0, 153);"&gt;$sujet&lt;/span&gt;, &lt;span style="color: rgb(0, 0, 153);"&gt;$message&lt;/span&gt;, &lt;span style="color: rgb(0, 0, 153);"&gt;$headers&lt;/span&gt;); &lt;span style="color: rgb(0, 153, 0);"&gt;// Fonction principale qui envoi l'email&lt;/span&gt;&lt;br&gt;&lt;span style="color: rgb(0, 0, 204);"&gt;echo&lt;/span&gt; 'Email envoy�!';&lt;br&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;?&amp;gt;&lt;/span&gt;&lt;/pre&gt;Le code est presque similaire mis � part que le message contient du code HTML et que la variables &lt;span style="font-weight: bold;"&gt;$headers&lt;/span&gt; contient un ent�te qui d�finie le type de l'email comme �tant du code HTML.&lt;br&gt;&lt;h2&gt;Ajouter des en-t�tes additionnels&lt;/h2&gt;Gr�ce aux en-t�tes de l'email, il est possible d'am�liorer l'envoi d'email par PHP. Il est possible d'am�liorer le contenu de la variable $headers gr�ce � ce code:&lt;br&gt;&lt;pre&gt;&lt;span style="color: rgb(255, 0, 0); background-color: rgb(255, 255, 204);"&gt;&amp;lt;?php&lt;/span&gt;&lt;br style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(0, 0, 153); background-color: rgb(255, 255, 204);"&gt;$headers&lt;/span&gt;&lt;span style="background-color: rgb(255, 255, 204);"&gt; = 'MIME-Version: 1.0'."\r\n";&lt;/span&gt;&lt;br style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(0, 0, 153); background-color: rgb(255, 255, 204);"&gt;$headers&lt;/span&gt;&lt;span style="background-color: rgb(255, 255, 204);"&gt; .= 'Content-type: text/html; charset=iso-8859-1'."\r\n";&lt;/span&gt;&lt;br style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(0, 0, 153); background-color: rgb(255, 255, 204);"&gt;$headers&lt;/span&gt;&lt;span style="background-color: rgb(255, 255, 204);"&gt; .= 'From: "Votre Nom et Pr�nom"&amp;lt;contact@example.com&amp;gt;'."\n"; &lt;/span&gt;&lt;span style="color: rgb(0, 153, 0); background-color: rgb(255, 255, 204);"&gt;// Votre adresse email (� personnaliser)&lt;/span&gt;&lt;br style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(0, 0, 153); background-color: rgb(255, 255, 204);"&gt;$headers&lt;/span&gt;&lt;span style="background-color: rgb(255, 255, 204);"&gt; .= 'Reply-To: contact@example.com'."\n"; &lt;/span&gt;&lt;span style="color: rgb(0, 153, 0); background-color: rgb(255, 255, 204);"&gt;// Votre adresse email (� personnaliser).&lt;/span&gt;&lt;br style="color: rgb(0, 153, 0); background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(0, 153, 0); background-color: rgb(255, 255, 204);"&gt;// Lorsque le destinaire cliquera sur "r�pondre", par d�faut l'adresse email de "reply-to" sera utilis�e&lt;/span&gt;&lt;br style="background-color: rgb(255, 255, 204);"&gt;&lt;span style="color: rgb(255, 0, 0); background-color: rgb(255, 255, 204);"&gt;?&amp;gt;&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;Cet exemple n'utilise que quelques en-t�tes. Il en existe d'autres pour divers objectifs mais ceux pr�sent�s sont les plus courant.&lt;br&gt;En installant et testant ces codes, vous �tes maintenant capable d'envoyer un email avec PHP.&lt;br&gt;
		&lt;br /&gt;&lt;br /&gt;
		Source: &lt;a href="http://www.infowebmaster.fr/tutoriel/envoyer-email-php"&gt;Envoyer un email en PHP&lt;/a&gt;.
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/bGO_Imr4VlhFZAFIi6uEfJM-yMA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/bGO_Imr4VlhFZAFIi6uEfJM-yMA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/bGO_Imr4VlhFZAFIi6uEfJM-yMA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/bGO_Imr4VlhFZAFIi6uEfJM-yMA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description>
<pubDate>Tue, 28 Sep 2010 21:28:04 +0100</pubDate>
<guid>http://www.infowebmaster.fr/tutoriel/envoyer-email-php</guid>
</item>

<item>
<title>R�duire le poids des images</title>
<link>http://www.infowebmaster.fr/tutoriel/reduire-poids-images</link>
<description>Le poids des images web est important pour optimiser la vitesse d'affichage d'une page web. Ce tutoriel explique comment r�duire le poids des images avec le logiciel &lt;span style="font-weight: bold;"&gt;The Gimp&lt;/span&gt; et l'application web &lt;span style="font-weight: bold;"&gt;Smushit&lt;/span&gt; de Yahoo.&lt;br&gt;&lt;h2&gt;Pr�requis&lt;/h2&gt;Ce tutoriel est assez simple � comprendre et d�tail la plupart des �tapes. Id�alement il faut avoir The Gimp d'install� sur votre ordinateur ou au mieux il faut tout de m�me savoir comment t�l�charger et installer ce logiciel.&lt;br&gt;&lt;h2&gt;Utiliser The Gimp&lt;/h2&gt;Le logiciel Gimp est un outil de retouche d'image. C'est un peu l'�quivalent gratuit de Photoshop. Si vous ne l'avez pas sur votre ordinateur il est facile de &lt;a target="" title="" href="http://www.01net.com/telecharger/windows/Multimedia/creation_graphique/fiches/5245.html"&gt;t�l�charger Gimp&lt;/a&gt; et de l'installer.&lt;br&gt;&lt;h3&gt;Redimensionner une image&lt;/h3&gt;En redimensionnant une image, le poids peut �tre r�duit significativement. Cela est avantageux d'autant plus que le changement de dimension n'affecte pas forc�ment la qualit� de l'image pour certain type d'utilisation.&lt;br&gt;Pour redimensionner une image il suffit de cliquer dans la barre des t�ches sur "&lt;span style="font-style: italic;"&gt;image&lt;/span&gt;" (� c�t� de "fichier", "�dition" ...) puis sur "&lt;span style="font-style: italic;"&gt;�chelle et taille de l'image&lt;/span&gt;".&lt;br&gt;&lt;div style="text-align: center;"&gt;&lt;img alt="" src="http://www.infowebmaster.fr/public/image/capture/gimp-menu-image-echelle.jpg" align="none"&gt;&lt;br&gt;&lt;/div&gt;D�s lors une fen�tre s'ouvre pour choisir les nouvelles dimensions. Il faut ensuite valider le choix des nouvelles dimensions en cliquant sur "&lt;span style="font-style: italic;"&gt;�chelle&lt;/span&gt;".&lt;br&gt;&lt;div style="text-align: center;"&gt;&lt;img alt="" src="http://www.infowebmaster.fr/public/image/capture/gimp-fenetre-echelle-taille-image.jpg" align="none"&gt;&lt;br&gt;&lt;/div&gt;Et enfin enregistrer l'image en cliquant sur "fichier" -&amp;gt; "enregistrer".&lt;br&gt;&lt;div style="text-align: center;"&gt;&lt;img alt="" src="http://www.infowebmaster.fr/public/image/capture/gimp-menu-fichier-enregistrer.jpg" align="none"&gt;&lt;br&gt;&lt;/div&gt;&lt;h3&gt;R�duire la qualit� d'une image Jpeg&lt;/h3&gt;Le format d'image Jpeg peut �tre compress� � diff�rent taux. Plus une image est compress�, moins elle est lourde et plus la qualit� se d�grade. L'avantage de Gimp c'est que lorsqu'une image Jpeg est sauvegard�e, le logiciel demande automatiquement � quel taux il doit �tre compress�.&lt;br&gt;L'�tape pour choisir le taux de compression consiste � cliquer sur "Fichier" -&amp;gt; "Enregistrer sous" et dans l'une des fen�tres qui s'ouvre, il suffit de choisir la qualit� entre 0 et 100.&lt;br&gt;&lt;div style="text-align: center;"&gt;&lt;img alt="" src="http://www.infowebmaster.fr/public/image/capture/gimp-fenetre-enregistrer-jpeg.jpg" align="none"&gt;&lt;br&gt;&lt;/div&gt;&lt;h2&gt;Utiliser Smushit&lt;/h2&gt;L'outil Smushit permet de compresser une nouvelle fois une image. L'outil supprime les informations inutiles sans toucher � la qualit� de l'image. Voici les points caract�ristiques qui font le succ�s de Smushit:&lt;br&gt;&lt;ul&gt;&lt;li&gt;Plusieurs types d'image accept�e&lt;/li&gt;&lt;li&gt;Plusieurs fa�on pour envoyer une image (upload ou � partir d'une URL)&lt;/li&gt;&lt;li&gt;Informations pour savoir le poids qui a �t� gagn�&lt;/li&gt;&lt;li&gt;A la fin toutes les images sont incluses dans un fichier zip&lt;/li&gt;&lt;/ul&gt;&lt;br&gt;Avec Gimp et Smushit, les images peuvent optimis�e au mieux. C'est ainsi id�al pour &lt;a target="" title="" href="http://www.infowebmaster.fr/107,news-optimiser-chargement-images-web.html"&gt;optimiser le chargement des images&lt;/a&gt; sur un site web.&lt;br&gt;
		&lt;br /&gt;&lt;br /&gt;
		Source: &lt;a href="http://www.infowebmaster.fr/tutoriel/reduire-poids-images"&gt;R�duire le poids des images&lt;/a&gt;.
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Akj8mKjlorDETq55PKDNbvWATPk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Akj8mKjlorDETq55PKDNbvWATPk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Akj8mKjlorDETq55PKDNbvWATPk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Akj8mKjlorDETq55PKDNbvWATPk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</description>
<pubDate>Mon, 27 Sep 2010 23:40:22 +0100</pubDate>
<guid>http://www.infowebmaster.fr/tutoriel/reduire-poids-images</guid>
</item>

</channel>
</rss>
