<?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>Tips Task Force</title>
	<atom:link href="http://www.tipstf.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.tipstf.com</link>
	<description>Trucs et astuces en francais. Des réponses ponctuelles à vos problèmes.</description>
	<lastBuildDate>Thu, 22 Mar 2012 10:34:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Ou trouver le numéro de série de son Reflex Canon 500D, 550D, 600D et autres appareils photos</title>
		<link>http://www.tipstf.com/ou-trouver-le-numero-de-serie-de-son-reflex-canon-500d-550d-600d-et-autres-appareils-photos</link>
		<comments>http://www.tipstf.com/ou-trouver-le-numero-de-serie-de-son-reflex-canon-500d-550d-600d-et-autres-appareils-photos#comments</comments>
		<pubDate>Mon, 19 Dec 2011 06:58:28 +0000</pubDate>
		<dc:creator>julien</dc:creator>
				<category><![CDATA[Photoshop]]></category>
		<category><![CDATA[apn]]></category>
		<category><![CDATA[Canon]]></category>
		<category><![CDATA[photo]]></category>
		<category><![CDATA[photographie]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[reflex]]></category>

		<guid isPermaLink="false">http://www.tipstf.com/?p=31</guid>
		<description><![CDATA[Pour utiliser la garantie ou bien pour s&#8217;inscrire sur le site constructeur on vous demande toujours le numéro de série de votre reflex. Je parle de Canon et du Reflex 550D tout simplement parce que c&#8217;est le mien mais la &#8230; <a href="http://www.tipstf.com/ou-trouver-le-numero-de-serie-de-son-reflex-canon-500d-550d-600d-et-autres-appareils-photos">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Pour utiliser la garantie ou bien pour s&#8217;inscrire sur le site constructeur on vous demande toujours le numéro de série de votre reflex. Je parle de <strong>Canon et du Reflex 550D</strong> tout simplement parce que c&#8217;est le mien mais la technique marche pour tous (ou presque) les appareils photos.</p>
<h3>Connaitre le numéro de série de son appareil photo avec Photoshop</h3>
<p>Ouvrez <strong>une photo prise avec votre Reflex</strong> dans Photoshop et navigez:</p>
<ol>
<li>Fichier</li>
<li>Information</li>
<li>Avancé</li>
<li>Schéma</li>
<li><strong>Aux: numéro de série</strong></li>
</ol>
<div>S&#8217;il vous manque des caractères il se peut que Photoshop ne montre pas les 0 devant le numéro de série, mais cela ne devrait pas poser problème.</div>
<p><a href="http://www.tipstf.com/wp-content/uploads/2011/12/numero-de-serie-apn.jpg"><img class="aligncenter size-full wp-image-32" title="numero de serie apn" src="http://www.tipstf.com/wp-content/uploads/2011/12/numero-de-serie-apn.jpg" alt="" width="680" height="620" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tipstf.com/ou-trouver-le-numero-de-serie-de-son-reflex-canon-500d-550d-600d-et-autres-appareils-photos/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ID youtube dans une variable PHP à partir de l&#8217;URL et sans regex</title>
		<link>http://www.tipstf.com/id-youtube-dans-une-variable-php-a-partir-de-lurl-et-sans-regex</link>
		<comments>http://www.tipstf.com/id-youtube-dans-une-variable-php-a-partir-de-lurl-et-sans-regex#comments</comments>
		<pubDate>Sun, 06 Nov 2011 14:29:06 +0000</pubDate>
		<dc:creator>julien</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://www.tipstf.com/?p=28</guid>
		<description><![CDATA[Vous avez peut-etre realisé comme youtube est bien fait et puissant, à partir de l&#8217;ID vous pouvez obtenir code embed et image thumbnail. En cherchant sur internet vous trouverez des tonnes de regex complexes mais vous pouvez avoir cet ID &#8230; <a href="http://www.tipstf.com/id-youtube-dans-une-variable-php-a-partir-de-lurl-et-sans-regex">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Vous avez peut-etre realisé comme youtube est bien fait et puissant, à partir de l&#8217;ID vous pouvez obtenir code embed et image thumbnail. En cherchant sur internet vous trouverez des tonnes de regex complexes mais vous pouvez avoir <strong>cet ID sans regex avec une simple fonction <a href="http://www.tipstf.com/category/php"target="_self"title="Voir tous les articles sur PHP" >PHP</a></strong>.</p>
<p>Exemple: <a href="http://www.youtube.com/watch?v=oPM4Ui6Sjfk">http://www.youtube.com/watch?v=<strong>oPM4Ui6Sjfk</strong></a></p>
<p><strong>Pour obtenir l&#8217;ID</strong> et ainsi l&#8217;image assiciée (<a href="http://img.youtube.com/vi/oPM4Ui6Sjfk/0.jpg">http://img.youtube.com/vi/oPM4Ui6Sjfk/0.jpg</a>) il suffit d&#8217;utiliser 2 functions PHP simples et connues: <strong>parse_url</strong> et <strong>parse_str</strong>. Si vous ne les connaissez pas, allez voir la doc, elles sont très utiles!</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> get_youtube_id_from_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>
&nbsp;
	<span style="color: #000088;">$url_string</span> <span style="color: #339933;">=</span> <span style="color: #990000;">parse_url</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #339933;">,</span> PHP_URL_QUERY<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">parse_str</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$url_string</span><span style="color: #339933;">,</span> <span style="color: #000088;">$args</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;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$args</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'v'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$args</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'v'</span><span style="color: #009900;">&#93;</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: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>	
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.tipstf.com/id-youtube-dans-une-variable-php-a-partir-de-lurl-et-sans-regex/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Libérez 4Go sur votre disque dur en 1 clic</title>
		<link>http://www.tipstf.com/liberez-4go-sur-votre-disque-dur-en-1-clic</link>
		<comments>http://www.tipstf.com/liberez-4go-sur-votre-disque-dur-en-1-clic#comments</comments>
		<pubDate>Sun, 06 Nov 2011 14:11:06 +0000</pubDate>
		<dc:creator>julien</dc:creator>
				<category><![CDATA[windows]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[disque]]></category>
		<category><![CDATA[nettoyer]]></category>
		<category><![CDATA[optimisation]]></category>

		<guid isPermaLink="false">http://www.tipstf.com/?p=26</guid>
		<description><![CDATA[Si vous aussi votre disque dur système est trop plein, je viens de découvrir comment liberer 4Go d&#8217;espace en 1 clic. En réalité il s&#8217;agit de libérer l&#8217;équivalent de votre RAM, 4Go dans mon cas. Il suffit de désactiver le &#8230; <a href="http://www.tipstf.com/liberez-4go-sur-votre-disque-dur-en-1-clic">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Si vous aussi votre disque dur système est trop plein, je viens de découvrir comment liberer 4Go d&#8217;espace en 1 clic. En réalité il s&#8217;agit de <strong>libérer l&#8217;équivalent de votre RAM</strong>, 4Go dans mon cas.</p>
<p><strong>Il suffit de désactiver le mode de veille prolonger</strong>. En effet windows réserve toujours cet espace sur votre disque. Tout se passe dans les options d&#8217;alimentation.</p>
<p><strong>NB:</strong> Bien sur il ne sera plus possible de mettre votre PC en mode veille prolongé par la suite.</p>
<p><em><strong>Panneau de configuration\Système et sécurité\Options d’alimentation\Modifier les paramètres du mode de gestion de l’alimentation</strong></em></p>
<p>Je ne peux pas faire moi-même de screenshot puisque j&#8217;ai déjà désactivé cette option.</p>
<p><a href="http://www.tipstf.com/liberez-4go-sur-votre-disque-dur-en-1-clic/veille-prolonge-hybride-windows" rel="attachment wp-att-27"><img class="aligncenter size-full wp-image-27" title="veille prolonge hybride windows" src="http://www.tipstf.com/wp-content/uploads/2011/11/veille-prolonge-hybride-windows.jpg" alt="" width="606" height="483" /></a><a href="http://www.commentcamarche.net/faq/22121-windows-7-mise-en-veille-prolongee">Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tipstf.com/liberez-4go-sur-votre-disque-dur-en-1-clic/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[1and1] Erreur de la mise à jour automatique de WordPress (out of memory)</title>
		<link>http://www.tipstf.com/1and1-erreur-de-la-mise-a-jour-automatique-de-wordpress-out-of-memory</link>
		<comments>http://www.tipstf.com/1and1-erreur-de-la-mise-a-jour-automatique-de-wordpress-out-of-memory#comments</comments>
		<pubDate>Tue, 02 Aug 2011 20:43:53 +0000</pubDate>
		<dc:creator>julien</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[1&1]]></category>
		<category><![CDATA[1and1]]></category>
		<category><![CDATA[fatal error]]></category>
		<category><![CDATA[mise a jour]]></category>
		<category><![CDATA[out of memory]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.tipstf.com/?p=24</guid>
		<description><![CDATA[Si vous obtenez des messages d&#8217;erreurs tel que ceux-ci, suivez le guide! Fatal error: Out of memory (allocated 27262976) (tried to allocate 4581207 bytes) in /homepages/38/d230605256/htdocs/lsrn2/wp-includes/class-http.php on line 1402 Fatal error Out Of Memory In /wp-Includes/Class-Http.Php On Line 1426 Si vous hebergez un &#8230; <a href="http://www.tipstf.com/1and1-erreur-de-la-mise-a-jour-automatique-de-wordpress-out-of-memory">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Si vous obtenez des messages d&#8217;erreurs tel que ceux-ci, suivez le guide!</p>
<blockquote><p><strong>Fatal error</strong>: Out of memory (allocated 27262976) (tried to allocate 4581207 bytes) in <strong>/homepages/38/d230605256/htdocs/lsrn2/wp-includes/class-http.<a href="http://www.tipstf.com/category/php"target="_self"title="Voir tous les articles sur PHP" >php</a></strong> on line <strong>1402</strong></p></blockquote>
<blockquote><p>Fatal error Out Of Memory In /wp-Includes/Class-Http.Php On Line 1426</p></blockquote>
<p>Si vous hebergez un WordPress sur 1and1 vous aurez probablement remarqué que les mises à jour automatique ne marche plus depuis un bon moment. Tous simplement la mémoire allouée par defaut est de 32Mo, il va falloir l&#8217;augmenter.</p>
<p><a href="http://www.tipstf.com/wp-content/uploads/2011/08/mise-a-jour-wordpress-out-of-memory-1and1.jpg"><img class="aligncenter size-full wp-image-25" title="mise a jour wordpress out of memory 1and1" src="http://www.tipstf.com/wp-content/uploads/2011/08/mise-a-jour-wordpress-out-of-memory-1and1.jpg" alt="" width="709" height="164" /></a></p>
<p>Je vous donne la méthode la plus complète, elle devrait donc marcher à (presque tous les coups). Il se peut que certaine des étapes ne soit pas utile pour vous mais bon, ça ne coute rien!</p>
<p><strong>Solution étape par étape au problème de mise à jour automatique WordPress chez 1&amp;1</strong></p>
<p>1. Ouvrez votre wp-config.php dans un éditeur de texte et ajouter la ligne suivante.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span>‘WP_MEMORY_LIMIT’<span style="color: #339933;">,</span> ’64M’<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>2. Ouvrez votre php.ini si vous en avez ou bien crée un fichier texte nommé &#8216;php.ini&#8217; (il s&#8217;agit de la configuration de votre PHP) et ajouter la ligne suivante.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"> memory_limit<span style="color: #339933;">=</span>64M</pre></div></div>

<p>Ce fichier doit etre uploadé à la racine ainsi que dans le dossier wp-admin</p>
<p>3. Désactivé tous les plugins. Pas d&#8217;inquétude après la mise à jour vous pourrez séléctionner tous les plugins &laquo;&nbsp;desactivés récemment&nbsp;&raquo; et tout activer d&#8217;un coup.</p>
<p>4. Faites la mise à jour et réactivez vos plugins</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tipstf.com/1and1-erreur-de-la-mise-a-jour-automatique-de-wordpress-out-of-memory/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sauvegarder votre base de données MySQL dans un fichier .sql: dumpMySQL()</title>
		<link>http://www.tipstf.com/sauvegarder-votre-base-de-donnees-mysql-dans-un-fichier-sql-dumpmysql</link>
		<comments>http://www.tipstf.com/sauvegarder-votre-base-de-donnees-mysql-dans-un-fichier-sql-dumpmysql#comments</comments>
		<pubDate>Mon, 01 Aug 2011 16:41:49 +0000</pubDate>
		<dc:creator>julien</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[dump]]></category>
		<category><![CDATA[fonctions]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[phpmyadmin]]></category>

		<guid isPermaLink="false">http://www.tipstf.com/?p=22</guid>
		<description><![CDATA[Voici une fonction PHP qui sauvegarde votre base de données. Imaginez la puissance de cette fonction et le temps gagné. Lorsque vous l’exécutez, elle créé un fichier .sql et sauvegarde toute votre base, un peu comme la fonction &#171;&#160;exporter&#160;&#187; de phpmyadmin. J&#8217;aimerais &#8230; <a href="http://www.tipstf.com/sauvegarder-votre-base-de-donnees-mysql-dans-un-fichier-sql-dumpmysql">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Voici une <strong>fonction <a href="http://www.tipstf.com/category/php"target="_self"title="Voir tous les articles sur PHP" >PHP</a> qui sauvegarde votre base de données</strong>. Imaginez la puissance de cette fonction et le temps gagné.</p>
<p>Lorsque vous l’exécutez, elle créé un fichier .sql et <strong>sauvegarde toute votre base</strong>, un peu comme la fonction <strong>&laquo;&nbsp;exporter&nbsp;&raquo; de phpmyadmin</strong>.</p>
<p>J&#8217;aimerais pouvoir linker le site sur lequel j&#8217;ai trouvé cette fonction mais je ne le retrouve plus! Je l&#8217;utilise personnellement depuis plusieurs mois.</p>
<h2>dumpMySQL(): exporter votre base de données complète</h2>

<div class="wp_syntax"><table><tr><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
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//Cree un ficher .sql pour sauvegarder la base</span>
<span style="color: #000000; font-weight: bold;">function</span> dumpMySQL<span style="color: #009900;">&#40;</span><span style="color: #000088;">$serveur</span><span style="color: #339933;">,</span> <span style="color: #000088;">$login</span><span style="color: #339933;">,</span> <span style="color: #000088;">$password</span><span style="color: #339933;">,</span> <span style="color: #000088;">$base</span><span style="color: #339933;">,</span> <span style="color: #000088;">$mode</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$connexion</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$serveur</span><span style="color: #339933;">,</span> <span style="color: #000088;">$login</span><span style="color: #339933;">,</span> <span style="color: #000088;">$password</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">mysql_select_db</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$base</span><span style="color: #339933;">,</span> <span style="color: #000088;">$connexion</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$entete</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;-- ----------------------<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$entete</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;-- dump de la base &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$base</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; au &quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;d-M-Y&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$entete</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;-- ----------------------<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$creations</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$insertions</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$listeTables</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;show tables&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$connexion</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$table</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_fetch_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$listeTables</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #666666; font-style: italic;">// si l'utilisateur a demandé la structure ou la totale</span>
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mode</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span> <span style="color: #339933;">||</span> <span style="color: #000088;">$mode</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$creations</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;-- -----------------------------<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$creations</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;-- creation de la table &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$table</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$creations</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;-- -----------------------------<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$listeCreationsTables</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;show create table &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$table</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$connexion</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$creationTable</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_fetch_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$listeCreationsTables</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
            <span style="color: #009900;">&#123;</span>
              <span style="color: #000088;">$creations</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$creationTable</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #666666; font-style: italic;">// si l'utilisateur a demandé les données ou la totale</span>
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mode</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$donnees</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT * FROM &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$table</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>
            <span style="color: #000088;">$insertions</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;-- -----------------------------<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$insertions</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;-- insertions dans la table &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$table</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$insertions</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;-- -----------------------------<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
            <span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$nuplet</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_fetch_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$donnees</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
            <span style="color: #009900;">&#123;</span>
                <span style="color: #000088;">$insertions</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;INSERT INTO &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$table</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; VALUES(&quot;</span><span style="color: #339933;">;</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: #990000;">mysql_num_fields</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$donnees</span><span style="color: #009900;">&#41;</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: #009900;">&#123;</span>
                  <span style="color: #b1b100;">if</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: #009900;">&#41;</span>
                     <span style="color: #000088;">$insertions</span> <span style="color: #339933;">.=</span>  <span style="color: #0000ff;">&quot;, &quot;</span><span style="color: #339933;">;</span>
                  <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">mysql_field_type</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$donnees</span><span style="color: #339933;">,</span> <span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;string&quot;</span> <span style="color: #339933;">||</span> <span style="color: #990000;">mysql_field_type</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$donnees</span><span style="color: #339933;">,</span> <span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;blob&quot;</span><span style="color: #009900;">&#41;</span>
                     <span style="color: #000088;">$insertions</span> <span style="color: #339933;">.=</span>  <span style="color: #0000ff;">&quot;'&quot;</span><span style="color: #339933;">;</span>
                  <span style="color: #000088;">$insertions</span> <span style="color: #339933;">.=</span> <span style="color: #990000;">addslashes</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$nuplet</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</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: #990000;">mysql_field_type</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$donnees</span><span style="color: #339933;">,</span> <span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;string&quot;</span> <span style="color: #339933;">||</span> <span style="color: #990000;">mysql_field_type</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$donnees</span><span style="color: #339933;">,</span> <span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;blob&quot;</span><span style="color: #009900;">&#41;</span>
                    <span style="color: #000088;">$insertions</span> <span style="color: #339933;">.=</span>  <span style="color: #0000ff;">&quot;'&quot;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
                <span style="color: #000088;">$insertions</span> <span style="color: #339933;">.=</span>  <span style="color: #0000ff;">&quot;);<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
            <span style="color: #000088;">$insertions</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #990000;">mysql_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$connexion</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
 	<span style="color: #000088;">$name</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;backup/sauv-<span style="color: #006699; font-weight: bold;">$base</span>-&quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Y-M-d&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;.sql&quot;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$fichierDump</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$name</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;wb&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">fwrite</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fichierDump</span><span style="color: #339933;">,</span> <span style="color: #000088;">$entete</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">fwrite</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fichierDump</span><span style="color: #339933;">,</span> <span style="color: #000088;">$creations</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">fwrite</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fichierDump</span><span style="color: #339933;">,</span> <span style="color: #000088;">$insertions</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fichierDump</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.tipstf.com/sauvegarder-votre-base-de-donnees-mysql-dans-un-fichier-sql-dumpmysql/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fonction PHP pour créer un &#8216;slug&#8217;, un identifiant URL-friendly</title>
		<link>http://www.tipstf.com/fonction-php-pour-creer-un-slug-un-identifiant-url-friendly</link>
		<comments>http://www.tipstf.com/fonction-php-pour-creer-un-slug-un-identifiant-url-friendly#comments</comments>
		<pubDate>Sun, 31 Jul 2011 16:00:59 +0000</pubDate>
		<dc:creator>julien</dc:creator>
				<category><![CDATA[Webdev]]></category>
		<category><![CDATA[fonctions]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[slug]]></category>
		<category><![CDATA[snippet]]></category>
		<category><![CDATA[url-friendly]]></category>

		<guid isPermaLink="false">http://www.tipstf.com/?p=20</guid>
		<description><![CDATA[Je parlais il n&#8217;y a pas longtemps des slugs dans WordPress et comment coder une fonction get_the_slug(). Il s&#8217;agit d&#8217;un identifiant URL-firiendly. L&#8217;idée est de le passer en argument dans l&#8217;adresse et d&#8217;écrire ensuite une rêgle pour la réécriture URL. &#8230; <a href="http://www.tipstf.com/fonction-php-pour-creer-un-slug-un-identifiant-url-friendly">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Je parlais il n&#8217;y a pas longtemps des slugs dans WordPress et comment <a href="http://www.tipstf.com/wordpress-obtenir-le-slug-dun-post-get_the_slug">coder une fonction get_the_slug()</a>. Il s&#8217;agit d&#8217;un identifiant URL-firiendly. L&#8217;idée est de le passer en argument dans l&#8217;adresse et d&#8217;écrire ensuite une rêgle pour la réécriture URL.</p>
<p>Je vous propose donc une fonction <a href="http://www.tipstf.com/category/php"target="_self"title="Voir tous les articles sur PHP" >PHP</a> qui crée facilement un slug à partir d&#8217;une chaine de caractères.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> generate_slug<span style="color: #009900;">&#40;</span><span style="color: #000088;">$str</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$maxlen</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">42</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">//Modifier la taille max du slug ici</span>
	<span style="color: #000088;">$slug</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strtolower</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$str</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$slug</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/[^a-z0-9\s-]/&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$slug</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$slug</span> <span style="color: #339933;">=</span> <span style="color: #990000;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/[\s-]+/&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$slug</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$slug</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/\s/&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;-&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$slug</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$slug</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Voici quelques exemples:</p>
<ol>
<li>CecI EST un %^%$&amp; &amp;%&amp; TITRE COMplexe^$)^*)&amp;</li>
<ol>
<li>ceci-est-un-titre-complexe</li>
</ol>
<li>brochure-tarifs-offres-mobile.pdf</li>
<ol>
<li>brochure-tarifs-offres-mobilepdf</li>
</ol>
<li>&lt;title&gt;Untitled Document&lt;/title&gt;</li>
<ol>
<li>titleuntitled-documenttitle</li>
</ol>
</ol>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tipstf.com/fonction-php-pour-creer-un-slug-un-identifiant-url-friendly/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress: obtenir le slug d&#8217;un post &#8211; get_the_slug()</title>
		<link>http://www.tipstf.com/wordpress-obtenir-le-slug-dun-post-get_the_slug</link>
		<comments>http://www.tipstf.com/wordpress-obtenir-le-slug-dun-post-get_the_slug#comments</comments>
		<pubDate>Sun, 31 Jul 2011 15:35:07 +0000</pubDate>
		<dc:creator>julien</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[slug]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.tipstf.com/?p=17</guid>
		<description><![CDATA[Dans WordPress tous les posts ont un slug unique. Un slug est tout simplement un nom utilisable dans les adresses (url-friendly). Pandant le developpement de votre thème, vous aurez peut-être besoin d&#8217;une fonction comme the_slug() ou bien get_the_slug(). Voici deux &#8230; <a href="http://www.tipstf.com/wordpress-obtenir-le-slug-dun-post-get_the_slug">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Dans WordPress <em>tous les posts ont un slug</em> unique. Un slug est tout simplement un nom utilisable dans les adresses (<em>url-friendly</em>).</p>
<p>Pandant le developpement de votre thème, vous aurez peut-être besoin d&#8217;une fonction comme <em><strong>the_slug()</strong></em> ou bien <em><strong>get_the_slug()</strong></em>.</p>
<p>Voici deux manières de coder ces fonctions. D&#8217;abors la traditionnelle avec les tableaux <a href="http://www.tipstf.com/category/php"target="_self"title="Voir tous les articles sur PHP" >PHP</a>:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$post_data</span> <span style="color: #339933;">=</span> get_post<span style="color: #009900;">&#40;</span><span style="color: #000088;">$postID</span><span style="color: #339933;">,</span> ARRAY_A<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$slug</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$post_data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'post_name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Et une méthode plutôt efficace proposée par <a href="http://www.joshstauffer.com/get-post-slug-in-wordpress/">Josh Staufer</a> utilisant <strong><em>permalink()</em></strong> et la fonction PHP <em>basename()</em>. C&#8217;est personellement celle que j&#8217;utilise.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$slug</span> <span style="color: #339933;">=</span> <span style="color: #990000;">basename</span><span style="color: #009900;">&#40;</span>get_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h2>Snippet pour créer the_slug()</h2>
<p>Sur le site snipplr.com vous pouvez trouver une fonction interessante qui permet de créer &#8216;<em><strong>the_slug()</strong></em>&#8216;. Tout ce dont vous avez besoin c&#8217;est copier le code suivant dans votre <em>functions.php</em>.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> the_slug<span style="color: #009900;">&#40;</span><span style="color: #000088;">$postID</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</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;">$post</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$postID</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$postID</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">&quot;&quot;</span> <span style="color: #009900;">&#41;</span> ? <span style="color: #000088;">$postID</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>ID<span style="color: #339933;">;</span>
	<span style="color: #000088;">$post_data</span> <span style="color: #339933;">=</span> get_post<span style="color: #009900;">&#40;</span><span style="color: #000088;">$postID</span><span style="color: #339933;">,</span> ARRAY_A<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$slug</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$post_data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'post_name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">return</span> <span style="color: #000088;">$slug</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Cette fonction est extrêmement efficace parce qu&#8217;elle permet l&#8217;utilisation de paramêtres, mais pas systématiquement.</p>
<ol>
<li>Dans votre boucle, affichez le slug du post courant: &lt;?php echo the_slug(); ?&gt;</li>
<li>Partout, affichez le slug d&#8217;un post particulier: &lt;?php echo the_slug(&#8217;23&#8242;); ?&gt;</li>
<li>Partout, récupérez la variable: &lt;?php $slug = the_slug(&#8217;23&#8242;); ?&gt;</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.tipstf.com/wordpress-obtenir-le-slug-dun-post-get_the_slug/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Itinéraire: un formulaire pour trouver la direction avec Google Map</title>
		<link>http://www.tipstf.com/itineraire-formulaire-trouver-direction-google-map</link>
		<comments>http://www.tipstf.com/itineraire-formulaire-trouver-direction-google-map#comments</comments>
		<pubDate>Mon, 14 Mar 2011 04:23:11 +0000</pubDate>
		<dc:creator>julien</dc:creator>
				<category><![CDATA[Webdev]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[formulaire]]></category>
		<category><![CDATA[gmaps]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[google maps]]></category>

		<guid isPermaLink="false">http://www.tipstf.com/?p=13</guid>
		<description><![CDATA[Fournissez un itinéraire personnalisé à vos clients. Dans votre page de contact vous affichez surement votre adresse et une carte Google Maps pour trouver le chemin. Avec ce formulaire vous donnez la possibilité de trouver un itinéraire depuis chez eux jusqu&#8217;à chez vous. &#8230; <a href="http://www.tipstf.com/itineraire-formulaire-trouver-direction-google-map">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>Fournissez un itinéraire personnalisé à vos clients.</strong></p>
<p>Dans votre page de contact vous affichez surement votre adresse et une carte Google Maps pour trouver le chemin. Avec ce formulaire vous donnez la possibilité de trouver un itinéraire depuis chez eux jusqu&#8217;à chez vous.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&nbsp;
&lt;form action=&quot;http://maps.google.com/maps&quot; method=&quot;get&quot;&gt;&lt;label for=&quot;saddr&quot;&gt;Enter your location&lt;/label&gt;
&lt;input type=&quot;text&quot; name=&quot;saddr&quot; /&gt; &lt;input type=&quot;hidden&quot; name=&quot;daddr&quot; value=&quot;City University of Hong Kong, Tat Chee Ave, ??, Hong-Kong&quot; /&gt; &lt;input type=&quot;submit&quot; value=&quot;Get directions&quot; /&gt;
&nbsp;
&lt;/form&gt;</pre></div></div>

<h3>Paramètres</h3>
<p><strong>saddr </strong>= Le point de départ de votre itinéraire</p>
<p><strong>daddr </strong>= Le point d&#8217;arrivé. Dans notre exemple on code en dur notre adresse (j&#8217;utilise l&#8217;adresse de mon université pour cet exemple)</p>
<h3>Demo</h3>
<form action="http://maps.google.com/maps" method="get"><label for="saddr">Enter your location</label> <br />
<input type="text" name="saddr" />
<input type="hidden" name="daddr" value="達之路, 香港, Hong Kong (City University of Hong Kong Department of Computer Science)" />
<input type="submit" value="Get directions" /></form>
]]></content:encoded>
			<wfw:commentRss>http://www.tipstf.com/itineraire-formulaire-trouver-direction-google-map/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ajouter de nouveau éléments dans le menu contextuel &#171;&#160;Nouveau&#160;&#187;</title>
		<link>http://www.tipstf.com/ajouter-de-nouveau-elements-dans-le-menu-contextuel-nouveau</link>
		<comments>http://www.tipstf.com/ajouter-de-nouveau-elements-dans-le-menu-contextuel-nouveau#comments</comments>
		<pubDate>Wed, 09 Feb 2011 05:57:08 +0000</pubDate>
		<dc:creator>julien</dc:creator>
				<category><![CDATA[windows]]></category>
		<category><![CDATA[fichier]]></category>
		<category><![CDATA[menu contextuel]]></category>
		<category><![CDATA[productiviter]]></category>

		<guid isPermaLink="false">http://www.tipstf.com/?p=8</guid>
		<description><![CDATA[Comment ajouter &#171;&#160;nouveau fichier PHP&#160;&#187; dans le menu contextuel windows? Rassurez-vous la technique est simple même s&#8217;il est nécessaire de modifier la base de registre. Le but est de rajouter des éléments dans le menu contextuel pour arriver à resultat similaire à &#8230; <a href="http://www.tipstf.com/ajouter-de-nouveau-elements-dans-le-menu-contextuel-nouveau">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>Comment ajouter &laquo;&nbsp;nouveau fichier <a href="http://www.tipstf.com/category/php"target="_self"title="Voir tous les articles sur PHP" >PHP</a>&nbsp;&raquo; dans le menu contextuel windows?</strong></p>
<p>Rassurez-vous la technique est simple même s&#8217;il est nécessaire de modifier la base de registre.</p>
<p>Le but est de rajouter des éléments dans le menu contextuel pour arriver à resultat similaire à l&#8217;image ci-dessous. Même si cela n&#8217;a l&#8217;air de rien vous gagnerez un temps fou pour créer un fichier php ou css.</p>
<p><a href="http://www.tipstf.com/wp-content/uploads/2011/02/menu-nouveau-windows.jpg"><img class="aligncenter size-full wp-image-9" title="menu nouveau windows" src="http://www.tipstf.com/wp-content/uploads/2011/02/menu-nouveau-windows.jpg" alt="" width="627" height="317" /></a>Note: remarquez le faire du &laquo;&nbsp;firefox document&nbsp;&raquo; <img src='http://www.tipstf.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <span id="more-8"></span></p>
<h2>Ajouter un élément dans le menu &#8216;nouveau&#8217;</h2>
<ol>
<li>Ouvrir <em>regedit </em>(dans la barre de recherche du menu demarrer, rechercher &#8216;regedit&#8217;)</li>
<li>Ouvrir la classw &laquo;&nbsp;<strong>HKEY_CLASSES_ROOT</strong>&laquo;&nbsp;.</li>
<li>Rechercher l&#8217;extension de fichier que vous voulez ajouter</li>
<li>Cliquez-droit et séléctionner &laquo;&nbsp;nouveau &gt; Clé&nbsp;&raquo;, nommez la &#8216;<strong>ShellNew</strong>&#8216;</li>
<li>Sur la parti droite, cliquez-droit et séléctionnez &laquo;&nbsp;nouveau &gt; Valeur chaine&nbsp;&raquo;, donnez lui la valeur &laquo;&nbsp;<strong>NullFile</strong>&laquo;&nbsp;</li>
<li>Fermer <em>regedit</em></li>
</ol>
<p>Vous pouvez maintenant vérifier que tout a fonctionnez.</p>
<h2>Supprimer un élément dans le menu &#8216;nouveau&#8217;</h2>
<p>De la même manière, retrouver l&#8217;extension concerné et supprimez la clef ShellNew.</p>
<p>Note: Comme il faut éviter les manipulations de base de registre (surtout la suppression), je vous conseil <a href="http://www.nirsoft.net/utils/shell_menu_new.html">ce logiciel</a> qui permet simplement de <em>masquer </em>les éléments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tipstf.com/ajouter-de-nouveau-elements-dans-le-menu-contextuel-nouveau/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Comparer 2 dates en PHP simplement et rapidement</title>
		<link>http://www.tipstf.com/comparer-2-dates-en-php-simplement-et-rapidement</link>
		<comments>http://www.tipstf.com/comparer-2-dates-en-php-simplement-et-rapidement#comments</comments>
		<pubDate>Wed, 12 Jan 2011 11:46:36 +0000</pubDate>
		<dc:creator>julien</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[comparaison]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[datetime]]></category>
		<category><![CDATA[operateur]]></category>

		<guid isPermaLink="false">http://www.tipstf.com/?p=4</guid>
		<description><![CDATA[La comparation de date en PHP peut vite devenir ennuyante. Voici une solution simple qui prend 2 dates et les compare. Pour l&#8217;exemple on compare une date codé en dur avec la date du jour générée par la fonction php date(). &#8230; <a href="http://www.tipstf.com/comparer-2-dates-en-php-simplement-et-rapidement">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>La comparation de date en <a href="http://www.tipstf.com/category/php"target="_self"title="Voir tous les articles sur PHP" >PHP</a> peut vite devenir ennuyante. Voici une solution simple qui prend 2 dates et les compare. Pour l&#8217;exemple on compare une date codé en dur avec la date du jour générée par la fonction php date(). On considère qu&#8217;on utilise cette fonction pour comparer à une date d&#8217;expiration.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$now</span> <span style="color: #339933;">=</span> <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span>’Y<span style="color: #339933;">-</span>m<span style="color: #339933;">-</span>d’<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$expire</span> <span style="color: #339933;">=</span> ‘<span style="color: #cc66cc;">2012</span><span style="color: #339933;">-</span><span style="color: #208080;">01</span><span style="color: #339933;">-</span><span style="color: #208080;">01</span>′<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$now</span> <span style="color: #339933;">=</span> <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span>’Y<span style="color: #339933;">-</span>m<span style="color: #339933;">-</span>d’<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$expire</span> <span style="color: #339933;">=</span> ‘<span style="color: #cc66cc;">2012</span><span style="color: #339933;">-</span><span style="color: #208080;">01</span><span style="color: #339933;">-</span><span style="color: #208080;">01</span>′<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// format the 2 dates using DateTime</span>
<span style="color: #000088;">$now</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> DateTime<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$now</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$now</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$now</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>format<span style="color: #009900;">&#40;</span>’Ymd’<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$expire</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> DateTime<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$expire</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$expire</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$expire</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>format<span style="color: #009900;">&#40;</span>’Ymd’<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Ensuite vous pouvez comparer les deux dates en utilisant simplement les opérateurs communs.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$now</span> <span style="color: #339933;">&gt;</span> <span style="color: #000088;">$expire</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Les données n'ont pas expiré&quot;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.tipstf.com/comparer-2-dates-en-php-simplement-et-rapidement/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

