<?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>miniblog &#187; Notes Techniques</title>
	<atom:link href="http://pas-bien.net/blog/categorie/notes-techniques/feed" rel="self" type="application/rss+xml" />
	<link>http://pas-bien.net/blog</link>
	<description>encore un blog de geek</description>
	<lastBuildDate>Mon, 23 Apr 2012 21:40:42 +0000</lastBuildDate>
	<language>fr</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Mon PC se réveille tout seul à 3h du matin</title>
		<link>http://pas-bien.net/blog/2011/05/17/mon-pc-se-reveille-tout-seul-a-3h-du-matin-497</link>
		<comments>http://pas-bien.net/blog/2011/05/17/mon-pc-se-reveille-tout-seul-a-3h-du-matin-497#comments</comments>
		<pubDate>Tue, 17 May 2011 20:07:12 +0000</pubDate>
		<dc:creator>mini</dc:creator>
				<category><![CDATA[Notes Techniques]]></category>
		<category><![CDATA[3h]]></category>
		<category><![CDATA[seven]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[veille]]></category>
		<category><![CDATA[veille prolongée]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[windows 7]]></category>
		<category><![CDATA[windows update]]></category>

		<guid isPermaLink="false">http://pas-bien.net/blog/?p=497</guid>
		<description><![CDATA[Quand je mettais mon PC en veille prolongée, il se réveillait souvent à 3h du matin pour faire les mises à jours Windows Update (le con&#8230;). J&#8217;ai un peu galéré ]]></description>
			<content:encoded><![CDATA[<p>Quand je mettais mon PC en veille prolongée, il se réveillait souvent à 3h du matin pour faire les mises à jours Windows Update (le con&#8230;).</p>
<p>J&#8217;ai un peu galéré à trouver comment le désactiver mais maintenant que j&#8217;ai trouvé, je vais vous partager la solution.<a href="http://pas-bien.net/blog/wp-content/uploads/2011/05/002.png"></a></p>
<p><a href="http://pas-bien.net/blog/wp-content/uploads/2011/05/000.png"><img class="aligncenter size-medium wp-image-502" title="Mise à jour auto (1)" src="http://pas-bien.net/blog/wp-content/uploads/2011/05/000-300x243.png" alt="" width="300" height="243" /></a></p>
<p><a href="http://pas-bien.net/blog/wp-content/uploads/2011/05/001.png"><img class="aligncenter size-medium wp-image-499" title="Mise à jour auto (2)" src="http://pas-bien.net/blog/wp-content/uploads/2011/05/001-300x216.png" alt="" width="300" height="216" /></a></p>
<p><a href="http://pas-bien.net/blog/wp-content/uploads/2011/05/002.png"><img class="aligncenter size-medium wp-image-500" title="Mise à jour auto (3)" src="http://pas-bien.net/blog/wp-content/uploads/2011/05/002-279x300.png" alt="" width="279" height="300" /></a></p>
<p>Et voila&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://pas-bien.net/blog/2011/05/17/mon-pc-se-reveille-tout-seul-a-3h-du-matin-497/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Problème de boot BackTrack 4 R2 sur une clef USB</title>
		<link>http://pas-bien.net/blog/2010/12/31/probleme-de-boot-backtrack-4-r2-sur-une-clef-usb-325</link>
		<comments>http://pas-bien.net/blog/2010/12/31/probleme-de-boot-backtrack-4-r2-sur-une-clef-usb-325#comments</comments>
		<pubDate>Fri, 31 Dec 2010 12:16:01 +0000</pubDate>
		<dc:creator>mini</dc:creator>
				<category><![CDATA[Notes Techniques]]></category>
		<category><![CDATA[backtrack]]></category>
		<category><![CDATA[boot]]></category>
		<category><![CDATA[cle]]></category>
		<category><![CDATA[clef]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[syslinux]]></category>
		<category><![CDATA[unetbootin]]></category>
		<category><![CDATA[usb]]></category>

		<guid isPermaLink="false">http://pas-bien.net/blog/?p=325</guid>
		<description><![CDATA[Pour récupérer des données sur un PC dont le Windows XP était HS, j&#8217;ai voulu le booter sur BackTrack 4 R2 avec une clef USB. La clef en question est ]]></description>
			<content:encoded><![CDATA[<p>Pour récupérer des données sur un PC dont le Windows XP était HS, j&#8217;ai voulu le booter sur BackTrack 4 R2 avec une clef USB. La clef en question est une <a href="http://www.pny.fr/products.php?section=product&amp;categoryid=6&amp;subcategoryid=124&amp;productid=370">PNY Attaché™ 8GB</a>.</p>
<p style="text-align: left;"><a href="http://pas-bien.net/blog/wp-content/uploads/2010/12/41pN6KLLIYL._AA1017_.jpg"><img class="size-full wp-image-327 aligncenter" title="PNY Attaché™ 8GB" src="http://pas-bien.net/blog/wp-content/uploads/2010/12/41pN6KLLIYL._AA1017_.jpg" alt="" width="192" height="90" /></a>J&#8217;ai vite eu un problème assez fatiguant car au moment de démarrer j&#8217;avais ce message :</p>
<pre>SYSLINUX 3.86 2010-04-01 CBIO Copyright (C) 1994-2010 H. Peter Anvin et al
No DEFAULT or UI configuration directive found!
boot:</pre>
<p>Et j&#8217;ai perdu deux jours sur ce problème alors que j&#8217;avais trouvé la solution assez rapidement sur un forum&#8230; Formater la clef en Fat16.</p>
<p>La marche à suivre pour Windows -puisque je n&#8217;avais que ça sous la main- est la suivante :</p>
<ol>
<li>Télécharger <a href="http://unetbootin.sourceforge.net/">UNetbootin</a>.</li>
<li>Télécharger l&#8217;ISO de <a href="http://www.backtrack-linux.org/downloads/">BackTrack</a>.</li>
<li>Télécharger un gestionnaire de partitions. J&#8217;ai découvert pour l&#8217;occasion <a href="http://www.partition-tool.com/personal.htm">EASUS Partition Master</a> (Home Edition) qui est gratuit pour un usage personnel et qui fait très bien tout ce que fait Partition Magic.</li>
<li>Avec le gestionnaire de partitions, supprimer la/les partition(s) de la clef puis en créer une avec les caractéristiques suivantes :<br />
- Taille : ~2000 Mo<br />
- Taille des clusters : 32k<br />
- Système de fichiers : Fat16<br />
- Type : Primaire (important, j&#8217;explique pourquoi après)<br />
- Espace avant : 0 Mo</p>
<div id="attachment_432" class="wp-caption aligncenter" style="width: 310px"><a href="http://pas-bien.net/blog/wp-content/uploads/2010/12/format-01.png"><img class="size-medium wp-image-432" title="format-01" src="http://pas-bien.net/blog/wp-content/uploads/2010/12/format-01-300x262.png" alt="" width="300" height="262" /></a><p class="wp-caption-text">Formatage étape 1</p></div>
<p><div id="attachment_433" class="wp-caption aligncenter" style="width: 310px"><a href="http://pas-bien.net/blog/wp-content/uploads/2010/12/format-02.png"><img class="size-medium wp-image-433" title="format-02" src="http://pas-bien.net/blog/wp-content/uploads/2010/12/format-02-300x147.png" alt="" width="300" height="147" /></a><p class="wp-caption-text">Formatage étape 2</p></div></li>
<li>Installer simplement l&#8217;ISO avec UNetbootin.</li>
<li>Démarrer sur la clef en ayant bien sur vérifié que la configuration du BIOS le permettait.</li>
</ol>
<p>La raison pour laquelle j&#8217;ai perdu autant de temps c&#8217;est qu&#8217;à un moment lors de mes tests j&#8217;ai tout bien fait mis à part que j&#8217;avais créé une partition logique au lieu d&#8217;une partition primaire, c&#8217;était l&#8217;option par défaut dans EASUS Partition Master. Du coup au moment de démarrer j&#8217;ai eu le message d&#8217;erreur :</p>
<pre>Boot error</pre>
<p>Donc tout marche bien maintenant. J&#8217;ai même pu jouer au &laquo;&nbsp;script-kiddie&nbsp;&raquo; en craquant mon wifi avec <a href="http://code.google.com/p/wifite/wiki/Main_French">Wifite</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://pas-bien.net/blog/2010/12/31/probleme-de-boot-backtrack-4-r2-sur-une-clef-usb-325/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Installer gratuitement SubDownloader sur Windows</title>
		<link>http://pas-bien.net/blog/2010/11/14/installer-gratuitement-subdownloader-sur-windows-304</link>
		<comments>http://pas-bien.net/blog/2010/11/14/installer-gratuitement-subdownloader-sur-windows-304#comments</comments>
		<pubDate>Sun, 14 Nov 2010 16:12:04 +0000</pubDate>
		<dc:creator>mini</dc:creator>
				<category><![CDATA[Notes Techniques]]></category>
		<category><![CDATA[caption]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[sous titre]]></category>
		<category><![CDATA[sous titres]]></category>
		<category><![CDATA[subdownloader]]></category>
		<category><![CDATA[subtitles]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://pas-bien.net/blog/?p=304</guid>
		<description><![CDATA[SubDownloader est un programme très pratique qui permet de trouver les fichiers de sous-titres qui vont avec un fichier vidéo. Le problème est que la version pour Windows est payante ]]></description>
			<content:encoded><![CDATA[<p><a href="http://subdownloader.net/">SubDownloader</a> est un programme très pratique qui permet de trouver les fichiers de sous-titres qui vont avec un fichier vidéo. Le problème est que la version pour Windows est payante (il me semble à cause d&#8217;un problème de licence). Mais il n&#8217;est pas difficile de faire tourner la version libre à partir des sources.</p>
<p>Voici la marche à suivre pour installer gratuitement ce programme sur Windows :</p>
<ol>
<li>Télécharger et installer Python 2.6 (<a href="http://www.python.org/download/releases/2.6.6/">disponible ici</a>).<br />
Les version 2.7 et 3.1 n&#8217;ont jamais marché chez moi.</li>
<li>Télécharger et installer PyQt4 pour Windows et Python 2.6 (<a href="http://www.riverbankcomputing.co.uk/software/pyqt/download">disponible ici</a>).</li>
<li>Télécharger les sources de la dernière version de SubDownloader (<a href="https://launchpad.net/subdownloader/trunk/2.0.14">disponibles ici</a>). Et décompresser l&#8217;archive dans le dossier de votre choix (ex: C:\Program Files\subdownloader\).</li>
<li>Créer un raccourci avec la cible suivante :
<pre>"C:\Python26\pythonw.exe" "C:\Program Files\subdownloader\run.py"</pre>
<p>Démarrer dans :</p>
<pre>C:\Program Files\subdownloader\</pre>
<p>Et en plus on peut mettre l&#8217;icône qui va bien :</p>
<pre>C:\Program Files\subdownloader\gui\images\icon32.ico</pre>
<p>Et pour finir enregistrer le raccourci.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://pas-bien.net/blog/2010/11/14/installer-gratuitement-subdownloader-sur-windows-304/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows 7 sur un Dell Latitude D400</title>
		<link>http://pas-bien.net/blog/2010/11/13/windows-7-sur-un-dell-latitude-d400-299</link>
		<comments>http://pas-bien.net/blog/2010/11/13/windows-7-sur-un-dell-latitude-d400-299#comments</comments>
		<pubDate>Sat, 13 Nov 2010 17:34:25 +0000</pubDate>
		<dc:creator>mini</dc:creator>
				<category><![CDATA[Notes Techniques]]></category>

		<guid isPermaLink="false">http://pas-bien.net/blog/?p=299</guid>
		<description><![CDATA[Une migration facile Je viens d&#8217;installer Windows 7 sur mon vieux Dell Latitude D400 acheté d&#8217;occasion sur eBay. Et le passage de Windows XP à Windows 7 s&#8217;est plutôt bien ]]></description>
			<content:encoded><![CDATA[<p><!--:fr--><br />
<h2>Une migration facile</h2>
<p>Je viens d&#8217;installer Windows 7 sur mon vieux Dell Latitude D400 acheté d&#8217;occasion sur eBay. Et le passage de Windows XP à Windows 7 s&#8217;est plutôt bien passé !</p>
<p>Mon premier problème a été qu&#8217;il n&#8217;y a pas de lecteur optique sur ce portable, il m&#8217;a donc fallu de trouver l&#8217;ISO de mon DVD (<a href="http://www.mydigitallife.info/2009/11/10/windows-7-iso-x86-and-x64-official-direct-download-links-ultimate-professional-and-home-premium/">dispo ici</a>) pour pouvoir la copier sur une clef USB <a href="http://store.microsoft.com/help/iso-tool">avec l&#8217;utilitaire de que Microsoft fourni</a>.</p>
<p>Au final juste deux problèmes de drivers :</p>
<ul>
<li>La carte graphique (je m&#8217;y attendais);</li>
<li>Le touchpad (je m&#8217;y attendais moins).</li>
</ul>
<p>Pour le reste tout est bien reconnu par le système (sauf peut être la sortie VGA mais je ne m&#8217;en sers pas). Le PC tourne aussi bien qu&#8217;avant par contre il n&#8217;est pas assez puissant pour faire marcher Aero.</p>
<h2>Driver de la carte graphique</h2>
<p>Pour le problème de carte graphique, j&#8217;ai installé le driver fourni par Dell pour Windows XP (<a href="http://support.euro.dell.com/support/downloads/download.aspx?c=fr&amp;cs=frdhs1&amp;l=fr&amp;s=dhs&amp;releaseid=R111509&amp;SystemID=LAT_PNT_PM_D400&amp;servicetag=&amp;os=WW1&amp;osl=fr&amp;deviceid=3110&amp;devlib=0&amp;typecnt=0&amp;vercnt=9&amp;catid=-1&amp;impid=-1&amp;formatcnt=0&amp;libid=6&amp;typeid=-1&amp;dateid=-1&amp;formatid=-1&amp;source=-1&amp;fileid=145641">dispo ici</a>). Une fois le driver téléchargé et extrait, il faut modifier les propriétés du fichier &laquo;&nbsp;Setup.exe&nbsp;&raquo; pour lui donner la rétro-compatibilité avec Windows XP SP3. Après il suffit de lancer l&#8217;installeur et de redémarrer. Et voilà, fini le 640&#215;480.</p>
<h2>Driver pour le touchpad</h2>
<p>Le touchpad marche bien par défaut sauf qu&#8217;il manque quelques fonctionnalités bien pratiques :</p>
<ul>
<li>le clic du milieu en appuyant sur les deux boutons;</li>
<li>le scroll en effleurant les bords du touchpad.</li>
</ul>
<p>J&#8217;ai en premier tenté d&#8217;installer le vieux driver fourni par Dell. Mais en plus d&#8217;avoir eu un message d&#8217;avertissement de Windows comme quoi le programme créait des problèmes, j&#8217;ai toujours pas de clic du milieu&#8230;</p>
<p>Donc j&#8217;ai fait comme j&#8217;ai lu quelque part sur un forum : installer un driver plus récent (comme <a href="http://uk.computers.toshiba-europe.com/innovation/download_driver_details.jsp?service=UK&amp;selCategory=2&amp;selFamily=4&amp;selSeries=243&amp;selProduct=821&amp;selShortMod=798&amp;language=13&amp;selOS=null&amp;selType=null&amp;yearupload=&amp;monthupload=&amp;dayupload=&amp;useDate=null&amp;mode=allMachines&amp;search=&amp;action=search&amp;macId=&amp;country=8&amp;selectedLanguage=13&amp;type=null&amp;page=10&amp;ID=65296&amp;OSID=26&amp;driverLanguage=42">celui là</a>) que l&#8217;ont peut trouver sur le site de Toshiba aussi pour des touchpad Alps mais bien sûr pour des portable de Toshiba.</p>
<p>Et ça marche nickel !</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 81px; width: 1px; height: 1px; overflow: hidden;">
<h2>http://support.euro.dell.com/support/downloads/download.aspx?c=fr&amp;cs=frdhs1&amp;l=fr&amp;s=dhs&amp;releaseid=R111509&amp;SystemID=LAT_PNT_PM_D400&amp;servicetag=&amp;os=WW1&amp;osl=fr&amp;deviceid=3110&amp;devlib=0&amp;typecnt=0&amp;vercnt=9&amp;catid=-1&amp;impid=-1&amp;formatcnt=0&amp;libid=6&amp;typeid=-1&amp;dateid=-1&amp;formatid=-1&amp;source=-1&amp;fileid=145641</h2>
</div>
<p><!--:--></p>
]]></content:encoded>
			<wfw:commentRss>http://pas-bien.net/blog/2010/11/13/windows-7-sur-un-dell-latitude-d400-299/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Démonter un Toshiba Satellite A200-13M</title>
		<link>http://pas-bien.net/blog/2010/10/23/demonter-un-toshiba-satellite-a200-13m-253</link>
		<comments>http://pas-bien.net/blog/2010/10/23/demonter-un-toshiba-satellite-a200-13m-253#comments</comments>
		<pubDate>Sat, 23 Oct 2010 01:26:56 +0000</pubDate>
		<dc:creator>mini</dc:creator>
				<category><![CDATA[Notes Techniques]]></category>
		<category><![CDATA[a200]]></category>
		<category><![CDATA[a200-13m]]></category>
		<category><![CDATA[démonter]]></category>
		<category><![CDATA[disassemble]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[satellite]]></category>
		<category><![CDATA[toshiba]]></category>

		<guid isPermaLink="false">http://pas-bien.net/blog/?p=253</guid>
		<description><![CDATA[Voici la marche à suivre pour atteindre la carte mère d&#8217;un Toshiba Satellite A200-13M. Cette opération risque d&#8217;endommager votre ordinateur. La garantie sera annulée. Ne procédez que si vous savez ]]></description>
			<content:encoded><![CDATA[<p><!--:fr-->Voici la marche à suivre pour atteindre la carte mère d&#8217;un Toshiba Satellite A200-13M.</p>
<p><a href="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-001.jpg"><img class="size-medium wp-image-262 aligncenter" title="Toshiba 001" src="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-001-270x300.jpg" alt="" width="270" height="300" /></a></p>
<p><p style="border-top: 2px solid rgb(255, 211, 36); border-bottom: 2px solid rgb(255, 211, 36); padding: 5px 20px 5px 45px; background: rgb(255, 246, 191) url(http://pas-bien.net/blog/wp-content/plugins/NiceWeb2CSS/icon/alert.gif) no-repeat scroll 15px 50%; text-align: left; color: rgb(153, 102, 102);"><strong>Cette opération risque d&#8217;endommager votre ordinateur.<br />
La garantie sera annulée.<br />
Ne procédez que si vous savez ce que vous faites.<br />
Utilisez des outils adaptés.</strong></p></p>
<p>1. Mettre le PC à l&#8217;envers.</p>
<p><a href="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-002.jpg"><img class="size-medium wp-image-263 alignnone" style="border: 1px solid black;" title="toshiba-a200-13m-002" src="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-002-300x199.jpg" alt="" width="300" height="199" /></a></p>
<p>2. Retirer la batterie.</p>
<p><a href="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-003.jpg"><img class="size-medium wp-image-264" style="border: 1px solid black;" title="Toshiba 002" src="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-003-300x199.jpg" alt="" width="300" height="199" /></a></p>
<p>3. Démonter le panneau qui cache rien.</p>
<p><a href="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-004.jpg"><img class="size-medium wp-image-265" style="border: 1px solid black;" title="toshiba-a200-13m-004" src="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-004-300x199.jpg" alt="" width="300" height="199" /></a></p>
<p>4. Retirer toutes les vis marquées &laquo;&nbsp;F8&#8243;.</p>
<p><a href="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-005.jpg"><img class="size-medium wp-image-266" style="border: 1px solid black;" title="toshiba-a200-13m-005" src="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-005-300x199.jpg" alt="" width="300" height="199" /></a></p>
<p>5. Démonter le panneau qui cache le disque dur.</p>
<p><a href="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-006.jpg"><img class="size-medium wp-image-267" style="border: 1px solid black;" title="toshiba-a200-13m-006" src="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-006-300x199.jpg" alt="" width="300" height="199" /></a></p>
<p>6. Enlever le disque dur en le faisant glisser par la gauche.</p>
<p><a href="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-007.jpg"><img class="size-medium wp-image-268" style="border: 1px solid black;" title="toshiba-a200-13m-007" src="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-007-300x199.jpg" alt="" width="300" height="199" /></a></p>
<p>7. Ouvrir le panneau qui cache la RAM.</p>
<p><a href="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-008.jpg"><img class="size-medium wp-image-269" style="border: 1px solid black;" title="toshiba-a200-13m-008" src="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-008-300x199.jpg" alt="" width="300" height="199" /></a></p>
<p>8. Enlever les 3 petites vis qui dans le fond de l&#8217;emplacement de la batterie et celle à côté de l&#8217;emplacement des RAM.</p>
<p><a href="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-010.jpg"><img class="size-medium wp-image-271" style="border: 1px solid black;" title="toshiba-a200-13m-010" src="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-010-300x199.jpg" alt="" width="300" height="199" /></a></p>
<p>9. Enlever les barrettes de RAM.</p>
<p><a href="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-009.jpg"><img class="size-medium wp-image-270" style="border: 1px solid black;" title="toshiba-a200-13m-009" src="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-009-300x199.jpg" alt="" width="300" height="199" /></a></p>
<p>10. Ouvrir le tiroir du lecteur DVD puis tirer dessus pour sortir le lecteur (important pour la suite).</p>
<p><a href="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-011.jpg"><img class="size-medium wp-image-272" style="border: 1px solid black;" title="toshiba-a200-13m-011" src="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-011-300x199.jpg" alt="" width="300" height="199" /></a></p>
<p>11. Mettre le PC à l&#8217;endroit.</p>
<p><a href="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-012.jpg"><img class="size-medium wp-image-273" style="border: 1px solid black;" title="toshiba-a200-13m-012" src="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-012-300x199.jpg" alt="" width="300" height="199" /></a></p>
<p>12. Enlever la barrette au dessus du clavier en la tirant en commençant par la droite.</p>
<p>Retirer les deux vis en haut du clavier.</p>
<p>Défaire le clavier et faisant attention à ne pas abimer la fiche qui le connecte.</p>
<p><a href="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-013.jpg"><img class="size-medium wp-image-274" style="border: 1px solid black;" title="toshiba-a200-13m-013" src="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-013-300x199.jpg" alt="" width="300" height="199" /></a></p>
<p>13. Défaire les fiches encadrées en rouge.</p>
<p><a href="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-014.jpg"><img class="size-medium wp-image-275" style="border: 1px solid black;" title="toshiba-a200-13m-014" src="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-014-300x199.jpg" alt="" width="300" height="199" /></a></p>
<p>14. Démonter ce qui doit être la carte wifi.</p>
<p>Défaire la fiche du pavé tactile qui est maintenant accessible.</p>
<p>Ainsi que les 4 vis marquées &laquo;&nbsp;F8&#8243;.</p>
<p><a href="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-021.jpg"><img class="size-medium wp-image-282" style="border: 1px solid black;" title="toshiba-a200-13m-021" src="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-021-300x199.jpg" alt="" width="300" height="199" /></a></p>
<p>15. Enlever le panneau supérieur en le déclipsant délicatement tout autour.</p>
<p>Ceci n&#8217;est possible que si le lecteur DVD a été retiré.</p>
<p><a href="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-023.jpg"><img class="size-medium wp-image-285" style="border: 1px solid black;" title="toshiba-a200-13m-023" src="http://pas-bien.net/blog/wp-content/uploads/2010/10/toshiba-a200-13m-023-300x199.jpg" alt="" width="300" height="199" /></a></p>
<p>Et voila !<!--:--></p>
]]></content:encoded>
			<wfw:commentRss>http://pas-bien.net/blog/2010/10/23/demonter-un-toshiba-satellite-a200-13m-253/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Comment récupérer le lien &#171;&#160;Edit with Gimp&#160;&#187;</title>
		<link>http://pas-bien.net/blog/2010/10/23/comment-recuperer-le-lien-edit-with-gimp-257</link>
		<comments>http://pas-bien.net/blog/2010/10/23/comment-recuperer-le-lien-edit-with-gimp-257#comments</comments>
		<pubDate>Fri, 22 Oct 2010 23:53:52 +0000</pubDate>
		<dc:creator>mini</dc:creator>
				<category><![CDATA[Notes Techniques]]></category>

		<guid isPermaLink="false">http://pas-bien.net/blog/?p=257</guid>
		<description><![CDATA[A l&#8217;aide de cet article, j&#8217;ai fait un fichier d&#8217;édition du registre pour avoir l&#8217;élément &#171;&#160;Edit with Gimp&#160;&#187; dans le menu du clic droit d&#8217;une image : Voici le contenu du ]]></description>
			<content:encoded><![CDATA[<p>A l&#8217;aide de <a href="http://thoughtfulcode.wordpress.com/2010/07/21/fix-edit-with-gimp-context-menu-in-windows-7-x64/">cet article</a>, j&#8217;ai fait un fichier d&#8217;édition du registre pour avoir l&#8217;élément &laquo;&nbsp;Edit with Gimp&nbsp;&raquo; dans le menu du clic droit d&#8217;une image :</p>
<div id="attachment_258" class="wp-caption aligncenter" style="width: 370px"><a href="http://pas-bien.net/blog/wp-content/uploads/2010/10/edit-with-gimp.png"><img class="size-full wp-image-258" title="edit-with-gimp" src="http://pas-bien.net/blog/wp-content/uploads/2010/10/edit-with-gimp.png" alt="" width="360" height="252" /></a><p class="wp-caption-text">Menu &quot;Edit with Gimp&quot;</p></div>
<p>Voici le contenu du fichier .reg :</p>
<pre>Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\SystemFileAssociations\image\shell\Edit with GIMP]
@="Edit with GIMP"

[HKEY_CLASSES_ROOT\SystemFileAssociations\image\shell\Edit with GIMP\command]
@="\"C:\\Program Files\\GIMP-2.0\\bin\\gimp-2.6.exe\" \"%1\""</pre>
<p>Vous pouvez <a href="http://pas-bien.net/blog/wp-content/uploads/2010/10/gimp.reg">le télécharger ici</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://pas-bien.net/blog/2010/10/23/comment-recuperer-le-lien-edit-with-gimp-257/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox : ouvrir les nouveaux onglets en dernier</title>
		<link>http://pas-bien.net/blog/2010/01/22/firefox-ouvrir-les-onglets-en-fin-de-file-242</link>
		<comments>http://pas-bien.net/blog/2010/01/22/firefox-ouvrir-les-onglets-en-fin-de-file-242#comments</comments>
		<pubDate>Fri, 22 Jan 2010 15:57:58 +0000</pubDate>
		<dc:creator>mini</dc:creator>
				<category><![CDATA[Notes Techniques]]></category>
		<category><![CDATA[about:config]]></category>
		<category><![CDATA[dernier]]></category>
		<category><![CDATA[fin]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[onglet]]></category>
		<category><![CDATA[onglets]]></category>
		<category><![CDATA[tab]]></category>
		<category><![CDATA[tabs]]></category>

		<guid isPermaLink="false">http://pas-bien.net/blog/?p=242</guid>
		<description><![CDATA[Suite au passage en version 3.6 de Firefox, les nouveaux onglets ne s&#8217;ouvrent plus en dernière place dans la liste des onglets mais après l&#8217;onglet actif. Je ne sais pas ]]></description>
			<content:encoded><![CDATA[<p><!--:fr-->Suite au passage en version 3.6 de Firefox, les nouveaux onglets ne s&#8217;ouvrent plus en dernière place dans la liste des onglets mais après l&#8217;onglet actif. Je ne sais pas si c&#8217;est pour copier le fonctionnement de Google Chrome, mais moi j&#8217;aime pas.</p>
<p>Donc pour revenir à l&#8217;ancien comportement, il faut :</p>
<ol>
<li>Taper <strong>about:config</strong> dans la barre d&#8217;adresse d&#8217;un nouvel onglet.</li>
<li>Promettre de faire attention. <img src='http://pas-bien.net/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
<li>Chercher la valeur <strong>browser.tabs.insertRelatedAfterCurrent</strong>.</li>
<li>Et la<strong> </strong>mettre à <strong>false</strong>.</li>
</ol>
<p>Et voila ! <img src='http://pas-bien.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <!--:--></p>
]]></content:encoded>
			<wfw:commentRss>http://pas-bien.net/blog/2010/01/22/firefox-ouvrir-les-onglets-en-fin-de-file-242/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Utilisation avancée de file_get_contents (PHP)</title>
		<link>http://pas-bien.net/blog/2007/12/21/utilisation-avancee-de-file_get_contents-php-5</link>
		<comments>http://pas-bien.net/blog/2007/12/21/utilisation-avancee-de-file_get_contents-php-5#comments</comments>
		<pubDate>Fri, 21 Dec 2007 09:54:13 +0000</pubDate>
		<dc:creator>mini</dc:creator>
				<category><![CDATA[Notes Techniques]]></category>
		<category><![CDATA[authentification]]></category>
		<category><![CDATA[file_get_contents]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[proxy]]></category>

		<guid isPermaLink="false">http://pas-bien.net/blog/utilisation-avancee-de-file_get_contents-php</guid>
		<description><![CDATA[Préambule Je fais cette note technique car je me suis plus d&#8217;une fois confronté à différentes configurations pour accéder à une page Web à partir de PHP. Normalement un serveur ]]></description>
			<content:encoded><![CDATA[<h2>Préambule</h2>
<p>Je fais cette note technique car je me suis plus d&#8217;une fois confronté à différentes configurations pour accéder à une page Web à partir de PHP. Normalement un serveur Web dispose d&#8217;une connection directe à internet et n&#8217;a pas besoin d&#8217;un proxy pour y acceder. Mais si on fait des script PHP en CLI (non liès à un serveur Web) on peut se trouver confronter à différents problèmes&#8230;</p>
<h2>Cas 1 : la simplicité même</h2>
<p>Voici le cas le plus simple pour récupérer un page à partir de son URL. Dnas le cas où PHP dispose d&#8217;un accès direct à internet.</p>
<h3>HTTP</h3>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://www.google.com/&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h3>HTTPS</h3>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;https://www.google.com/&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Si il vous manque l&#8217;extension <em>open_ssl</em> vous aurez une erreur dans ce genre :</p>
<pre>Notice: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in ...\test_001.php on line 3

Warning: file_get_contents(https://www.google.com/): failed to open stream: Invalid argument in ...\test_001.php on line 3</pre>
<p>C&#8217;est aussi valable pour les cas suivants.</p>
<h2>Cas 2 : Authentification HTML</h2>
<p>Si la page est protégée par un mot de passe, PHP peut transformer une URL avec utilisateur et mot de passe pour envoyer la requête avec les bons headers.</p>
<h3>HTTP</h3>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://user:pass@www.example.com/&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h3>HTTPS</h3>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;https://user:pass@www.example.com/&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h3>Méthode alternative</h3>
<p>Vous pouvez aussi envoyer vous même les headers contenant mots de passe et utilisateur. C&#8217;est plus compliqué mais ça marche aussi.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// URL des données à récupérer</span>
<span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'http://protectedstuff.com'</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Encodage de l'autentification</span>
<span style="color: #000088;">$auth</span> <span style="color: #339933;">=</span> <span style="color: #990000;">base64_encode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'user:password'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Création des options de la requête</span>
<span style="color: #000088;">$opts</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
	<span style="color: #0000ff;">'http'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span> <span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'method'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'GET'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'header'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">&quot;Authorization: Basic <span style="color: #006699; font-weight: bold;">$auth</span>&quot;</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'https'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span> <span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'method'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'GET'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'header'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">&quot;Authorization: Basic <span style="color: #006699; font-weight: bold;">$auth</span>&quot;</span>
	<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Création du contexte de transaction</span>
<span style="color: #000088;">$ctx</span> <span style="color: #339933;">=</span> <span style="color: #990000;">stream_context_create</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$opts</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Récupération des données</span>
<span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span><span style="color: #000088;">$ctx</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Source : <a href="http://fr.php.net/manual/fr/function.stream-context-create.php#74431" target="_blank">http://fr.php.net/manual/fr/function.stream-context-create.php#74431</a></p>
<h2>Cas 3 : En passant par un proxy</h2>
<p>Il m&#8217;est arrivé d&#8217;écrire des script en PHP-CLI qui se retrouvaient bloqués par un proxy.</p>
<h3>HTTP ou HTTPS</h3>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// URL des données à récupérer</span>
<span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'https://www.google.com/'</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Création des options de la requête</span>
<span style="color: #000088;">$opts</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
	<span style="color: #0000ff;">'http'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span> <span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'proxy'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'tcp://192.168.0.99:3128'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'request_fulluri'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'https'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span> <span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'proxy'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'tcp://192.168.0.99:3128'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'request_fulluri'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span>
	<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Création du contexte de transaction</span>
<span style="color: #000088;">$ctx</span> <span style="color: #339933;">=</span> <span style="color: #990000;">stream_context_create</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$opts</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Récupération des données</span>
<span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span><span style="color: #000088;">$ctx</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h2>Cas 4 : Proxy et page avec authentification HTML</h2>
<p>Si en plus la page que vous souhaitez télécharger requière une authentification, cela reste simple.</p>
<h3>HTTP ou HTTPS</h3>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// URL des données à récupérer</span>
<span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'https://user:pass@www.example.com/'</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Création des options de la requête</span>
<span style="color: #000088;">$opts</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
	<span style="color: #0000ff;">'http'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span> <span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'proxy'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'tcp://192.168.0.99:3128'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'request_fulluri'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'https'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span> <span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'proxy'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'tcp://192.168.0.99:3128'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'request_fulluri'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span>
	<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Création du contexte de transaction</span>
<span style="color: #000088;">$ctx</span> <span style="color: #339933;">=</span> <span style="color: #990000;">stream_context_create</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$opts</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Récupération des données</span>
<span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span><span style="color: #000088;">$ctx</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h2>Cas 5 : Proxy avec authentification</h2>
<p>Dans certaines entreprises ou administration on peut se trouver derrière un proxy qui filtre les utilisateurs. Voici comment faire passer son script.</p>
<h3>HTTP ou HTTPS</h3>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// URL des données à récupérer</span>
<span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'http://www.example.com/'</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Encodage de l'autentification</span>
<span style="color: #000088;">$authProxy</span> <span style="color: #339933;">=</span> <span style="color: #990000;">base64_encode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'user:pass'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Création des options de la requête</span>
<span style="color: #000088;">$opts</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
	<span style="color: #0000ff;">'http'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span> <span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'method'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'GET'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'proxy'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'tcp://192.168.0.99:3128'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'request_fulluri'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'header'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">&quot;Proxy-Authorization: Basic <span style="color: #006699; font-weight: bold;">$authProxy</span>&quot;</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'https'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span> <span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'method'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'GET'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'proxy'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'tcp://192.168.0.99:3128'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'request_fulluri'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'header'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">&quot;Proxy-Authorization: Basic <span style="color: #006699; font-weight: bold;">$authProxy</span>&quot;</span>
	<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Création du contexte de transaction</span>
<span style="color: #000088;">$ctx</span> <span style="color: #339933;">=</span> <span style="color: #990000;">stream_context_create</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$opts</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Récupération des données</span>
<span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span><span style="color: #000088;">$ctx</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h2>Cas 6 : Proxy avec authentification et page avec authentification</h2>
<p>Voici un des cas les plus complexes lorqu&#8217;il est question de récupérer des données. J&#8217;ai rencontré ce problème lorsque j&#8217;ai fait un script pour récupérer mes logs chez OVH.</p>
<h3>HTTP ou HTTPS</h3>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// URL des données à récupérer</span>
<span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'https://user:pass@www.example.com/'</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Encodage de l'autentification</span>
<span style="color: #000088;">$authProxy</span> <span style="color: #339933;">=</span> <span style="color: #990000;">base64_encode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'user:pass'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Création des options de la requête</span>
<span style="color: #000088;">$opts</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
	<span style="color: #0000ff;">'http'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span> <span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'method'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'GET'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'proxy'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'tcp://192.168.0.99:3128'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'request_fulluri'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'header'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">&quot;Proxy-Authorization: Basic <span style="color: #006699; font-weight: bold;">$authProxy</span>&quot;</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'https'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span> <span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'method'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'GET'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'proxy'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'tcp://192.168.0.99:3128'</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'request_fulluri'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'header'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">&quot;Proxy-Authorization: Basic <span style="color: #006699; font-weight: bold;">$authProxy</span>&quot;</span>
	<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Création du contexte de transaction</span>
<span style="color: #000088;">$ctx</span> <span style="color: #339933;">=</span> <span style="color: #990000;">stream_context_create</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$opts</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Récupération des données</span>
<span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span><span style="color: #000088;">$ctx</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h2>Conclusion</h2>
<p>Les exemples présentés ne se limitent aux cas typique de récupération de pages distantes. Ces cas seront satisfaisant dans la plupart des cas. Si vous rencontrez un cas non décrit dans cet article vous trouverez peut être de l&#8217;aide <a href="http://www.php.documentation.givah.net/?p=wrappers.http.html" target="_blank">ici</a>. Et si vous avez toujours des problèmes vous pouvez me demander de l&#8217;aide dans les commentaires. <img src='http://pas-bien.net/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://pas-bien.net/blog/2007/12/21/utilisation-avancee-de-file_get_contents-php-5/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

