<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">
<rss version="0.91">
<channel>
	<title>Billets / Maraumax.Fr</title>
	<link>http://www.maraumax.fr/</link>
	<description>Derniers billets du blog / Maraumax.Fr</description>
	<language>en-us</language>
	<item>
		<title>Ignorer certains fichiers avec Filezilla (svn, thumbs.db...)</title>
		<link>http://www.maraumax.fr/billets-45-ignorer-certains-fichiers-avec-filezilla-svn-thumbs.db..html</link>
		<description><![CDATA[Catégorie : Software<br />
Ajouté le : Tue, 11 Oct 2011 10:31:35 +0200<br />
Description : <p>Le client FTP <a href="http://filezilla-project.org/">FileZilla</a> ne cèsse de s'améliorer au fil du temps. Il est possible depuis la version 3 de gérer des filtres permettant d'éviter de transférer (et d'affichier) un fichier ou un dossier.<br /><br />Ces filtres sont très pratiques si vous souhaitez éviter de transférer par exemple les fichier .svn d'un de vos dépots ou encore les fameux fichiers thumbs.db de Windows.<br /><br />La procédure pour les activer est très simple :<br /><img src="http://www.maraumax.fr/medias/Billets/tutoriels/filezilla-filtres-de-contenu.jpg" alt="http://www.maraumax.fr/medias/Billets/tutoriels/filezilla-filtres-de-contenu.jpg" style="display: block; margin:0 auto;" /><br /><br />Ensuitre la fenêtre suivante s'ouvre. Il vous suffit de cocher comme moi les deux premières options :<br /><img src="http://www.maraumax.fr/medias/Billets/tutoriels/filezilla-svn-thumbs.jpg" alt="http://www.maraumax.fr/medias/Billets/tutoriels/filezilla-svn-thumbs.jpg" style="display: block; margin:0 auto;" /><br /><br />La première permet de filtrer les dossiers des dépots SVN et la seconde le fichiers thumbs.db de windows ! Pensez bien à cocher des deux cotés (Local et Distant)</p>]]></description>
	</item>
	<item>
		<title>Envoyer des sms gratuitement depuis votre ordinateur !</title>
		<link>http://www.maraumax.fr/billets-44-envoyer-des-sms-gratuitement-depuis-votre-ordinateur.html</link>
		<description><![CDATA[Catégorie : Web<br />
Ajouté le : Wed, 05 Oct 2011 17:39:22 +0200<br />
Description : <p><img src="http://www.easy-thumb.net/min.html?url=http://www.sms-pas-cher.com/&amp;size=240x180" alt="http://www.easy-thumb.net/min.html?url=http://www.sms-pas-cher.com/&amp;amp;size=240x180" style="float: right; margin: 0 0 1em 1em;" /><a href="http://www.sms-pas-cher.com/">Sms Pas Cher</a> vous permet d'envoyer des sms depuis votre navigateur ou directement depuis votre ordinateur grâce à un logiciel simple d'utilisation.<br /><br /><span style="font-size: larger;">Comment ça marche ?</span><br />Chaque jour, lors de votre connexion au site vous gagnez un crédit sur votre compte. Vous pouvez très bien envoyer directement un texto ou revenir le lendemain pour accumuler les crédits.<br /><br />Ces crédits vous permettent donc d'envoyer des sms soit depuis le site internet ou depuis le logiciel (sans installation) disponible gratuitement sur le site. Vous pouvez aussi utiliser l'api pour envoyer des sms depuis vos sites internet.<br /><br /><span style="font-size: larger;">Les fonctionnalités</span><br />Le site propose de nombreuses fonctionnalités parmi les suivantes :<br />- Gestion des contacts et des groupes<br />- Historique des sms avec statuts<br />- Possibilité de modifier l'expéditeur des messages<br />- Envoie des sms dans le monde<br />- Listing des messages reçus<br />- Gagner des crédits grâce au programme d'affiliation ou grâce à des campagnes<br /><br />Vous pouvez très bien utiliser le site sans débourser un centime, si vous souhaitez envoyer plus de textos, il est aussi possible d'en acheter à des prix à partir 0.08€ le sms !<br /><br />Lien : <a href="http://www.sms-pas-cher.com/">Sms Pas Cher</a></p>]]></description>
	</item>
	<item>
		<title>Savoir quel programme à ouvert quel port</title>
		<link>http://www.maraumax.fr/billets-43-savoir-quel-programme-ouvert-quel-port.html</link>
		<description><![CDATA[Catégorie : Software<br />
Ajouté le : Mon, 31 Jan 2011 11:21:35 +0100<br />
Description : <p>Voici une astuce bien pratique permettant de retrouver un programme qui peux par exemple vous déranger et donc vous permettre de le killer.<br /><br />Dans mon cas j'ai souhaité savoir quel programme écoutait sur le port 80 (http) de mon ordinateur.<br /><br /><span style="font-size: larger;">Sous Windows</span><br /><br />Pour ouvrir l'invite de commande cliquez sur démarer puis exécuter (ou directement dans le champ texte) puis entrez &quot;cmd&quot; dans la fenêtre qui s'est ouverte.<br /><img src="http://www.maraumax.fr/medias/Billets/tutoriels/invite-cmd.png" alt="http://www.maraumax.fr/medias/Billets/tutoriels/invite-cmd.png" style="display: block; margin:0 auto;" /><br />Vous validez, la fenêtre se ferme et une autre s'ouvre à vous !<br /><img src="http://www.maraumax.fr/medias/Billets/tutoriels/invite-commande.png" alt="http://www.maraumax.fr/medias/Billets/tutoriels/invite-commande.png" style="display: block; margin:0 auto;" /><br />Dans cette console, vous devez écrire les deux commandes suivantes permettant de récupérer la liste des connexions actives et ensuite de filtrer avec le port que vous recherchez.<br /></p><div class="codebox"><!-- <strong>BASH Code :</strong> --><div class="incqbox"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Remplacez &quot;:80&quot; par le port que vous souhaitez rechercher</span>
<span style="color: #c20cb9; font-weight: bold;">netstat</span> <span style="color: #660033;">-ano</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #ff0000;">&quot;:80&quot;</span></pre></div></div><p>Vous pouvez ensuite apercevoir le résultat de votre commande.<br /><img src="http://www.maraumax.fr/medias/Billets/tutoriels/invite-netstat.png" alt="http://www.maraumax.fr/medias/Billets/tutoriels/invite-netstat.png" style="display: block; margin:0 auto;" /><br />Une petite explication des colonnes :<br /><span style="color: #ff0000">1</span> - Le type de connexions (TCP ou UDP)<br /><span style="color: #ff0000">2</span> - Adresse / Port locale de connexion<br /><span style="color: #ff0000">3</span> - Adresse / Port distante<br /><span style="color: #ff0000">4</span> - L'état de la connexion<br /><span style="color: #ff0000">5</span> - Le numéro du processus correspondant<br /><br />Pour savoir si un port est à l'écoute il suffit de regarder dans la quatrième colonne si l'état est &quot;LISTENING&quot;. Par exemple dans la capture d'écran les ports 80 et 8002 sont à l'écoute.<br /><br />Il suffit ensuite de récupérer le numéro du processus et de regarder dans le &quot;tasklist&quot;.<br /></p><div class="codebox"><!-- <strong>BASH Code :</strong> --><div class="incqbox"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># N'oubliez pas de remplacer le numéro de votre processus</span>
tasklist <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #ff0000;">&quot;3952&quot;</span></pre></div></div><p><img src="http://www.maraumax.fr/medias/Billets/tutoriels/invite-tasklist.png" alt="http://www.maraumax.fr/medias/Billets/tutoriels/invite-tasklist.png" style="display: block; margin:0 auto;" /><br />Vous pouvez désormais récupérer le nom du processus (&quot;httpd.exe&quot; correspondant à apache dans l'exemple) dans la première colonne du résultat.<br /><br /><span style="font-size: larger;">Sous Linux</span><br /><br />Sous linux c'est toujours avec la commande netstat seulement c'est beaucoup plus simple car le résultat de cette commande est plus complet.<br /><br />Pour récupérer la liste des ports et programmes qui écoute il vous suffit simplement d'utiliser cette commande :<br /></p><div class="codebox"><!-- <strong>BASH Code :</strong> --><div class="incqbox"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Remplacez :www par votre protocole ou le port souhaité</span>
<span style="color: #c20cb9; font-weight: bold;">netstat</span> <span style="color: #660033;">-lpt</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> LISTEN <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> :www</pre></div></div><p><img src="http://www.maraumax.fr/medias/Billets/tutoriels/netstat-unix.png" alt="http://www.maraumax.fr/medias/Billets/tutoriels/netstat-unix.png" style="display: block; margin:0 auto;" /><br />Et dans la dernière colonne on remarque que c'est apache2 qui écoute sur le port 80.<br /><br />En espérant vous avoir été utile !</p>]]></description>
	</item>
	<item>
		<title>TimeStamp.Pro vous permet de convertir vos dates et timestamp</title>
		<link>http://www.maraumax.fr/billets-42-timestamp.pro-vous-permet-de-convertir-vos-dates-et-timestamp.html</link>
		<description><![CDATA[Catégorie : Web<br />
Ajouté le : Fri, 03 Sep 2010 09:19:56 +0200<br />
Description : <p><img src="http://www.maraumax.fr/medias/Billets/timestamp-pro.png" alt="http://www.maraumax.fr/medias/Billets/timestamp-pro.png" style="float: right; margin: 0 0 1em 1em;" />Le timestamp aussi appelé <ins>heure Unix</ins> ou encore <ins>heure Posix</ins> correspond aux nombres de secondes écoulées depuis le 1er janvier 1970 00:00:00 UTC.<br /><br />C'est une valeur courament utilisée dans le développement de site internet car elle permet de manier très facilement les dates. Par exemple une simple soustraction permet de récupérer une différence entre deux dates.<br /><br />Cependant le timestamp présente un gros inconvéniant : sont format n'est pas parlant pour un être humain ! Par exemple savez-vous à quel date correspond le timestamp &quot;1262300400&quot; ? Simplement au 1er Janvier 2010 à 00 heures 00 minutes et 00 secondes.<br /><br />J'ai donc dans un premier temps pour ma propre utilisation puis ensuite pour tous les développeurs décidé de créer un &quot;mini-site&quot; permettant de manipuler simplement ce format.<br /><br /><strong>TimeStamp.Pro</strong> vous offre donc la possibilitée de convertir un timestamp en date et inversement, faire une différence entre deux timestamp mais aussi de mettre en place un widjet sur votre navigateur préféré (Firefox) permettant de convertir les dates et timestamp directement depuis les sites internet que vous développez/visitez !<br /><br />Visiter : <a href="http://www.timestamp.pro">TimeStamp.Pro</a></p>]]></description>
	</item>
	<item>
		<title>Limitation paramètres dans fichier .htaccess</title>
		<link>http://www.maraumax.fr/billets-41-limitation-parametres-dans-fichier-.htaccess.html</link>
		<description><![CDATA[Catégorie : Développement<br />
Ajouté le : Fri, 27 Aug 2010 10:10:03 +0200<br />
Description : <p>Il m'est arrivé dans certains projet d'avoir de nombreux paramètres dans les adresse. Rien de bien compliqué dans un premiet temps, sauf lorsque l'on souhaite ré-écrire une URL avec plus de 9 paramètres.<br /><br /><span style="font-size: larger;">Explication</span><br /><br />Pour faire simple, rien de mieux qu'un exemple !<br /></p><div class="codebox"><!-- <strong>TEXT Code :</strong> --><div class="incqbox"><pre class="text" style="font-family:monospace;">RewriteEngine on
&nbsp;
# Exemple 1
# Url test : informations-1-p-2-q-3-r-4-s-5-t-6-u-8-v-9-w-10.html
RewriteRule ^informations-([0-9]*)-p-([0-9]*)-q-([0-9]*)-r-([0-9]*)-s-([0-9]*)-t-([0-9]*)-u-([0-9]*)-v-([0-9]*)-w-([0-9]*)-x-([0-9]*).html$ informations.php?id=$1&amp;p=$2&amp;q=$3&amp;r=$4&amp;s=$5&amp;t=$6&amp;u=$7&amp;v=$8&amp;w=$9&amp;x=$10 [L]
&nbsp;
# Exemple 2
# Url test : informations-1-p-2-t-6.html
RewriteRule ^informations-([0-9]*)(-p-[0-9]*)?(-q-([0-9]*))?(-r-([0-9]*))?(-s-([0-9]*))?(-t-([0-9]*)).html$ informations.php?id=$1&amp;p=$3&amp;q=$5&amp;r=$7&amp;s=$9&amp;t=$11 [L]</pre></div></div><p><strong>Exemple 1</strong><br />Dans cet exemple, notre adresse devra contenir tous les paramètres soit un total de 10 paramètres / variables.<br /><br /><strong>Exemple 2</strong><br />Pour le second exemple, il y a un paramètre obligatoire ainsi que cinq paramètres facultatifs. Donc 11 variables.<br /><br />Jusque là il n'y a aucun problèmes. Seulement si vous testez ces ré-écritures vous remarquez un problème pour les paramètres supérieurs à 10.<br />En effet le second chiffre de la variable n'est pas pris en compte. Donc <em>$10</em> correspond à <em>$1</em>.<br /><br />Malhreusement pour le permier exemple je n'ai trouvé aucune solution... On est bien limité à 9 paramètres.<br />Mais pour le second exemple il existe un moyen de remédier au problème.</p><p><span style="font-size: larger;">Solution</span><br /><br />La solution consiste à indiquer qu'on ne souhaite pas récupérer la variable. Pour celà il suffit d'ajouter <strong>?:</strong> après les parenthèse limitant la variable.<br /><br />Voici ce que ça donnerais pour notre second exemple.<br /></p><div class="codebox"><!-- <strong>TEXT Code :</strong> --><div class="incqbox"><pre class="text" style="font-family:monospace;"># Exemple 2
# Url test : informations-1-p-2-t-6.html
RewriteRule ^informations-([0-9]*)(?:-p-[0-9]*)?(?:-q-([0-9]*))?(?:-r-([0-9]*))?(?:-s-([0-9]*))?(?:-t-([0-9]*)).html$ informations.php?id=$1&amp;p=$2&amp;q=$3&amp;r=$4&amp;s=$5&amp;t=$6 [L]</pre></div></div><p>En espérant avoir résolu vos problèmes !</p>]]></description>
	</item>
	<item>
		<title>Piwik analyse vos sites web !</title>
		<link>http://www.maraumax.fr/billets-40-piwik-analyse-vos-sites-web.html</link>
		<description><![CDATA[Catégorie : Web<br />
Ajouté le : Thu, 26 Aug 2010 11:29:29 +0200<br />
Description : <p><img src="http://maraumax.fr/medias/Billets/piwik-logo.gif" alt="http://maraumax.fr/medias/Billets/piwik-logo.gif" style="float: left; margin: 0 1em 1em 0;" />Piwik est un projet très intéressant qui vous permet d'installer sur votre hébergement un &quot;Google Analytics Like&quot;.<br />L'avantage c'est que l'on conserve la main sur ses statistiques évitant ainsi qu'elle soit utilisé contre notre gré...<br /><br />Le service est donc à installer sur votre hébergement et nécessite Php ainsi que Mysql. Une fois installé vous avez évidement la possibilité d'ajouter autant de sites et d'utilisateur que vous le souhaitez.</p><p>De nombreuses mises à jour sont effectués et apportent à chaques fois d'importantes améliorations. L'interface permet d'accèder à toutes les options que l'on souhaite et celà le plus rapidement possible.<br /><br /><a href="http://maraumax.fr/medias/Billets/piwik-preview-interface.gif"><img src="http://maraumax.fr/medias/Billets/piwik-preview-interface-mini.gif" alt="http://maraumax.fr/medias/Billets/piwik-preview-interface-mini.gif" style="display: block; margin:0 auto;" /></a><br /><br />Vous pouvez aussi installer des plugins permettant par exemple de calculer un gain en fonction du nombre de clics sur une page. Au niveau du tracker (càd ce qui permet d'enregistrer les visites de vos sites) vous pouvez mettre en place un code javascript sur vos pages, une image (moins d'informations disponible) ou encore utiliser l'<acronym title="Interface de Programmation">API</acronym> permettant de le faire via Php.<br /><br />Toujours grâce à l'API vous pouvez afficher en Live et sur votre site les statistiques de votre choix !<br /><img src="http://maraumax.fr/medias/Billets/piwik-preview-api-js.gif" alt="http://maraumax.fr/medias/Billets/piwik-preview-api-js.gif" style="display: block; margin:0 auto;" /><br /><br />Depuis peu il est aussi possible d'accèder à ses statistiques depuis son mobile grâce à une application disponible sous Android et Iphone !<br /><img src="http://maraumax.fr/medias/Billets/piwik-preview-mobile.gif" alt="http://maraumax.fr/medias/Billets/piwik-preview-mobile.gif" style="display: block; margin:0 auto;" /><br /><br />Plus d'informations et téléchargement sur <a href="http://piwik.org">Piwik</a> et la <a href="http://dev.piwik.org">Zone développeurs</a>.</p>]]></description>
	</item>
	<item>
		<title>Télécharger grâce à Google !</title>
		<link>http://www.maraumax.fr/billets-39-telecharger-grace-google.html</link>
		<description><![CDATA[Catégorie : Web<br />
Ajouté le : Thu, 20 May 2010 10:14:15 +0200<br />
Description : <p>Vous n'êtes pas sans savoir que google propose de nombreuses options lors de la recherche permettant par exemple d'inclure ou d'exclure des mots clés, préciser des types de fichiers et bien plus encore.<br /><br />Je vous propose <ins>une ligne</ins> simple vous permettant d'avoir la possibilité de télécharger <ins>gratuitement et illégalement</ins> du contenu sur google.<br /><br /><code>&quot;Votre Recherche&quot; intitle:&quot;Index Of/&quot; -inurl:&quot;.php&quot;</code><br /><br />Notez que le principe fonctionne très bien avec de la musique mais peux aussi être utilisé pour des vidéos.<br /><br />Exemple :<br /><code>&quot;Daft Punk&quot; intitle:&quot;Index Of/&quot; -inurl:&quot;.php&quot;</code><br />Certains résultats sembles intéressants !<br /><br /><img src="http://maraumax.fr/medias/Billets/telechargement-google.png" alt="http://maraumax.fr/medias/Billets/telechargement-google.png" style="display: block; margin:0 auto;" /><br />Bonne recherches !</p>]]></description>
	</item>
	<item>
		<title>Permissions utilisateurs par projets dans un dépôt Subversion</title>
		<link>http://www.maraumax.fr/billets-38-permissions-utilisateurs-par-projets-dans-un-depot-subversion.html</link>
		<description><![CDATA[Catégorie : Software<br />
Ajouté le : Wed, 12 May 2010 20:59:05 +0200<br />
Description : <p><img src="http://maraumax.fr/medias/Billets/tutoriels/logo-subversion-svn.png" alt="http://maraumax.fr/medias/Billets/tutoriels/logo-subversion-svn.png" style="float: right; margin: 0 0 1em 1em;" />J'utilise Subversion alias svn depuis pas mal de temps afin de centraliser les sources d'un projet avec un autre développeur. Le projet étant &quot;fermé&quot; j'avais simplement mis en place une sécurisation par mot de passe.<br /><br />Aujourd'hui j'avais envie d'y installer d'autres sources (sur un autre projet) sans que l'autre développeur ait accès à ces données. Et c'est la que ça se complique, mettre en place des permissions utilisateurs par projets et non pour le dépôt complet.</p><p>Je vais donc vous décrire la marche à suivre pour mettre en place ces permissions en partant du principe que subversion et apache sont déjà installés et configurés sur votre serveur ainsi que les dépôts crées !<br /><br />Pour l'exemple, mon domaine est &quot;domaine.ext&quot;, mes deux projets &quot;projet1&quot; dans &quot;/home/svn/projet1&quot; et &quot;projet2&quot; dans &quot;/home/svn/projet2&quot; ainsi que mes utilisateurs &quot;utilisateur1&quot;, &quot;utilisateur2&quot; et &quot;utilisateur3&quot;.<br /><br />Voici les étapes pour mettre en place les permissions :<br />- Créer les utilisateurs<br />- Créer le fichier des permissions<br />- Configuration des projets<br />- Configuration du VirtualHost sous Apache<br /><br /><span style="font-size: larger;">Création des utilisateurs</span><br /><br />Nous allons créer un fichier &quot;passwd&quot; dans notre dossier svn dans lequel sera enregistré les utilisateurs ainsi que les mots de passes cryptés. Voici la marche à suivre :<br /></p><div class="codebox"><!-- <strong>BASH Code :</strong> --><div class="incqbox"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># On se déplace dans le dossier</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">svn</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Lors de l'ajout du premier utilisateur on utilise l'argument &quot;c&quot; pour &quot;create&quot;</span>
<span style="color: #666666; font-style: italic;"># Le &quot;m&quot; permet lui de crypter le mot de passe</span>
<span style="color: #666666; font-style: italic;"># &quot;passwd&quot; correspond à notre fichier et &quot;utilisateur1&quot;... notre premier utilisateur !</span>
<span style="color: #666666; font-style: italic;"># Le mot de passe vous est ensuite demandé ainsi qu'une vérification</span>
htpasswd <span style="color: #660033;">-mc</span> <span style="color: #c20cb9; font-weight: bold;">passwd</span> utilisateur1
&nbsp;
<span style="color: #666666; font-style: italic;"># Ajout du second utilisateur</span>
htpasswd <span style="color: #660033;">-m</span> <span style="color: #c20cb9; font-weight: bold;">passwd</span> utilisateur2
&nbsp;
<span style="color: #666666; font-style: italic;"># Vous avez compris la démarche :)</span></pre></div></div><p>On pense à modifier les permissions du fichier :<br /></p><div class="codebox"><!-- <strong>BASH Code :</strong> --><div class="incqbox"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Utilisateur / Groupe</span>
<span style="color: #c20cb9; font-weight: bold;">chown</span> subversion:www-data <span style="color: #c20cb9; font-weight: bold;">passwd</span>
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">660</span> <span style="color: #c20cb9; font-weight: bold;">passwd</span></pre></div></div><p>Nos utilisateurs sont désormais prêts ! On passe ensuite aux permissions !<br /><br /><span style="font-size: larger;">Les permissions des utilisateurs</span><br /><br />Le fichier contenant les permissions est commun à tous les dépôts. Voici le détail du fichier et des possibilités.<br /><br /></p><div class="codebox"><!-- <strong>TEXT Code :</strong> --><div class="incqbox"><pre class="text" style="font-family:monospace;"># Fichier des permissions
&nbsp;
# Les groupes permettant de regrouper les utilisateurs par &quot;paquets&quot;.
[groups]
groupe1 = utilisateur1, utilisateur3
# Syntaxe : nom_du_groupe = utilisateur, utilisateur
&nbsp;
# Permissions de tous les dépôts
[/]
* =
# La syntaxe &quot;* =&quot; permet d'interdire l'accès à tout le monde.
# Je vous conseille de faire de même si vous ne souhaitez pas laisser
# votre dépôt en libre accès.
&nbsp;
# Mon premier projet
[projet1:/]
* = # On interdit à tout le monde pour commencer...
utilisateur1 = r # utilisateur1 pourra consulter le dépôt
utilisateur2 = rw # utilisateur2 pourra lire ET écrire
# utilisateur3 ne pourra pas le consulter
&nbsp;
[projet1:/trunk/sources/]
utilisateur3 = r
# utilisateur 3 aura accès en lecture au dossier &quot;/trunk/sources&quot; de mon premier projet
&nbsp;
# Mon second projet
[projet2:/]
* = # On interdit à tout le monde pour commencer...
@groupe1 = r # Syntaxe permettant d'utiliser les groupes.
# Mes utilisateurs 1 et 3 pourrons donc lire ce dépôt !
# N'oubliez pas le &quot;@&quot; lorsque vous faites référence à un groupe !
utilisateur2 = rw # Autorisations en lecture ET écriture pour l'utilisateur2</pre></div></div><p>Enregistrez votre fichier nommé &quot;authz&quot; avec vos permissions à la racine de votre dépôt. (Dans &quot;/home/svn/authz&quot; dans mon exemple)<br /><br />La encore il faut modifier les permissions du fichier :<br /></p><div class="codebox"><!-- <strong>BASH Code :</strong> --><div class="incqbox"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Utilisateur / Groupe</span>
<span style="color: #c20cb9; font-weight: bold;">chown</span> subversion:www-data authz
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">660</span> authz</pre></div></div><p>La partie des autorisations est désormais complète, on va rapidement configuré les dépôts.<br /><br /><span style="font-size: larger;">Configuration des projets</span><br /><br />Les utilisateurs et permissions sont désormais gérés dans nos deux fichiers, on peux donc désactiver cette option au niveau de la configuration des projets.<br /><br />Cette étape est à répéter pour <ins>tous vos projets</ins> ! <img src="img/smilies/smile.png" alt="smile" class="no-style smilies" /><br /><br />Ouvrez le fichier &quot;/home/svn/projet1/conf/svnserve.conf&quot; et vérifiez la valeurs des paramètres<br /></p><div class="codebox"><!-- <strong>BASH Code :</strong> --><div class="incqbox"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># On édite nos fichiers</span>
<span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">svn</span><span style="color: #000000; font-weight: bold;">/</span>projet1<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>svnserve.conf
<span style="color: #666666; font-style: italic;"># En encore &quot;nano&quot; qui est plus facile d'utilisation :)</span>
<span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">svn</span><span style="color: #000000; font-weight: bold;">/</span>projet1<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>svnserve.conf</pre></div></div><p>Voici la valeurs correctes :<br /></p><div class="codebox"><!-- <strong>TEXT Code :</strong> --><div class="incqbox"><pre class="text" style="font-family:monospace;">[general]
anon-access = none # Pas d'accès sans accès :)
auth-access = write 
# password-db = passwd # Ligne à commenter !
# authz-db = authz # Ligne à commenter !
realm = Projet1 Repository # Titre du dépot
[sasl]
# use-sasl = true # Options à dé-commenter si vous utilisez &quot;ssl&quot;</pre></div></div><p>Cette partie est terminée, il ne nous reste plus qu'a configurer apache pour prendre en compte les utilisateurs et les permissions !<br /><br /><span style="font-size: larger;">Configuration du VirtualHost</span><br /><br />Vous n'avez pas eu le choix que de mettre en place un virtualhost pour votre svn.<br /><br />J'ai placé la directive dans le fichier /etc/apache2/sites-enabled/default, libre à vous de le mettre dans le fichier de votre choix.<br /><br />Voici la description de ma directive :<br /></p><div class="codebox"><!-- <strong>TEXT Code :</strong> --><div class="incqbox"><pre class="text" style="font-family:monospace;"># Accès par ip/svn
&lt;Location /svn&gt;
DAV svn # Il s'agit d'un dépôt svn
SVNParentPath /home/svn # Adresse parent des dépots
AuthType Basic # Authentification de base
AuthName &quot;Mon dépôt persos&quot; # Titre des dépots (obligatoire) 
AuthUserFile /home/svn/passwd # Fichier des utilisateurs
AuthzSVNAccessFile /home/svn/authz # Fichier des permissions
Require valid-user # On souhaite que les utilisateurs soit authentifier
SVNListParentPath On # On utilise plusieurs dépôts
&lt;/Location&gt;</pre></div></div><p>Pour terminer le tout on redémarre apache !<br /></p><div class="codebox"><!-- <strong>BASH Code :</strong> --><div class="incqbox"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Redémarrage de apache</span>
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 restart
<span style="color: #666666; font-style: italic;"># Et tout devrait désormais rouler !</span></pre></div></div><p>En espérant avoir détaillé le plus possible les étapes de la mise en place ! N'hésitez pas à poser des questions à la suite !</p>]]></description>
	</item>
	<item>
		<title>Affichage de &quot;Mes Documents&quot; à chaques démarrage de Windows</title>
		<link>http://www.maraumax.fr/billets-37-affichage-de-mes-documents-chaques-demarrage-de-windows.html</link>
		<description><![CDATA[Catégorie : Software<br />
Ajouté le : Sun, 17 Jan 2010 18:12:48 +0100<br />
Description : <p>Il se peux suite à l'installation d'un nouveau logiciel ou à une restauration de Windows que lors du démarrage de ce dernier s'affiche une fenêtre de vos documents.<br /><br />Malgré le fait que ça ne pause aucun soucis et qu'il suffit de la fermer autant faire en sorte qu'elle ne s'affiche plus sachant que ça ne vous prendra que cinq minutes !</p><p>Pour corriger ce soucis il faut modifier une clé au niveau de la base de registre. Faites attention aux manipulations que vous effectuez et au cas ou vous pouvez exporter la base avant d'effectuer tout changement. (Fichier &gt; Exporter)<br /><br />Voici la manipulation à effectuer :<br /><br />- Cliquez sur <strong>démarrer</strong> puis <strong>exécuter</strong><br />- Dans la fenêtre ouverte entrez &quot;<strong>regedit</strong>&quot; puis validez.<br />- Suivez l'arborescence suivante :<br />&nbsp; - <strong>HKEY_LOCAL_MACHINE</strong><br />&nbsp; &nbsp;- <strong>SOFTWARE</strong><br />&nbsp; &nbsp; - <strong>Microsoft</strong><br />&nbsp; &nbsp; &nbsp;- <strong>Windows NT</strong><br />&nbsp; &nbsp; &nbsp; - <strong>CurrentVersion</strong><br />&nbsp; &nbsp; &nbsp; &nbsp;- <strong>Winlogon</strong><br />- Faites ensuite un clic droit sur la clé &quot;<strong>Userinit</strong>&quot; puis <strong>Modifier</strong>.<br />- Une nouvelle fenêtre s'ouvre avec deux champs. Remplacez le contenu du second champ (le premier n'est normalement pas modifiable) par ceci : &quot;<strong>C:\WINDOWS\system32\userinit.exe,</strong>&quot;<br /><br /><img src="http://www.maraumax.fr/medias/Billets/documents-demarrage.png" alt="http://www.maraumax.fr/medias/Billets/documents-demarrage.png" style="display: block; margin:0 auto;" /><br />- Cliquez ensuite sur Ok et redémarrez votre ordinateur.<br /><br />Si les modifications ont bien été apportés, le dossier de vos document ne devrait pas se ré-ouvrir lors de votre redémarrage.</p>]]></description>
	</item>
	<item>
		<title>Masque de transparence en PHP</title>
		<link>http://www.maraumax.fr/billets-36-masque-de-transparence-en-php.html</link>
		<description><![CDATA[Catégorie : Développement<br />
Ajouté le : Sat, 16 Jan 2010 18:46:53 +0100<br />
Description : <p>Voici une fonction vous permettant d'appliquer un masque de transparences sur vos images en php.<br />Cette manipulation peux vous permettre ensuite d'afficher vos images sur votre site.<br /><br />Notez que le système est lourd car il &quot;scan&quot; tous les pixels du calque et de l'images.<br />Vous pouvez tester le système avec vos images à <a href="http://devs.maraumax.fr/php-mask/index.html">cette adresse</a>.</p><p>Concernant la création des masques il vous faudra un logiciel capable d'utiliser la transparence. (Dehors paint !)<br />La fonction conserve les zones transparences et rend transparent les zones opaques blanches.<br /><br />Voici les masques utilisés sur mon espace de développement :<br /><br /><a href="http://devs.maraumax.fr/php-mask/images/masques/masque-1.png"><img src="http://devs.maraumax.fr/php-mask/images/masques/masque-1-min.jpg" alt="http://devs.maraumax.fr/php-mask/images/masques/masque-1-min.jpg" style="float: left; margin: 0 1em 1em 0;" /></a><a href="http://devs.maraumax.fr/php-mask/images/masques/masque-2.png"><img src="http://devs.maraumax.fr/php-mask/images/masques/masque-2-min.jpg" alt="http://devs.maraumax.fr/php-mask/images/masques/masque-2-min.jpg" style="float: left; margin: 0 1em 1em 0;" /></a><a href="http://devs.maraumax.fr/php-mask/images/masques/masque-3.png"><img src="http://devs.maraumax.fr/php-mask/images/masques/masque-3-min.jpg" alt="http://devs.maraumax.fr/php-mask/images/masques/masque-3-min.jpg" style="float: left; margin: 0 1em 1em 0;" /></a><a href="http://devs.maraumax.fr/php-mask/images/masques/masque-4.png"><img src="http://devs.maraumax.fr/php-mask/images/masques/masque-4-min.jpg" alt="http://devs.maraumax.fr/php-mask/images/masques/masque-4-min.jpg" style="float: left; margin: 0 1em 1em 0;" /></a><a href="http://devs.maraumax.fr/php-mask/images/masques/masque-5.png"><img src="http://devs.maraumax.fr/php-mask/images/masques/masque-5-min.jpg" alt="http://devs.maraumax.fr/php-mask/images/masques/masque-5-min.jpg" style="float: left; margin: 0 1em 1em 0;" /></a><br /><br /><br /><br />Et voici la fonction en question :<br /></p><div class="codebox"><!-- <strong>PHP Code :</strong> --><div class="incqbox"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #666666; font-style: italic;">/*
	Applique un masque de transparence à une image
	$image -&gt; image source (Format PNG)
	$masque -&gt; masque à appliquer (Format PNG)
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> mask_transparency<span style="color: #009900;">&#40;</span><span style="color: #000088;">$image</span><span style="color: #339933;">,</span> <span style="color: #000088;">$masque</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #666666; font-style: italic;">// Récupération des dimenssions de l'image</span>
	<a href="http://www.php.net/list"><span style="color: #990000;">list</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$image_w</span><span style="color: #339933;">,</span> <span style="color: #000088;">$image_h</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/getimagesize"><span style="color: #990000;">getimagesize</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$image</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// Création de image</span>
	<span style="color: #000088;">$iimage</span> <span style="color: #339933;">=</span> imagecreatefrompng<span style="color: #009900;">&#40;</span><span style="color: #000088;">$image</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// Désactivation mode blending et sauvegarde infos canal alpha</span>
	imagealphablending<span style="color: #009900;">&#40;</span><span style="color: #000088;">$iimage</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	imagesavealpha<span style="color: #009900;">&#40;</span><span style="color: #000088;">$iimage</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// Création du masque</span>
	<span style="color: #000088;">$imasque</span> <span style="color: #339933;">=</span> imagecreatefrompng<span style="color: #009900;">&#40;</span><span style="color: #000088;">$masque</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$x</span><span style="color: #339933;">&lt;</span><span style="color: #000088;">$image_w</span><span style="color: #339933;">;</span> <span style="color: #339933;">++</span><span style="color: #000088;">$x</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$y</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$y</span><span style="color: #339933;">&lt;</span><span style="color: #000088;">$image_h</span><span style="color: #339933;">;</span> <span style="color: #339933;">++</span><span style="color: #000088;">$y</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #666666; font-style: italic;">// Récupérations infos pixel du masque</span>
			<span style="color: #000088;">$pxl_masque</span> <span style="color: #339933;">=</span> imagecolorsforindex<span style="color: #009900;">&#40;</span><span style="color: #000088;">$imasque</span><span style="color: #339933;">,</span> imagecolorat<span style="color: #009900;">&#40;</span><span style="color: #000088;">$imasque</span><span style="color: #339933;">,</span> <span style="color: #000088;">$x</span><span style="color: #339933;">,</span> <span style="color: #000088;">$y</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #666666; font-style: italic;">// Récupérations infos pixel de l'image</span>
			<span style="color: #000088;">$pxl_image</span> <span style="color: #339933;">=</span> imagecolorsforindex<span style="color: #009900;">&#40;</span><span style="color: #000088;">$iimage</span><span style="color: #339933;">,</span> imagecolorat<span style="color: #009900;">&#40;</span><span style="color: #000088;">$iimage</span><span style="color: #339933;">,</span> <span style="color: #000088;">$x</span><span style="color: #339933;">,</span> <span style="color: #000088;">$y</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #666666; font-style: italic;">// Nouvelles informations</span>
			<span style="color: #000088;">$color</span> <span style="color: #339933;">=</span> imagecolorallocatealpha<span style="color: #009900;">&#40;</span><span style="color: #000088;">$iimage</span><span style="color: #339933;">,</span> <span style="color: #000088;">$pxl_image</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'red'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$pxl_image</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'green'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$pxl_image</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'blue'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">127</span><span style="color: #339933;">-</span><span style="color: #000088;">$pxl_masque</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'alpha'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #666666; font-style: italic;">// On applique la modification</span>
			imagesetpixel<span style="color: #009900;">&#40;</span><span style="color: #000088;">$iimage</span><span style="color: #339933;">,</span> <span style="color: #000088;">$x</span><span style="color: #339933;">,</span> <span style="color: #000088;">$y</span><span style="color: #339933;">,</span> <span style="color: #000088;">$color</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// On sauvegarde l'image</span>
	imagepng<span style="color: #009900;">&#40;</span><span style="color: #000088;">$iimage</span><span style="color: #339933;">,</span> <span style="color: #000088;">$image</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div><p>Exemple d'utilisation :<br /></p><div class="codebox"><!-- <strong>PHP Code :</strong> --><div class="incqbox"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Application du masque de &quot;masques/mon_masque.png&quot; sur l'image &quot;images/mon_images.png&quot;</span>
mask_transparency<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'images/mon_image.png'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'masques/mon_masque.png'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>]]></description>
	</item>
	<item>
		<title>Petite faille sur le site comment ça marche</title>
		<link>http://www.maraumax.fr/billets-35-petite-faille-sur-le-site-comment-ca-marche.html</link>
		<description><![CDATA[Catégorie : Web<br />
Ajouté le : Wed, 25 Nov 2009 00:28:04 +0100<br />
Description : <p>J'effectuais tranquillement une recherche sur un comportement javascript avec les champs textarea lorsque je me suis retrouvé sur une page du site généralement intéressant commentcamarche.net<br /><br />Je me suis rapidement aperçu que la page sur laquelle je naviguait présentait un soucis : un champ textarea (sujet de ma recherche) présent dans le titre et contenant de nombreux caractères. (Tout le code suivant à vrai dire car la balise textarea n'était pas fermée)<br /><br />Pour vérifier tout ça rien de bien compliqué : ajouter directement un code javascript dans le titre du sujet à crée.<br /><br />Et voici le résultat...<br /><br /><img src="http://www.maraumax.fr/medias/Billets/faille_commentcamarche.png" alt="http://www.maraumax.fr/medias/Billets/faille_commentcamarche.png" style="display: block; margin:0 auto;" /><br />Ironie du sort j'ai posté dans le forum programmation... bref. Je contacte de suite les administrateurs du site afin d'éviter tout autre tentatives avec des scripts présents sur des serveurs distants ce qui serait bien plus conséquent.<br /><br />Pour information il s'agit d'une des failles les plus communes, communément appelées <a href="http://fr.wikipedia.org/wiki/Cross-site_scripting">failles XSS</a>.</p>]]></description>
	</item>
	<item>
		<title>Récupérer les URLs et les Emails d'une page en PHP</title>
		<link>http://www.maraumax.fr/billets-34-recuperer-les-urls-et-les-emails-d-une-page-en-php.html</link>
		<description><![CDATA[Catégorie : Développement<br />
Ajouté le : Wed, 11 Nov 2009 01:28:37 +0100<br />
Description : <p>Voici quelques lignes de codes, notamment composé d'expressions régulières vous permettant de récupérer toutes les adresses emails contenus dans une page ainsi que les liens qui la compose.</p><p>Dans un premier temps, prenons l'exemple ou l'on souhaite récupérer le contenu d'une page pour ensuite la traiter.<br /></p><div class="codebox"><!-- <strong>PHP Code :</strong> --><div class="incqbox"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;"># Adresse du site à &quot;exploiter&quot;</span>
<span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'http://www.monsite.com'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># On récupère le contenu</span>
<span style="color: #000088;">$file</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/file_get_contents"><span style="color: #990000;">file_get_contents</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>Désormais le contenu de la page est contenu dans notre variable &quot;$file&quot;.<br /><br /><span style="font-size: larger;">Adresses Emails</span><br />Grâce à une expression régulière nous avons la possibilité de récupérer dans un tableau toutes les adresses emails contenus dans notre variable.<br /></p><div class="codebox"><!-- <strong>PHP Code :</strong> --><div class="incqbox"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;"># Récupération des emails</span>
<a href="http://www.php.net/preg_match_all"><span style="color: #990000;">preg_match_all</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'`[a-zA-Z0-9_\.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+`m'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$file</span><span style="color: #339933;">,</span> <span style="color: #000088;">$emails</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;"># Affichage du tableau</span>
<a href="http://www.php.net/print_r"><span style="color: #990000;">print_r</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$emails</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>Il se peut que la même adresse ressorte plusieurs fois dans votre tableau. Dans ce cas vous pouvez utiliser la fonction <a href="http://fr2.php.net/array_unique">array_unique()</a>.<br /><br /><span style="font-size: larger;">URLs</span><br />La méthode reste identique, à savoir lister toutes les balises &quot;&lt;a&quot; et en récupérer le contenu de l'option &quot;href&quot;.<br /></p><div class="codebox"><!-- <strong>PHP Code :</strong> --><div class="incqbox"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;"># Récupération des URLs</span>
<a href="http://www.php.net/preg_match_all"><span style="color: #990000;">preg_match_all</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/&lt;a[^&gt;]+href=&quot;([^&quot;]+)/i'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$file</span><span style="color: #339933;">,</span> <span style="color: #000088;">$urls</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;"># Affichage</span>
<a href="http://www.php.net/print_r"><span style="color: #990000;">print_r</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$urls</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>Il est aussi possible de récupérer des doublons en fonction des sites mais aussi des liens tronqués ou des morceau de code javascript. Pour cela vous pouvez par exemple tester si le site existe ou vérifier le format de l'adresse url toujours avec une expression régulière.</p>]]></description>
	</item>
	<item>
		<title>Gestion des bordures intérieurs et extérieurs en CSS</title>
		<link>http://www.maraumax.fr/billets-33-gestion-des-bordures-interieurs-et-exterieurs-en-css.html</link>
		<description><![CDATA[Catégorie : Développement<br />
Ajouté le : Wed, 28 Oct 2009 20:59:51 +0100<br />
Description : <p>L'affichage intérieur ou extérieur des bordures en CSS dépend de la définition de type de document (doctype) utilisé pour vos pages.<br />Par exemple si vous utilisez le doctype suivant alors les bordures seront <ins>intégrés</ins> dans la largeur de votre bloc.<br /></p><div class="codebox"><!-- <strong>HTML4STRICT Code :</strong> --><div class="incqbox"><pre class="html4strict" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&gt;</span>
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/html.html"><span style="color: #000000; font-weight: bold;">html</span></a> <span style="color: #000066;">dir</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;ltr&quot;</span> <span style="color: #000066;">lang</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;fr&quot;</span>&gt;</span>
[...]</pre></div></div><p>En revanche si vous utilisez le doctype &quot;strict&quot; les bordure seront extérieurs à votre bloc.<br /></p><div class="codebox"><!-- <strong>HTML4STRICT Code :</strong> --><div class="incqbox"><pre class="html4strict" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;</span>
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/html.html"><span style="color: #000000; font-weight: bold;">html</span></a>&gt;</span>
[...]</pre></div></div><p>Voici un résumé sur les différences entre ces deux cas. Pour information la bordure est de 5 pixels (grise) afin de bien marquer la différence. Le cadre rouge permet de délimiter la limite du bloc.<br /><br /><img src="http://www.maraumax.fr/medias/Billets/css-bordures-interieurs-exterieurs.png" alt="http://www.maraumax.fr/medias/Billets/css-bordures-interieurs-exterieurs.png" style="display: block; margin:0 auto;" /><br />La position des bordures peux parfois vous gêner si vous souhaitez aligner les blocs sur votre site.</p><p>La solution consiste à ajouter une marge si la largeur de votre bloc est fixe ou réduire la taille de votre bloc si elle est fixe.<br /></p><div class="codebox"><!-- <strong>CSS Code :</strong> --><div class="incqbox"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* Dans le cas d'une largeur fixe */</span>
div<span style="color: #6666ff;">.bloc</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Bordures de 5px (Donc 10px pour le bloc) */</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">90px</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Largeur finale : 100px */</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* Dans le cas d'une largeur extensible */</span>
div<span style="color: #6666ff;">.bloc</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;"><span style="color: #cc66cc;">100</span>%</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Impossible de réduire la taille de 10px */</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Marges de 5px de la taille de la bordure de chaque cotés du bloc */</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div><p>Bon codage à vous !</p>]]></description>
	</item>
	<item>
		<title>Drivers Odbc 32 bits sur windows 2003/2008 64bits</title>
		<link>http://www.maraumax.fr/billets-32-drivers-odbc-32-bits-sur-windows-2003-2008-64bits.html</link>
		<description><![CDATA[Catégorie : Software<br />
Ajouté le : Tue, 20 Oct 2009 13:31:40 +0200<br />
Description : <p>Suite à plusieurs jours de recherche intense afin de mettre un place une base de donnée Access (.mdb) sur un serveur windows 2008 64bits je partage la solution en espérant qu'elle puisse servire à d'autres !<br />La manipulation consiste à modifier une option (et ajouter vos base sous le gestionnaire Obdc si vous l'utilisez) mais résoud les soucis de connexions possible.</p><p>Lorsque que votre architecture est en 64bits alors IIS, permettant la gestion de vos sites web et lui aussi (logiquement) basé en 64bits tout comme le gestionnaire Odbc.<br /><br />Cependant Microsoft à prévu l'utilisation 32bits pour ces logiciels. Pour le gestionnaire Odbc vous pouvez y accèder via le répertoire suivant :<br /></p><blockquote><div class="incqbox"><p>c:\windows\syswow64\odbcad32.exe</p></div></blockquote><p>et ainsi retrouver votre liste de pilotes 32bits.<br /><br />Il ne reste plus qu'a indiquer à IIS de lancer le site sur lequel vous souhaitez utiliser une base accès de l'exécuter en 32bits. Pour cela suivez les informations de l'image ci-dessous : (cliquez pour agrandir)<br /><a href="http://maraumax.fr/medias/Billets/windows-2008-iis-64bits-max.gif"><img src="http://maraumax.fr/medias/Billets/windows-2008-iis-64bits.gif" alt="http://maraumax.fr/medias/Billets/windows-2008-iis-64bits.gif" style="display: block; margin:0 auto;" /></a></p>]]></description>
	</item>
	<item>
		<title>Vérifier la validité d'une date en PHP</title>
		<link>http://www.maraumax.fr/billets-31-verifier-la-validite-d-une-date-en-php.html</link>
		<description><![CDATA[Catégorie : Développement<br />
Ajouté le : Sun, 04 Oct 2009 20:15:18 +0200<br />
Description : <p>La date est une notion beaucoup utilisé dans les formulaires sur les site web : date de naissance, mariage, évènement...<br />Ainsi les valeurs (souvent des champs texte libre) renseignés peuvent très bien être erronées volontairement ou non pas l'utilisateur. Je vous propose donc une fonction permettant de vérifier si une date à un format valide et existe réellement.</p><div class="codebox"><!-- <strong>PHP Code :</strong> --><div class="incqbox"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;"># Vérifie la validité d'une date</span>
<span style="color: #000000; font-weight: bold;">function</span> is_valide_date<span style="color: #009900;">&#40;</span><span style="color: #000088;">$date</span><span style="color: #339933;">,</span> <span style="color: #000088;">$sep</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'/'</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><a href="http://www.php.net/list"><span style="color: #990000;">list</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$day</span><span style="color: #339933;">,</span> <span style="color: #000088;">$month</span><span style="color: #339933;">,</span> <span style="color: #000088;">$year</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/explode"><span style="color: #990000;">explode</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sep</span><span style="color: #339933;">,</span> <span style="color: #000088;">$date</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$day</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">31</span> OR <span style="color: #000088;">$day</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">1</span> OR <span style="color: #000088;">$month</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">12</span> OR <span style="color: #000088;">$month</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">1</span> OR <span style="color: #000088;">$year</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">32767</span> OR <span style="color: #000088;">$year</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">return</span> <a href="http://www.php.net/checkdate"><span style="color: #990000;">checkdate</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$month</span><span style="color: #339933;">,</span> <span style="color: #000088;">$day</span><span style="color: #339933;">,</span> <span style="color: #000088;">$year</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div><p>Quelques exemples d'utilisation :<br /></p><div class="codebox"><!-- <strong>PHP Code :</strong> --><div class="incqbox"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">// Dates</span>
<span style="color: #000088;">$date_valide</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'04/10/2009'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$date_invalide</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'30-02-2009'</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;"># N'existe pas</span>
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>is_valide_date<span style="color: #009900;">&#40;</span><span style="color: #000088;">$date_valide</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #666666; font-style: italic;">// Affiche &quot;Ok&quot;</span>
	<a href="http://www.php.net/echo"><span style="color: #990000;">echo</span></a> <span style="color: #0000ff;">'Ok'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>is_valide_date<span style="color: #009900;">&#40;</span><span style="color: #000088;">$date_invalide</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'-'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #666666; font-style: italic;">// N'affiche rien</span>
	<a href="http://www.php.net/echo"><span style="color: #990000;">echo</span></a> <span style="color: #0000ff;">'Ok'</span><span style="color: #339933;">;</span></pre></div></div><p>Bonne utilisation <img src="img/smilies/wink.png" alt="wink" class="no-style smilies" /></p>]]></description>
	</item>
	<item>
		<title>Liste de mes extensions firefox</title>
		<link>http://www.maraumax.fr/billets-30-liste-de-mes-extensions-firefox.html</link>
		<description><![CDATA[Catégorie : Software<br />
Ajouté le : Mon, 31 Aug 2009 00:12:10 +0200<br />
Description : <p><img src="http://www.maraumax.fr/medias/Billets/firefox.png" alt="http://www.maraumax.fr/medias/Billets/firefox.png" style="float: right; margin: 0 0 1em 1em;" /><br />J'utilise Firefox depuis maintenant plusieurs années, car c'est un navigateur très polyvalent et dont il existe de très nombreux modules complémentaires !<br />Seulement on se perd un peu et on n'a pas toujours le temps de tous les lister ! Par exemple sur <a href="http://extensions.geckozone.org/Firefox">Geckozone</a> ce n'est pas moins de 500 extensions qui y sont répertoriés !<br /><br />Je vais donc vous présenter la liste très réduites des extensions que j'utilise principalement pour le développement de site web, mais aussi pour le plaisir et/ou qui me sont vraiment très utiles.</p><p>Pour information je traine toujours sur Firefox 2 (2.0.0.20) simplement parce que j'ai pas le <del>courage</del> temps d'effectuer la migration... donc il se peux que certains versions de ces modules ne soient pas comptables sur la version 3 de firefox.<br /><br /><img src="http://www.maraumax.fr/medias/Billets/extensions-firefox/colorzilla.png" alt="http://www.maraumax.fr/medias/Billets/extensions-firefox/colorzilla.png" style="float: left; margin: 0 1em 1em 0;" /> Très utile principalement au niveau de la création de style css ou créations graphiques. Cette extension nommée <strong>Color Zilla</strong> ajoute un sélecteur de couleur (&quot;Color picker&quot;) dans votre interface afin de sélectionner en un clic la couleur présente sur une page internet. Plusieurs outils/options sont disponibles comme le zoom (jusqu'à 1000%), la palette de couleur ou encore la fonction &quot;Copier&quot; (pour mettre en mémoire) après avoir sélectionné votre couleur.<br /><br /><img src="http://www.maraumax.fr/medias/Billets/extensions-firefox/myspell.png" alt="http://www.maraumax.fr/medias/Billets/extensions-firefox/myspell.png" style="float: right; margin: 0 0 1em 1em;" />Bien pratique <strong>MySpell</strong> nous permet quand on n'a pas toujours l'envie de se relire de corriger les quelques erreurs d'<ins>orthographe (uniquement)</ins> que l'on a oublié. Vous avez aussi la possibilité d'ajouter de nouveaux mots dans le dictionnaire de l'extension. Un clic droit sur le mot souligné vous permet de sélectionner là ou les corrections correctes.<br /><br /><img src="http://www.maraumax.fr/medias/Billets/extensions-firefox/favicon-picker-2.png" alt="http://www.maraumax.fr/medias/Billets/extensions-firefox/favicon-picker-2.png" style="float: left; margin: 0 1em 1em 0;" /> J'ai ajouté <strong>Favicon Picker 2</strong> à la suite de mélange entre les favicon de ma barre personnelle. L'extension vous permet de supprimer les icônes des sites et/ou d'en sélectionner un nouveau depuis votre ordinateur. Simple et indispensable pour gérer vos liens favoris !<br /><br /><img src="http://www.maraumax.fr/medias/Billets/extensions-firefox/firebug.png" alt="http://www.maraumax.fr/medias/Billets/extensions-firefox/firebug.png" style="float: right; margin: 0 0 1em 1em;" /> <strong>Firebug</strong> est surement l'une des extensions les plus utilisés sur firefox. En effet il s'agit d'un module très puissant permettant d'inspecter le code html, css, javascript ainsi que de nombreux autres éléments de votre page ! Amis webmaster si vous ne l'utilisez ou ne la connaissez pas c'est &quot;the extension&quot; que vous devez tester !<br /><br /><img src="http://www.maraumax.fr/medias/Billets/extensions-firefox/gmail-manager.png" alt="http://www.maraumax.fr/medias/Billets/extensions-firefox/gmail-manager.png" style="float: left; margin: 0 1em 1em 0;" /> Indispensable si vous avez un ou plusieurs comptes gmail ! Ce module complémentaire intitulé <strong>Gmail Manager</strong> vous permet d'enregistrer vos comptes afin de vous afficher une notification lorsque vous recevez un email. Super pratique pour éviter de consulter afin de vérifier ou non si vous avez des messages !<br /><br /><img src="http://www.maraumax.fr/medias/Billets/extensions-firefox/google-pr-status.png" alt="http://www.maraumax.fr/medias/Billets/extensions-firefox/google-pr-status.png" style="float: right; margin: 0 0 1em 1em;" /> Un module complémentaire très simple, <strong>Google PageRank Status</strong> permettant d'afficher le pagerank de chaque pages. Un simple clic droit sur l'icône permet aussi de désactiver ce service. Aucune autres options disponibles pour ce module.<br /><br /><img src="http://www.maraumax.fr/medias/Billets/extensions-firefox/html-validator.png" alt="http://www.maraumax.fr/medias/Billets/extensions-firefox/html-validator.png" style="float: left; margin: 0 1em 1em 0;" /> Toujours pour les webmasters (ou curieux <img src="img/smilies/smile.png" alt="smile" class="no-style smilies" /> ) <strong>Html Validator</strong> permet d'un coup d'œil de vérifier si le site sur lequel vous naviguez est &quot;Xhtml valide&quot;. Plusieurs algorithmes sont disponibles et lors de la visualisation de la source de la page vous avez des astuces (en français) permettant de corriger ces erreurs !<br /><br /><img src="http://www.maraumax.fr/medias/Billets/extensions-firefox/measure-it.png" alt="http://www.maraumax.fr/medias/Billets/extensions-firefox/measure-it.png" style="float: right; margin: 0 0 1em 1em;" /> Encore un outil indispensable pour les webmasters ! Measure-it vous permet grâce à un icône discret dans la barre inférieur de votre navigateur préféré d'effectuer des mesures via une règle des différents éléments de la page. Très simple et indispensable !<br /><br />En vrac : <strong>Greasemonkey</strong> est un module permettant d'utiliser des scripts javascripts modifiant le code source de votre page. J'utilise par exemple un code permettant d'ouvrir tous les liens d'images direct dans une &quot;lightbox&quot;. <strong>Save Complete</strong> permet de sauvegarder une page ainsi que toutes les informations nécessaires pour utiliser cette page hors-navigation à savoir les feuilles de styles, images... <strong>Tab Preview</strong> permet d'avoir un aperçu des onglets en les survolants. Très pratiques si vous souhaitez avoir un aperçu de l'onglet que vous souhaitez visiter avant de cliquer.<br /><br />En espérant vous avoir été utile et vous avoir permis de trouver LA petite extension qui permettra d'améliorer votre navigation sur ce navigateur très intéressant et n'hésitez pas à me proposer les vôtres <img src="img/smilies/wink.png" alt="wink" class="no-style smilies" /></p>]]></description>
	</item>
	<item>
		<title>Nettoyer et afficher un numéro de téléphone en PHP</title>
		<link>http://www.maraumax.fr/billets-29-nettoyer-et-afficher-un-numero-de-telephone-en-php.html</link>
		<description><![CDATA[Catégorie : Développement<br />
Ajouté le : Sat, 22 Aug 2009 21:02:05 +0200<br />
Description : <p>Voici une fonction assez simplement permettant dans un premier temps de vérifier un numéro de téléphone (après avoir retiré tous les caractères non alphanumériques) puis de formater un affichage.<br />Vous pouvez l'utiliser avant d'entrer le numéro dans la base de données (après le traitement par formulaire) ou par exemple afficher le numéro sur votre site sous la forme &quot;00-00-00-00-00&quot;. (Séparateur modifiable)</p><p>En paramètres de la fonction le numéro de téléphone et optionnel le séparateur qui sera affiché tous les deux caractères numériques.<br /></p><div class="codebox"><!-- <strong>PHP Code :</strong> --><div class="incqbox"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;"># Nettoyage/affichage d'un numéro de téléphone</span>
<span style="color: #000000; font-weight: bold;">function</span> clean_display_phone<span style="color: #009900;">&#40;</span><span style="color: #000088;">$nbr</span><span style="color: #339933;">,</span> <span style="color: #000088;">$sep</span><span style="color: #339933;">=</span><span style="color: #000000; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$nbr</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/ereg_replace"><span style="color: #990000;">ereg_replace</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'[^0-9]'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$nbr</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/strlen"><span style="color: #990000;">strlen</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$nbr</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">else</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sep</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">&lt;</span><span style="color: #cc66cc;">5</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
				<span style="color: #000088;">$nbr_array</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/substr"><span style="color: #990000;">substr</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$nbr</span><span style="color: #339933;">,</span> <span style="color: #000088;">$i</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$nbr</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/implode"><span style="color: #990000;">implode</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sep</span><span style="color: #339933;">,</span> <span style="color: #000088;">$nbr_array</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #b1b100;">return</span> <span style="color: #000088;">$nbr</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
			<span style="color: #b1b100;">else</span>
				<span style="color: #b1b100;">return</span> <span style="color: #000088;">$nbr</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div><p>Voici quelques exemples d'utilisation.<br /></p><div class="codebox"><!-- <strong>PHP Code :</strong> --><div class="incqbox"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">// Numéros de téléphone suite à un formulaire par exemple</span>
<span style="color: #000088;">$num_tel_bon</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'10.45.86.12.34'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$num_tel_mauvais</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'084230246875123'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Test Validité</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>clean_display_phone<span style="color: #009900;">&#40;</span><span style="color: #000088;">$num_tel_bon</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #666666; font-style: italic;">// Affiche &quot;Ok&quot;</span>
	<a href="http://www.php.net/echo"><span style="color: #990000;">echo</span></a> <span style="color: #0000ff;">'Ok'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>clean_display_phone<span style="color: #009900;">&#40;</span><span style="color: #000088;">$num_tel_mauvais</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #666666; font-style: italic;">// Pas de retour</span>
	<a href="http://www.php.net/echo"><span style="color: #990000;">echo</span></a> <span style="color: #0000ff;">'Ok'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Affichage</span>
<a href="http://www.php.net/echo"><span style="color: #990000;">echo</span></a> clean_display_phone<span style="color: #009900;">&#40;</span><span style="color: #000088;">$num_tel_bon</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Affiche &quot;1045861234&quot;</span>
<a href="http://www.php.net/echo"><span style="color: #990000;">echo</span></a> clean_display_phone<span style="color: #009900;">&#40;</span><span style="color: #000088;">$num_tel_bon</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'-'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Affiche &quot;10-45-86-12-34&quot;</span></pre></div></div><p>N'hésitez pas à me faire un retour ou encore me proposer des améliorations. <img src="img/smilies/wink.png" alt="wink" class="no-style smilies" /></p>]]></description>
	</item>
	<item>
		<title>Retrouver une police depuis une image</title>
		<link>http://www.maraumax.fr/billets-28-retrouver-une-police-depuis-une-image.html</link>
		<description><![CDATA[Catégorie : Web<br />
Ajouté le : Wed, 19 Aug 2009 21:41:52 +0200<br />
Description : <p>On a tous un jour ou l'autre cherché à retrouver une police présente sur une image d'un jeu, site, ... pour en faire un usage personnel ! Seulement pas toujours facile... il existe des milliers de fonts sur la toile !<br />Je vais donc pour présenter un site permettant à partir d'une image (assez net et grande si possible) de retrouver la police d'écriture !</p><p>WhatTheFont (assez logique me diriez-vous) permet donc d'analyser avec votre aide les caractères présents sur une image afin de détecter la police d'écriture utilisée.<br /><br /><span style="font-size: larger;">Fonctionnement</span><br /><br />Une fois l'adresse de l'image récupérée ou téléchargé sur votre ordinateur rendez-vous à l'adresse suivante : <a href="http://new.myfonts.com/WhatTheFont/">http://new.myfonts.com/WhatTheFont/</a><br /><br />Renseignez ensuite l'adresse de votre image ou le chemin de votre image sur votre ordinateur puis validez le formulaire. (Continue)<br /><img src="http://www.maraumax.fr/medias/Billets/whatthefont-selectimg.jpg" alt="http://www.maraumax.fr/medias/Billets/whatthefont-selectimg.jpg" style="display: block; margin:0 auto;" /><br />L'étape suivante vous permet de définir les caractères présents sur l'image pour vérifier la détection.<br /><img src="http://www.maraumax.fr/medias/Billets/whatthefont-enterchars.jpg" alt="http://www.maraumax.fr/medias/Billets/whatthefont-enterchars.jpg" style="display: block; margin:0 auto;" /><br />Il vous est ensuite proposé une liste de police correspondant à celle que vous recherchez. Les bonnes polices sont rarement trouvés, mais des fonts similaires sont présentes dans cette liste.<br /><br />Si aucune police ne correspond à votre image il reste toujours la possibilité de consulter le <a href="http://new.myfonts.com/WhatTheFont/forum/">forum</a> qui est réactif.<br /><br /><span style="font-size: larger;">Recommandations</span><br /><br />Voici quelques spécifications afin de mettre toutes les chances de votre côté afin de retrouver votre police :<br />- Texte horizontal<br />- Caractères de 100 pixels<br />- Pas de superposition de caractères (dépend beaucoup des polices)</p>]]></description>
	</item>
	<item>
		<title>Lister les fichiers d'un dossier entre deux dates (PHP)</title>
		<link>http://www.maraumax.fr/billets-27-lister-les-fichiers-d-un-dossier-entre-deux-dates-php.html</link>
		<description><![CDATA[Catégorie : Développement<br />
Ajouté le : Wed, 22 Jul 2009 19:40:24 +0200<br />
Description : <p>Voici une fonction assez simple mais qui peut se rendre bien utile afin de lister tous les fichiers contenus dans un dossier entre deux dates (ou pas).<br />De nombreuses améliorations sont possibles comme permettre de lire toute l'arborescence d'un répertoire ou encore ne prendre en compte que certaines extensions.</p><p>La fonction retourne un tableau contenant le nom du fichier, son répertoire et la date de modification du fichier en question.<br /></p><div class="codebox"><!-- <strong>PHP Code :</strong> --><div class="incqbox"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> trier_fichiers_selection<span style="color: #009900;">&#40;</span><span style="color: #000088;">$repertoire</span><span style="color: #339933;">,</span> <span style="color: #000088;">$date_debut</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #000088;">$date_fin</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$listing</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$date_fin</span> <span style="color: #339933;">&lt;</span> <span style="color: #000088;">$date_debut</span> OR <span style="color: #000088;">$date_fin</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span>
		<span style="color: #000088;">$date_fin</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/time"><span style="color: #990000;">time</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$handle</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/opendir"><span style="color: #990000;">opendir</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$repertoire</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/readdir"><span style="color: #990000;">readdir</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$handle</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!==</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">'.'</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$file</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">'..'</span> <span style="color: #339933;">&amp;&amp;</span> <a href="http://www.php.net/is_file"><span style="color: #990000;">is_file</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$repertoire</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
				<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/filemtime"><span style="color: #990000;">filemtime</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$repertoire</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;=</span> <span style="color: #000088;">$date_debut</span> <span style="color: #339933;">&amp;&amp;</span> <a href="http://www.php.net/filemtime"><span style="color: #990000;">filemtime</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$repertoire</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&lt;=</span> <span style="color: #000088;">$date_fin</span><span style="color: #009900;">&#41;</span>
					<span style="color: #000088;">$listing</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #339933;">,</span> <span style="color: #000088;">$repertoire</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$file</span><span style="color: #339933;">,</span> <a href="http://www.php.net/filemtime"><span style="color: #990000;">filemtime</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$repertoire</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<a href="http://www.php.net/closedir"><span style="color: #990000;">closedir</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$handle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$listing</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div><p>Seul le chemin du répertoire est obligatoire, si vous ne renseignez pas les deux autres paramètres, tous les fichiers du répertoire serons listés.<br /><br />Voici quelques exemple d'utilisation :<br /></p><div class="codebox"><!-- <strong>PHP Code :</strong> --><div class="incqbox"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Listing de tous les fichiers du répertoire &quot;upload&quot;</span>
<span style="color: #000088;">$listing</span> <span style="color: #339933;">=</span> trier_fichiers_selection<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'upload'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Listing des fichiers du répertoire upload datant de plus de 1 jour</span>
<span style="color: #000088;">$listing</span> <span style="color: #339933;">=</span> trier_fichiers_selection<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'upload'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <a href="http://www.php.net/time"><span style="color: #990000;">time</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">86400</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Afficher les données de mon tableau</span>
<a href="http://www.php.net/print_r"><span style="color: #990000;">print_r</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$listing</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>N'hésitez pas à me proposer des améliorations <img src="img/smilies/wink.png" alt="wink" class="no-style smilies" /></p>]]></description>
	</item>
	<item>
		<title>Saisie impossible de certains caractères dans un flash sous firefox</title>
		<link>http://www.maraumax.fr/billets-26-saisie-impossible-de-certains-caracteres-dans-un-flash-sous-firefox.html</link>
		<description><![CDATA[Catégorie : Développement<br />
Ajouté le : Sun, 19 Jul 2009 21:45:28 +0200<br />
Description : <p><img src="http://www.maraumax.fr/medias/Billets/flash.png" alt="http://www.maraumax.fr/medias/Billets/flash.png" style="float: left; margin: 0 1em 1em 0;" />Si vous n'arrivez pas à ajouter dans un champ texte dynamiques certains caractères tel que le &quot;@&quot;, &quot;.&quot;, ... (par exemple lorsque vous demandez une adresse mail) dans une animation flash que vous avez fraichement crée...<br />Rassurez-vous, &quot;c'est normal&quot; ! Voici la solution très simple pour y remédier !</p><p>La solution très simple consiste à retirer l'attribut vmode qui est un des paramètres de votre animation. (entre &lt;embed&gt; et &lt;/embed&gt;)<br /></p><div class="codebox"><!-- <strong>HTML4STRICT Code :</strong> --><div class="incqbox"><pre class="html4strict" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!-- Paramètres de votre animation --&gt;</span>
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/param.html"><span style="color: #000000; font-weight: bold;">param</span></a> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;wmode&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;transparent&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span></pre></div></div><p>Pensez à le retirer si il est présent dans la balise &lt;embed&gt; ou dans le script javascript la partie suivante si vous utilisez Dreamweaver (berk!)<br /></p><div class="codebox"><!-- <strong>TEXT Code :</strong> --><div class="incqbox"><pre class="text" style="font-family:monospace;">/* Fonction javascript utilisé par dreamweaver */
AC_FL_RunContent( [...] 'wmode','transparent' [...] );</pre></div></div><p>Tout devrait désormais rentrer dans l'ordre !</p>]]></description>
	</item>
</channel>
</rss>
