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

<channel>
	<title>nFrey.com &#124; Nicolas FREY &#187; Internet</title>
	<atom:link href="http://www.nfrey.com/cat/internet/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nfrey.com</link>
	<description>Fais du Web 2.0 un idéal, et d'un idéal une réalité</description>
	<lastBuildDate>Fri, 27 Feb 2009 14:59:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Mozilla Firefox &#8211; Extensions et développement</title>
		<link>http://www.nfrey.com/internet/extension-firefox-dev/</link>
		<comments>http://www.nfrey.com/internet/extension-firefox-dev/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 14:24:45 +0000</pubDate>
		<dc:creator>Nicolas Frey</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[Firefox]]></category>

		<guid isPermaLink="false">http://www.nfrey.com/?p=100</guid>
		<description><![CDATA[Mozilla Firefox est l'un de mes navigateurs préférés. Pas seulement pour développer, mais aussi pour ses performances, son interface, et son lot d'extension fort sympatique.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mozilla-europe.org/fr/firefox/" target="_blank">Mozilla Firefox</a> est l&#8217;un de mes navigateurs préférés. Pas seulement pour développer, mais aussi pour ses performances, son interface, et son lot d&#8217;extensions fort sympathique.</p>
<p><span id="more-100"></span>Il existe de nombreuses extensions qui apportent un gain considérable dans l&#8217;utilisation de Firefox. Voici la liste des extensions que l&#8217;utilise couramment:</p>
<ul>
<li><strong>Adblock Plu</strong>s: Pour supprimer la publicité</li>
<li><strong>DownloadThemAll</strong>: Pour accélérer les téléchargements</li>
<li><strong>Firebug</strong>: Pour déboguer une page html/javascript</li>
<li><strong>Foxmark</strong>: Pour sauvegarder marque-pages et mots de passe</li>
<li><strong>Tab Mix Plus</strong>: Pour une gestion améliorée des onglets</li>
<li><strong>Web Developer</strong>: Une barre d&#8217;outils pour le développement</li>
</ul>
<p>Tous ses outils sont vraiment très bien, je vous propose donc deux liens qui vous les présentent plus précisément.</p>
<ul>
<li><strong>Alsacreations<br />
 </strong>Vous y trouverez un article qui reprends les 20 meilleures extensions Firefox pour développeurs web. (<a href="https://addons.mozilla.org/fr/firefox/addon/1843" target="_blank">Firebug</a>, <a href="https://addons.mozilla.org/fr/firefox/addon/60" target="_blank">WebDeveloper Toolbar</a>, <a href="https://addons.mozilla.org/en-US/firefox/addon/249" target="_blank">Validateurs</a>, <a href="https://addons.mozilla.org/fr/firefox/addon/35" target="_blank">IE Tab</a>, <a href="https://addons.mozilla.org/fr/firefox/addon/271" target="_blank">Colorzilla</a>, <a href="https://addons.mozilla.org/fr/firefox/addon/5648" target="_blank">Fireshot</a>, <a href="https://addons.mozilla.org/fr/firefox/addon/5392" target="_blank">Dust-me Selectors</a>, <a href="https://addons.mozilla.org/en-US/firefox/addon/539" target="_blank">MeasureIt</a>, <a href="http://smush.it/" target="_blank">SmushIt</a>, <a href="https://addons.mozilla.org/en-US/firefox/addon/6149" target="_blank">FirePHP</a>, <a href="https://addons.mozilla.org/en-US/firefox/addon/3829" target="_blank">Live HTTP Headers</a>, <a href="https://addons.mozilla.org/fr/firefox/addon/1802" target="_blank">X-Ray</a>, <a href="https://addons.mozilla.org/fr/firefox/addon/748" target="_blank">Greasemonkey</a>, &#8230;)<br />
 Voici le lien: <a href="http://www.alsacreations.com/actu/lire/645-les-20-meilleures-extensions-firefox-pour-dveloppeurs-web.html" target="_blank">http://www.alsacreations.com</a></li>
<li><strong>Developpez.com</strong><br />
 Vous y trouverez un article sur les meilleurs extensions Firefox. Principalement orienté pour le développeur. (<a href="http://adblock.mozdev.org/" target="_blank">Adblock</a>, <a href="https://addons.mozilla.org/fr/firefox/addon/35" target="_blank">IE tab</a>, <a href="http://extensions.geckozone.org/GetJetableMail" target="_blank">GetJetableMail</a>, <a href="http://extensions.geckozone.org/TabMixPlus" target="_blank">Tab Mix plus</a>, <a href="http://extensions.geckozone.org/ScrapBook" target="_blank">ScrapBook</a>, <a href="http://joliclic.free.fr/mozilla/webdeveloper/" target="_blank">Web developer</a>, <a href="https://addons.mozilla.org/firefox/918/" target="_blank">Gtranslate</a>, <a href="http://extensions.geckozone.org/FireFTP" target="_blank">FireFTP</a>, <a href="http://frenchmozilla.sourceforge.net/cz/" target="_blank">ChatZilla</a>, <a href="https://addons.mozilla.org/firefox/135/" target="_blank">SecurePassword</a>, <a href="https://addons.mozilla.org/firefox/655/" target="_blank">View Source Chart</a>, <a href="https://addons.mozilla.org/firefox/1843/" target="_blank">Firebug</a>, &#8230;)<br />
 Voici le lien: <a href="http://lgmorand.developpez.com/articles/extensions-firefox/" target="_blank">http://www.developpez.com</a></li>
</ul>
<p>Avec ces deux articles, vous voilà parti pour travailler plus facilement et proprement avec Firefox.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nfrey.com/internet/extension-firefox-dev/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Une URL raccourcie sur votre domaine &#8230; pourquoi pas vous ?</title>
		<link>http://www.nfrey.com/internet/tinyurl/</link>
		<comments>http://www.nfrey.com/internet/tinyurl/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 13:43:20 +0000</pubDate>
		<dc:creator>Nicolas Frey</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[courte]]></category>
		<category><![CDATA[raccourci]]></category>
		<category><![CDATA[short]]></category>
		<category><![CDATA[tinyurl]]></category>
		<category><![CDATA[url]]></category>

		<guid isPermaLink="false">http://www.nfrey.com/?p=132</guid>
		<description><![CDATA[Il existe beaucoup de site pour faire des URL courte mais pourquoi ne pas le faire sur votre propre domaine ? ]]></description>
			<content:encoded><![CDATA[<p>Il existe beaucoup de site pour faire des raccourcies URL mais pourquoi ne pas le faire sur votre propre domaine ?</p>
<p><span id="more-132"></span></p>
<p>Le développement est relativement simple, il suffit d&#8217;un serveur acceptant le <a href="http://fr.wikipedia.org/wiki/PHP:_Hypertext_Preprocessor" target="_blank">PHP</a>, d&#8217;une base de données et si possible la redirection d&#8217;url activé (<a href="http://en.wikipedia.org/wiki/Rewrite_engine" target="_blank">mod_rewrite</a> sous <a href="http://www.apache.org/" target="_blank">Apache</a>). Le développement tient dans un script et un fichier .htaccess pour la redirection des URL.</p>
<p>La base de données contient une table avec un identifiant unique qui représente la clé d&#8217;accès et l&#8217;URL du lien sur lequel on veut rediriger.</p>

<div class="wp_codebox"><table><tr id="p1321"><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code" id="p132code1"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #ff0000;">`tinyurl`</span> <span style="color: #66cc66;">&#40;</span>
  <span style="color: #ff0000;">`hash`</span> varchar<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">16</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
  <span style="color: #ff0000;">`url`</span> varchar<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">default</span> <span style="color: #ff0000;">''</span><span style="color: #66cc66;">,</span>
  <span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span>  <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">`hash`</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

<p>Le script PHP est loin d&#8217;être du code objet ou encore utiliser Zend Framework, mais pour un petit outil du genre un bon vieux code en procédural devrait faire l&#8217;affaire. Le script n&#8217;est pas très complexe. On a une partie pour afficher le formulaire, une fonction pour la création du hash, l&#8217;enregistrement dans la base de données et une fonction pour rechercher l&#8217;URL associé au <a href="http://fr.wikipedia.org/wiki/Hash" target="_blank">hash</a>.</p>

<div class="wp_codebox"><table><tr id="p1322"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
</pre></td><td class="code" id="p132code2"><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;">// Fichier qui contient les paramètres de connexion.</span>
<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'config.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * Connexion à la base de donnée
 */</span>
<span style="color: #000088;">$conn</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span>DB_HOST<span style="color: #339933;">,</span> DB_USER<span style="color: #339933;">,</span> DB_PASSWORD<span style="color: #009900;">&#41;</span>
        or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Impossible de se connecter&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$db</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_select_db</span><span style="color: #009900;">&#40;</span>DB_NAME<span style="color: #339933;">,</span> <span style="color: #000088;">$conn</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$table</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;tinyurl&quot;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'HASHSIZE'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'5'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Taille du hash</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * Recherche par rapport au hash passé en paramètre
 * et redirection sur l'URL.
 */</span>
<span style="color: #000000; font-weight: bold;">function</span> renvoyer<span style="color: #009900;">&#40;</span><span style="color: #000088;">$hash</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$table</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>is_hash<span style="color: #009900;">&#40;</span><span style="color: #000088;">$hash</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
     <span style="color: #000088;">$req</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT * FROM <span style="color: #006699; font-weight: bold;">$table</span> WHERE hash = '<span style="color: #006699; font-weight: bold;">$hash</span>';&quot;</span><span style="color: #339933;">;</span>
     <span style="color: #000088;">$res</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$req</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Query failed&quot;</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: #990000;">mysql_num_rows</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$res</span><span style="color: #009900;">&#41;</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: #b1b100;">print</span> <span style="color: #0000ff;">&quot;Aucun id associé&quot;</span><span style="color: #339933;">;</span>
       <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
     <span style="color: #009900;">&#125;</span>
     <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
       <span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Location: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">mysql_result</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$res</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;url&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
       <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
     <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * Enregistrement de l'url avant son identifiant.
 */</span>
<span style="color: #000000; font-weight: bold;">function</span> enregistrer<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$url</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$table</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span>is_url<span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">print</span> <span style="color: #0000cc; font-style: italic;">&lt;&lt;&lt;HTML
                 &lt;span class=&quot;error&quot;&gt;
                    &lt;i&gt;{$url}&lt;/i&gt; n'est pas une url valide
                 &lt;/span&gt;
HTML</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>
&nbsp;
   <span style="color: #666666; font-style: italic;">// Test si l'url existe déjà et retourne le hash correspondant.</span>
   <span style="color: #666666; font-style: italic;">// Évite les doublons inutiles.</span>
   <span style="color: #000088;">$req</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT hash FROM <span style="color: #006699; font-weight: bold;">$table</span> WHERE url= '<span style="color: #006699; font-weight: bold;">$url</span>';&quot;</span><span style="color: #339933;">;</span>
   <span style="color: #000088;">$res</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$req</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Query failed&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #666666; font-style: italic;">// L'url existe déjà dans la base de données</span>
   <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">mysql_num_rows</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$res</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000088;">$hash</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_result</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$res</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;hash&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #666666; font-style: italic;">// A modifier en fonction de votre .htaccess et</span>
      <span style="color: #666666; font-style: italic;">// des redirections d'url</span>
      <span style="color: #000088;">$adresse</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://votredomain/&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$hash</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">print</span> <span style="color: #0000cc; font-style: italic;">&lt;&lt;&lt;HTML
		&lt;span class=&quot;info&quot;&gt;
                   Voici votre URL r&amp;amp;eacute;duite :
                &lt;/span&gt;
&nbsp;
{$adresse}
&nbsp;
HTML</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #009900;">&#125;</span>
&nbsp;
   <span style="color: #666666; font-style: italic;">// L'url n'existe pas encore</span>
   <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
&nbsp;
      <span style="color: #666666; font-style: italic;">// Recherche un identifiant valide</span>
      <span style="color: #000088;">$ok</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span> <span style="color: #000088;">$count</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$ok</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
         <span style="color: #666666; font-style: italic;">// Génération d'un hash</span>
	 <span style="color: #000088;">$hash</span> <span style="color: #339933;">=</span> generateHash<span style="color: #009900;">&#40;</span>HASHSIZE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	 <span style="color: #666666; font-style: italic;">// Test si le hash n'existe pas déjà dans la base de données</span>
  	 <span style="color: #000088;">$req</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT hash FROM <span style="color: #006699; font-weight: bold;">$table</span> WHERE hash= '<span style="color: #006699; font-weight: bold;">$hash</span>';&quot;</span><span style="color: #339933;">;</span>
	 <span style="color: #000088;">$res</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$req</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Query failed&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
         <span style="color: #666666; font-style: italic;">// Aucun résultat le hash est donc dispo</span>
         <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">mysql_num_rows</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$res</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span> <span style="color: #009900;">&#41;</span> <span style="color: #000088;">$ok</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
&nbsp;
         <span style="color: #666666; font-style: italic;">// Nombre de tentative dépassée on arrête.</span>
         <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">++</span><span style="color: #000088;">$count</span> <span style="color: #339933;">&gt;=</span> <span style="color: #cc66cc;">10</span> <span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
&nbsp;
      <span style="color: #666666; font-style: italic;">// Insertion de l'url dans la base de données</span>
      <span style="color: #000088;">$req</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;INSERT INTO <span style="color: #006699; font-weight: bold;">$table</span> (hash, url) VALUES ('<span style="color: #006699; font-weight: bold;">$hash</span>', '<span style="color: #006699; font-weight: bold;">$url</span>');&quot;</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #666666; font-style: italic;">// Insertion ok</span>
      <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$req</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
         <span style="color: #000088;">$adresse</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://nfrey.com/&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$hash</span><span style="color: #339933;">;</span>
	 <span style="color: #b1b100;">print</span> <span style="color: #0000cc; font-style: italic;">&lt;&lt;&lt;HTML
	  	   &lt;span class=&quot;info&quot;&gt;
                       Voici votre URL r&amp;amp;eacute;duite :
                   &lt;/span&gt;
&nbsp;
{$adresse}
&nbsp;
HTML</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
&nbsp;
      <span style="color: #666666; font-style: italic;">// Erreur d'insertion</span>
      <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
         <span style="color: #b1b100;">print</span> <span style="color: #0000cc; font-style: italic;">&lt;&lt;&lt;HTML
		   &lt;span class=&quot;error&quot;&gt;
                      Une erreur s'est produite.
                   &lt;/span&gt;
HTML</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
   <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * Vérification de l'url
 * La regex doit être grandement améliorée pour prendre en compte
 * tous les types d'url possible.
 * ex: protocole://sdo.domain.ext:port/dossier/file?param&amp;amp;autres#ancre
 */</span>
<span style="color: #000000; font-weight: bold;">function</span> is_url<span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #000088;">$motif_url</span><span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;^^(http|ftp|https)://([a-zA-Z0-9-]+.)?([a-zA-Z0-9-]+.)
               ?[a-zA-Z0-9-]+.[a-zA-Z]{2,4}(:[0-9]+)?(/[a-zA-Z0-9-]*)
               ?(.[a-zA-Z0-9]{1,4})?$&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">ereg</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$motif_url</span><span style="color: #339933;">,</span> <span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
      <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
   <span style="color: #b1b100;">else</span>
      <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * Génération d'un identifiant celui ci contient
 * des caractères alpha-numériques.
 * On lui passe en paramètre la taille que devra avoir l'identifiant
 */</span>
<span style="color: #000000; font-weight: bold;">function</span> generateHash<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$length</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
   <span style="color: #000088;">$hash</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #666666; font-style: italic;">// Caractères possibles</span>
   <span style="color: #000088;">$possible</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;0123456789abcdefghijklmnopqrstuvwxyz
                ABCDEFGHIJKLMNOPQRSTUVWXYZ&quot;</span><span style="color: #339933;">;</span> 
&nbsp;
   <span style="color: #666666; font-style: italic;">// Compteur pour la taille du hash</span>
   <span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> 
&nbsp;
   <span style="color: #666666; font-style: italic;">// ajoute un caractère aléatoirement au hash jusqu'à sa taille max</span>
   <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <span style="color: #000088;">$length</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #666666; font-style: italic;">// Trouve un caractère de façon aléatoire dans la liste</span>
      <span style="color: #666666; font-style: italic;">// des caractères possibles</span>
      <span style="color: #000088;">$char</span> <span style="color: #339933;">=</span> <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$possible</span><span style="color: #339933;">,</span> <span style="color: #990000;">mt_rand</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$possible</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #666666; font-style: italic;">// Ne pas reprendre ce caractère s'il est déjà dans le hash</span>
      <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #990000;">strstr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$hash</span><span style="color: #339933;">,</span> <span style="color: #000088;">$char</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
         <span style="color: #000088;">$hash</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$char</span><span style="color: #339933;">;</span>
	 <span style="color: #000088;">$i</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;">// retour du résultat !</span>
   <span style="color: #b1b100;">return</span> <span style="color: #000088;">$hash</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * Vérification du hash
 * Doit contenir x caractères alpha numérique
 */</span>
<span style="color: #000000; font-weight: bold;">function</span> is_hash<span style="color: #009900;">&#40;</span><span style="color: #000088;">$hash</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #000088;">$motif_hash</span><span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;^([0-9A-Za-z]{&quot;</span> <span style="color: #339933;">.</span> HASHSIZE <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;})$&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">ereg</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$motif_hash</span><span style="color: #339933;">,</span> <span style="color: #000088;">$hash</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
      <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
   <span style="color: #b1b100;">else</span>
      <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * Fonction d'affichage
 */</span>
<span style="color: #000000; font-weight: bold;">function</span> affichage<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
   <span style="color: #666666; font-style: italic;">// Un id est passé en paramètre, on appel la fonction renvoyer</span>
   <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      renvoyer<span style="color: #009900;">&#40;</span><span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>
&nbsp;
   <span style="color: #666666; font-style: italic;">// Retour du formulaire on créé une url, appel</span>
   <span style="color: #666666; font-style: italic;">// de la fonction enregistrer</span>
   <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'creer'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
              <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'creer'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'oui'</span><span style="color: #009900;">&#41;</span>
              <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
              <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      enregistrer<span style="color: #009900;">&#40;</span><span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>
&nbsp;
   <span style="color: #666666; font-style: italic;">// Affichage du formulaire pour la création de l'url</span>
   <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">echo</span> <span style="color: #0000cc; font-style: italic;">&lt;&lt;&lt;HTML
&lt;form action=&quot;{$_SERVER['PHP_SELF']}&quot; method=&quot;POST&quot;&gt;
&lt;input type=&quot;hidden&quot; name=&quot;creer&quot; value=&quot;oui&quot; /&gt;
	  URL:
&lt;input type=&quot;text&quot; name=&quot;url&quot; value=&quot;http://&quot; /&gt;
&lt;input type=&quot;submit&quot; name=&quot;action&quot; value=&quot;R&amp;amp;eacute;duire&quot; /&gt;
	&lt;/form&gt;
&nbsp;
HTML</span><span style="color: #339933;">;</span>
  	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&lt;html&gt;
   &lt;head&gt;
      &lt;title&gt;TinyURL&lt;/title&gt;
   &lt;/head&gt;
   &lt;body&gt;
      <span style="color: #000000; font-weight: bold;">&lt;?php</span> affichage<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
   &lt;/body&gt;
&lt;/html&gt;</pre></td></tr></table></div>

<p>Le hash sert donc à récupérer l&#8217;URL dans la base. L&#8217;URL récupérée depuis la base de donnée modifie aussitôt la page visualisée par l&#8217;utilisation de la fonction header().<br />
 Pour parfaire la chose, il faudrait créer un fichier .htaccess renvoyant les URL du type http://domaine/%hash% vers http://domaine/dossier/url.php?id=%hash% &#8230;.</p>
<p>Voici un exemple d&#8217;un fichier .htaccess</p>

<div class="wp_codebox"><table><tr id="p1323"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code" id="p132code3"><pre class="ini" style="font-family:monospace;"># Tester si le module apache existe
&lt;IfModule mod_rewrite.c&gt;
&nbsp;
   # démarre la réécriture d'url
   RewriteEngine On
&nbsp;
   # Redirection http://mondomaine/tinyurl sur le script php
   # <span style="">&#40;</span>créé un petit lien<span style="">&#41;</span>
   RewriteRule tinyurl$ /url/url.php
&nbsp;
   # Redirection http://mondomaine/tinyurl/%hash% sur le script
   # avec le paramètre id
   RewriteRule tinyurl/<span style="">&#40;</span><span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>a-ZA-Z0-<span style="">9</span><span style="">&#93;</span>+<span style="">&#41;</span>$ /url/url.php?id<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">$1 <span style="">&#91;</span>L<span style="">&#93;</span></span></span>
&lt;/IfModule&gt;</pre></td></tr></table></div>

<p>Vous avez maintenant de quoi faire vos URL courtes sur votre site perso. Mon script est très légèrement différent et adapté pour être intégré dans <a href="http://wordpress.org/" target="_blank">Wordpress</a> vous pouvez le tester ici :</p>
<ul>
<li><a href="http://nfrey.com/LNS1e" target="_blank">http://nfrey.com/LNS1e</a></li>
</ul>
<p>Si vous avez des remarques ou questions, je reste joinable. Vous trouverez mes coordonnées sur la page &laquo;&nbsp;<a href="http://www.nfrey.com/a-propos/" target="_blank">à propos</a>&laquo;&nbsp;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nfrey.com/internet/tinyurl/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Configuration d&#8217;un environnement de développement (php/mysql)</title>
		<link>http://www.nfrey.com/internet/install_php_mysql/</link>
		<comments>http://www.nfrey.com/internet/install_php_mysql/#comments</comments>
		<pubDate>Mon, 21 Jul 2008 13:39:47 +0000</pubDate>
		<dc:creator>Nicolas Frey</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Serveur]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.nfrey.com/?p=17</guid>
		<description><![CDATA[Comment se configurer un espace de développement PHP/MySQL sous Windows pour travailler proprement et efficacement.]]></description>
			<content:encoded><![CDATA[<p>Développer un site web, beaucoup de monde peut le faire, mais développer proprement et efficacement ce n&#8217;est pas la même affaire.</p>
<p><span id="more-17"></span>Je vais vous expliquer comment vous configurer un environnement de développement <a href="http://www.php.net/" target="_blank">php</a> / <a href="http://www.mysql.fr/" target="_blank">MySQL</a> sous <a href="http://www.microsoft.fr" target="_blank">Windows</a>.</p>
<p>La première chose à faire, c&#8217;est l&#8217;installation des serveurs. Dans notre cas <a href="http://www.mysql.fr/" target="_blank">MySQL</a> et <a href="http://www.apachefrance.com/" target="_blank">Apache</a>. Sur un serveur de production, il faudrait installer séparément apache, php et mysql pour avoir une configuration optimale, mais comme on veut se faire un espace de développement, il existe des solutions comprenant l&#8217;ensemble des applications nécessaires (<a href="http://www.wampserver.com/" target="_blank">wamp</a>, <a href="http://www.easyphp.org/" target="_blank">easyphp</a>, <a href="http://www.apachefriends.org/fr/xampp.html" target="_blank">xampp</a>&#8230;).</p>
<p>Personnellement j&#8217;utilise wamp. Pourquoi:</p>
<ul>
<li>Son interface conviviale et sa simplicité d&#8217;utilisation (Accès rapide aux fichiers de conf, démarrage des services simplifiées &#8230;) </li>
<li>Des addons, qui permettent d&#8217;avoir plusieurs versions possibles et de pouvoir passer de l&#8217;une à l&#8217;autre facilement</li>
</ul>
<p>Quel est l&#8217;intérêt de configurer sur sa machine locale un serveur web et mettre en place un <a href="http://en.wikipedia.org/wiki/Virtual_hosting" target="_blank">virtualHost</a> ?</p>
<ul>
<li>Un dossier, une configuration, des fichiers logs différents pour chaque site.</li>
<li>Une racine et une configuration étant celle du serveur.</li>
<li>Une url (nom local) accessible rapidement pour chaque site développé. <em>ex: www.monsite.com et www.monsite.local</em></li>
<li>Un développement en local permet de ne pas casser son site visible depuis internet. On peut donc faire tout changement sans porter atteinte à la visibilité du site. </li>
<li>Permet aussi de configurer son serveur local pour avoir un meilleur débogage. </li>
</ul>
<p>Si vous êtes convaincu, <a href="http://www.wampserver.com/" target="_blank">Téléchargez wamp</a> et installez-le. Une fois l&#8217;installation effectuée, il faut configurer l&#8217;ensemble. Le but du jeu est d&#8217;avoir chaque site web dans un dossier avec une <a href="http://fr.wikipedia.org/wiki/Uniform_Resource_Locator" target="_blank">URL</a> locale (<a href="http://fr.wikipedia.org/wiki/Domain_Name_System" target="_blank">DNS</a>) lui étant associée. On va donc commencer par modifier le fichier hosts en associant une <a href="http://fr.wikipedia.org/wiki/Adresse_IP" target="_blank">IP</a> à un nom. Ceci permettra d&#8217;accéder à notre machine via un nom plutôt que par une IP, ce qui permettra ensuite de configurer le serveur web sur ce nom.</p>
<p><strong>C:\WINDOWS\system32\drivers\etc\hosts</strong></p>
<pre># fichier hosts</pre>
<pre>127.0.0.1       	localhost # ligne par défaut</pre>
<pre>127.0.0.1		monsite.local # ligne à ajouter.</pre>
<p>Une fois le fichier hosts modifié, on va changer la configuration d&#8217;apache, et ajouter un <a href="http://en.wikipedia.org/wiki/Virtual_hosting" target="_blank">virtualHost</a> sur le nom local de la machine. Un <a href="http://en.wikipedia.org/wiki/Virtual_hosting" target="_blank">virtualHost</a> est une zone qui est mappée sur un nom de domaine. On peut donc avoir sur la même machine avec une seule <a href="http://fr.wikipedia.org/wiki/Adresse_IP" target="_blank">IP</a> plusieurs site web avec chacun un domaine différent.</p>
<p><strong>%install_dir_wamp%/bin/apache/apacheX.X.XX/conf/httpd.conf</strong></p>
<pre>Include conf/httpd-vhosts.conf # A décommenter.</pre>
<p><strong><br />
 %install_dir_wamp%/bin/apache/apacheX.X.XX/conf/httpd-vhosts.conf</strong></p>
<pre>NameVirtualHost * # écoute sur toutes les ip et tous les ports

&lt;VirtualHost *:80&gt;
    ServerName localhost
    DocumentRoot E:/dev/wamp/www # dossier par défaut de wamp
    ErrorLog E:/dev/wamp/logs/error_log # fichier de log
    CustomLog E:/dev/wamp/logs/access_log common # fichier de log
&lt;/VirtualHost&gt;

&lt;VirtualHost *:80&gt;
    ServerName monsite.local # dns que l'on retrouve dans le hosts
    DocumentRoot F:/workspace/monsite # emplacement racine du site
    DirectoryIndex index.php # fichier par défaut
    ErrorLog F:/workspace/monsite/logs/error_log
    CustomLog F:/workspace/monsite/logs/access_log common
&lt;/VirtualHost&gt;
</pre>
<p>Une fois les modifications effectuées, il vous faudra redémarrer le serveur web. N&#8217;oubliez pas de créer tous les dossiers nécessaires (dont les dossiers logs qu&#8217;Apache ne créé pas tout seul) et de passer en ligne Wamp. Si tout se passe bien, le serveur devrait redémarrer correctement et vous dévriez avoir accès via votre navigateur à <a href="http://monsite.local" target="_blank">http://monsite.local</a>. Il ne vous restera plus qu&#8217;à télécharger un <a href="http://fr.wikipedia.org/wiki/Environnement_de_d%C3%A9veloppement_int%C3%A9gr%C3%A9" target="_blank">IDE</a> comme <a href="http://www.eclipse.org/" target="_blank">Eclipse</a>, <a href="http://www.zend.com/fr/products/studio/" target="_blank">Zend Studio</a> ou encore <a href="http://notepad-plus.sourceforge.net" target="_blank">Notepad++</a> pour développer vos sites, installer un système de contrôle de version (versioning) et configurer votre navigateur avec des outils pour simplifier le débogage.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nfrey.com/internet/install_php_mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Le web utile</title>
		<link>http://www.nfrey.com/divers/web-utile/</link>
		<comments>http://www.nfrey.com/divers/web-utile/#comments</comments>
		<pubDate>Fri, 04 Jul 2008 11:31:45 +0000</pubDate>
		<dc:creator>Nicolas Frey</dc:creator>
				<category><![CDATA[Divers]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[lien]]></category>
		<category><![CDATA[outils]]></category>
		<category><![CDATA[pratique]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[url]]></category>

		<guid isPermaLink="false">http://www.nfrey.com/?p=18</guid>
		<description><![CDATA[Internet est grand, internet est fort, mais il est certainement plus grand qu'il n'est fort, et ce, du fait que l'on a pas forcement les bonnes adresses.]]></description>
			<content:encoded><![CDATA[<p>Internet est grand, internet est fort, mais il est certainement plus grand qu&#8217;il n&#8217;est fort, et ce, du fait que l&#8217;on a pas forcement les bonnes adresses.</p>
<p><span id="more-18"></span>Il existe un grand nombre de moteurs de recherche, un grand nombre d&#8217;outils, d&#8217;applications ou de sites d&#8217;informations. Mais les connaissez vous ou les utilisez vous ?<br />
 Je vais dans cet article vous faire une liste des sites que j&#8217;aime utiliser, voir ou lire. J&#8217;espère vous les faire découvrir et vous les faire utiliser.</p>
<h2>Application en ligne</h2>
<h3><a href="http://www.google.com/calendar/" target="_blank">Google Calendar</a></h3>
<p><em>Google Calendar est un agenda en ligne, il est très pratique et très conviviale. Il permet d&#8217;ajouter, de modifier et de voir son planning sur une journée, une semaine ou sur un mois. On peut mettre des alertes SMS, Email ou popup sur chacun des événements créés en choisissant la fréquence des rappels. Vous pouvez partager des calendriers, et en récupérer des partagés. Vous pouvez aussi utiliser les calendriers dans une application lourde type <a href="http://www.mozilla-europe.org/fr/products/thunderbird/" target="_blank">Thunderbird</a> et <a href="http://extensions.geckozone.org/Lightning/" target="_blank">Lightning</a> ( <a href="https://addons.mozilla.org/fr/thunderbird/addon/4631" target="_blank">Fournisseur pour Google Agenda</a> )</em>.</p>
<h3><a href="http://docs.google.com/" target="_blank">Google Documents</a></h3>
<p><em>Google documents est l&#8217;<a href="http://fr.openoffice.org/" target="_blank">openOffice</a> ou <a href="http://office.microsoft.com/" target="_blank">Microsoft Office</a> du web, il permet de créer en ligne des documents texte (de type <a href="http://www.microsoft.com/" target="_blank">Word</a>), des feuilles de calculs (de type <a href="http://www.microsoft.com/" target="_blank">Excel</a>) ou des présentations (de type <a href="http://www.microsoft.com/" target="_blank">PowerPoint</a>). Les documents créés sont exportables en différents formats (OpenDocuments, Microsoft, PDF, HTML ou autres). Vous pouvez partager vos documents et travailler en collabaration. Si le même document est édité par plusieurs personnes vous avez en temps réél ces modifications ou tout autre changement. Depuis peu le support du PDF a été ajouté. Vous pouvez donc y stocker vos documents de type PDF pour les visualiser ou les partager</em></p>
<h3><a href="http://maps.google.com/" target="_blank">Google Maps</a></h3>
<p><em>Google Maps est un système de cartographie du monde entier, il se démarque néanmoins des autres par ses fonctionnalités supplémentaires comme le partage et personnalisation de cartes, la vue satellite très précise, le relief et le fabuleux Street View qui vous permet de vous promenez dans une ville avec une vue panoramique (Malheureusement il manque encore beaucoup de ville en France mais c&#8217;est en cours &#8230;).<br />
 Google Maps est aussi disponible sur les téléphones portables et permet un positionnement sur la carte via la triangulation du réseau GSM (Peu précis).<br />
 Vous pouvez aussi télécharger l&#8217;application <a href="http://earth.google.com/" target="_blank">GoogleEarth</a> qui permet une visualisation en 3D des bâtiments et du relief mais il ajoute aussi beaucoup de fonctionnalités.<br />
 </em></p>
<h3><a href="http://www.deezer.com/" target="_blank">Deezer</a></h3>
<p><em>La tendance actuelle va à ce que l&#8217;on se déplace de moins en moins en magasin pour acheter des CDs. On veut tout, partout et sans attendre. De plus, le droit à la copie privée ainsi que certaines protections sur les CDs, nous empêches de les avoir partout et de nous en faire des copies pour les écouter en voiture ou au boulot.<br />
 Deezer permet légalement d&#8217;écouter tous types de musiques en ligne. Vous avez accès à un moteur de recherche qui permet une recherche sur des albums, des artistes ou des titres. Vous pouvez vous faire des playlists, et aussi utiliser une smartRadio qui se chargera de vous faire écouter des musiques en fonction du style que vous avez choisi.</em></p>
<h3><a href="http://www.zamzar.com/" target="_blank">Zamzar</a></h3>
<p><em>Vous avez surement déjà eu des fichiers dans un certain format que vous vouliez convertir. Zamzar va pouvoir s&#8217;en occuper. C&#8217;est un outil de conversion, il prend donc un fichier d&#8217;un certain type en entrée pour le convertir dans un autre format. L&#8217;outil permet de convertir tout type de fichiers, des fichiers image (jpg, png, gif, tga &#8230;.), des documents (doc, docx, html, pdf, xls, ppt &#8230;), des musiques (mp3, ac3, mp4, wav, ra &#8230;), des vidéos (3gp, mov, avi, mpeg &#8230;) ou d&#8217;autres formats (7z, zip, tar, rar &#8230;.). Une fois la conversion effectuée vous recevez un mail avec un lien pour télécharger le fichier converti.</em></p>
<h2>Informations et outils</h2>
<h3><a href="http://www.phoenixjp.net/" target="_blank">PhoenixJP</a></h3>
<p><em><a href="http://www.phoenixjp.net/" target="_blank">PhoenixJP</a> est un site qui référence via des flux RSS toutes les actualités du web. Celles ci sont classées par catégories (Générale, Hardware, tuning, Jeux, Mobile, OS, Sécurité &#8230;.). On a donc accès rapidement à l&#8217;ensemble des actualités sur une seule page. On peut choisir une catégorie, filtrer par date et même créer sa propre page personnalisée.</em></p>
<h3><a href="http://dictionnaire.tv5.org/" target="_blank">Dictionnaire / MédiaDico<br />
</a></h3>
<p><em>Internet, MSN, Texto &#8230; ont tendance à nous faire oublier comment écrire correctement et sans faute d&#8217;orthographe. Je trouve ce <a href="http://dictionnaire.tv5.org/" target="_blank">dictionnaire</a> très bien fait et surtout ce n&#8217;est pas qu&#8217;un dictionnaire classique. On y retrouve des définitions, synonymes, conjugaisons, style et traduction anglais/français et français/anglais. <br />
 Il existe même une extension pour firefox et Internet Explorer, permettant d&#8217;accèder directement aux fonctions du dictionnaire.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nfrey.com/divers/web-utile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cryptage des conversations MSN</title>
		<link>http://www.nfrey.com/divers/cryptage_msn/</link>
		<comments>http://www.nfrey.com/divers/cryptage_msn/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 17:13:08 +0000</pubDate>
		<dc:creator>Nicolas Frey</dc:creator>
				<category><![CDATA[Divers]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[conversation]]></category>
		<category><![CDATA[cryptage]]></category>
		<category><![CDATA[live messenger]]></category>
		<category><![CDATA[msn]]></category>

		<guid isPermaLink="false">http://www.nfrey.com/?p=19</guid>
		<description><![CDATA[Vous discutez sur MSN ou avec un autre messagerie, vous avez peur que l'on récupère ou que l'on utilise vos conversations et données personnelles. Il existe des solutions pour sécuriser vos conversations.]]></description>
			<content:encoded><![CDATA[<p>Vous discutez sur MSN ou avec une autre messagerie, vous avez peur que l&#8217;on récupère ou que l&#8217;on utilise vos conversations et données personnelles. Il existe des solutions pour sécuriser vos conversations.</p>
<p><span id="more-19"></span>MSN ou tout autre logiciel pour converser en ligne utilisent des protocoles non crypté. Ce qu&#8217;il veut dire que n&#8217;importe qui sur le réseau pourrait récupérer vos conversations. Certe ce n&#8217;est pas donné à n&#8217;importe qui, mais une personne qui s&#8217;y connait un peu y arrivera facilement.</p>
<p>Il existe néammoins des parades, plus ou moins efficaces et plus ou moins faciles à installer.</p>
<ul>
<li><a href="http://www.angelfire.com/ns2/deathangelm666/" target="_blank">MSN Crypt</a></li>
<li><a href="http://www.branchez-vous.com/logiciel/03-08/07-274301.html" target="_blank">IMsecure</a></li>
<li><a href="http://www.secway.fr/fr/products/simplite_msn/" target="_blank">SimpLite</a></li>
</ul>
<p>Personnellement après avoir fait le tour de ces sites, je me suis tourné vers SimpLite. Les autres me semblaient un peu bizarre à l&#8217;utilisation.<br />
 SimpLite est un logiciel qui fonctionne en standalone, il est gratuit et permet une utilisation sous MSN, ICQ/AIM, Yahoo ou Jabber. Il existe une version pro qui ajoute quelques fonctionnalités supplémentaires et la possibilité d&#8217;être multi-protocole (Une application par protocole pour la version free).<br />
 Simplite est simple d&#8217;utilisation, il détecte automatiquement si votre interlocuteur a installé le logiciel et procède à un échange de clef suite à l&#8217;acceptation des deux tiers. Une fois que les clefs ont été échangées la conversation sera cryptée à chaque fois que vous discuterez avec cette même personne. A condition bien sur que simpLite soit exécuté. Si toutefois vous discutez avec quelqu&#8217;un qui n&#8217;a pas installé le logiciel, il vous informera que la conversation est standard et vous pourrez discuter normalement. SimpLite est donc simple d&#8217;utilisation et une fois que vous aurez accepté les clefs de tous vos contacts il sera complètement transparent.</p>
<p>Voila, vous savez tout pour protéger votre vie privée.</p>
<p>Mais si vous êtes un vrai parano vous pouvez aussi protéger vos historiques de conversations MSN. Il vous suffira d&#8217;installer MSN Plus. Mais pensez à désactiver les historiques de <a href="http://www.windowslive.fr/messenger/" target="_blank">LiveMessenger</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nfrey.com/divers/cryptage_msn/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Firefox 3 &#8211; Après Browser Sync voici Weave</title>
		<link>http://www.nfrey.com/internet/firefox-3-apres-browser-sync-voici-weave/</link>
		<comments>http://www.nfrey.com/internet/firefox-3-apres-browser-sync-voici-weave/#comments</comments>
		<pubDate>Mon, 23 Jun 2008 09:52:36 +0000</pubDate>
		<dc:creator>Nicolas Frey</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Browser Sync]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Synchronisation]]></category>
		<category><![CDATA[Weave]]></category>

		<guid isPermaLink="false">http://www.nfrey.com/?p=14</guid>
		<description><![CDATA[La synchronisation de données entre navigateurs c'est possible et ce sans forcement passer par une clef USB. Browser Sync de Google le faisait très bien mais il n'est plus maintenu depuis 2006. Depuis la sortie de Firefox 3 il devient obsolète pour laisser la place à l'équipe de Mozilla est leur projet Weave.]]></description>
			<content:encoded><![CDATA[<p>La synchronisation de données entre navigateurs c&#8217;est possible et ce sans forcement passer par une clef USB. <a href="http://www.google.com/tools/firefox/browsersync/" target="_blank">Browser Sync</a> de <a href="http://www.google.fr/" target="_blank">Google</a> le faisait très bien mais il n&#8217;est plus maintenu depuis 2006. Depuis la sortie de <a href="http://www.mozilla-europe.org/fr/" target="_blank">Firefox 3</a> il devient obsolète pour laisser la place à l&#8217;équipe de <a href="http://www.mozilla.org/" target="_blank">Mozilla</a> est leur projet <a href="http://labs.mozilla.com/2007/12/introducing-weave/" target="_blank">Weave</a>.</p>
<p><span id="more-14"></span><a href="http://www.mozilla-europe.org/fr/" target="_blank">Firefox 3</a> a fait sa sortie depuis quelques jours, il apporte quelques fonctionnalités visuelles sympatiques comme:</p>
<ul>
<li><strong>Une barre d’adresse refondue</strong><br />
 <em>Maintenant, un mot clé suffit pour retrouver une page déjà visitée. On peut donc retrouver facilement l’une de ses pages, sans avoir à passer par l’historique.</em></li>
<li><strong>Des favoris et un historique améliorés<br />
 </strong><em>Ajout d&#8217;un clic l&#8217;url aux favori</em>s, l&#8217;historique prends place avec les favoris, on retrouve aussi des dossiers dynamiques avec les sites les plus visités &#8230;.</li>
<li><strong>Gestionnaire de download</strong><br />
 <em>L&#8217;interface a été modifiée et on peut désormais faire des pauses sur les téléchargements en cours pour les reprendre plus tard</em>.</li>
<li><strong>La sécurité</strong><br />
 <em>Le navigateur donne des indications précises sur les propriétaires des pages que vous visiter et vérifier les certificats de sécurité.</em></li>
</ul>
<p>Certes tous ces changements sont très bien mais il reste de nombreuses extensions encore incompatibles. <a href="http://www.google.com/tools/firefox/browsersync/" target="_blank">BrowserSync</a> de <a href="http://www.google.fr" target="_blank">google</a> pour moi une extension obligatoire qui permet de synchroniser plusieurs navigateurs ensembles. On peut donc avoir des favoris, mots de passe, cookies, formulaires sur plusieurs pc sans avoir à tout ajouter à la main. Bien sur les données sont stockées sur un serveur distant mais cryptées et sécurisées.</p>
<p>Petit hic &#8230;. depuis firefox 3, <a href="http://www.google.com/tools/firefox/browsersync/" target="_blank">BrowserSync</a> ne fonctionne plus, forcement il n&#8217;est plus mis à jour depuis 2006, l&#8217;équipe de développeurs du projet a été transférée sur d&#8217;autres tâches.</p>
<p>Mais &#8230; merci à l&#8217;équipe de Mozilla qui est entrain de mettre en place dans un premier temps un produit équivalent mais qui a bien l&#8217;intention d&#8217;en faire un outil beaucoup plus complet. Son petit nom <a href="http://labs.mozilla.com/2007/12/introducing-weave/" target="_blank">Weave</a>.</p>
<p><a href="http://labs.mozilla.com/2007/12/introducing-weave/" target="_blank">Weave</a> permettra de synchroniser l&#8217;ensemble de son profil (favoris, historiques, cookies, mots de passe, onglets, données de formulaires, extensions, themes, plugins de recherche &#8230;.), on devrait par la suite y retrouver la possibilité de partager ses marques pages, et avoir accès à nos données via un client web.</p>
<p>La version 0.1 est disponible en téléchargement mais elle est encore buggée et loin d&#8217;être achevée. Mais la version 0.2 ne devrait pas tarder à voir le jour avec pas mal de nouvelles fonctionnalités. J&#8217;espère que malgrè son status de béta, elle sera utilisable et fonctionnelle.</p>
<h4>Les liens</h4>
<p><a href="http://labs.mozilla.com/2007/12/introducing-weave/" target="_blank">Le projet Weave et son principe de fonctionnement</a></p>
<p><a href="http://labs.mozilla.com/2008/06/weave-status-update/" target="_blank">Le suivi de la version 0.2 de Weave</a></p>
<p><a href="http://labs.mozilla.com/projects/" target="_blank">Les différents projets de Mozilla</a></p>
<p><a href="http://www.pcinpact.com/actu/news/44552-mozilla-weave-firefox-favoris-synchronisatio.htm" target="_blank">Mozilla Weave 0.2 : la synchronisation des données de Firefox</a></p>
<p><a href="http://www.google.com/tools/firefox/browsersync/" target="_blank">Google browser sync pour firefox 2</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nfrey.com/internet/firefox-3-apres-browser-sync-voici-weave/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.757 seconds -->
