<?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>Rodrigo Pérez (bilson)</title> <atom:link href="http://bilson.cl/blog/feed/" rel="self" type="application/rss+xml" /><link>http://bilson.cl/blog</link> <description>blog personal</description> <lastBuildDate>Mon, 28 Dec 2009 21:15:45 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.9.2</generator> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>mod_rewrite Cheat Sheet</title><link>http://bilson.cl/blog/2009/12/mod_rewrite-cheat-sheet/</link> <comments>http://bilson.cl/blog/2009/12/mod_rewrite-cheat-sheet/#comments</comments> <pubDate>Mon, 28 Dec 2009 19:53:32 +0000</pubDate> <dc:creator>bilson</dc:creator> <category><![CDATA[apache]]></category> <category><![CDATA[mod_rewrite]]></category><guid
isPermaLink="false">http://bilson.cl/blog/?p=18</guid> <description><![CDATA[Navegando por ahí&#8230; encontré este buen resumen de lo que podemos hacer con mod_rewrite&#8230; para tener siempre a mano:
http://www.cheat-sheets.org/saved-copy/mod_rewrite_cheat_sheet.pdf
]]></description> <content:encoded><![CDATA[<p>Navegando por ahí&#8230; encontré este buen resumen de lo que podemos hacer con mod_rewrite&#8230; para tener siempre a mano:</p><p><a
href="http://www.cheat-sheets.org/saved-copy/mod_rewrite_cheat_sheet.pdf">http://www.cheat-sheets.org/saved-copy/mod_rewrite_cheat_sheet.pdf</a></p> ]]></content:encoded> <wfw:commentRss>http://bilson.cl/blog/2009/12/mod_rewrite-cheat-sheet/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Configurar Sony Ericsson MD300 de EntelPCS en Ubuntu Intrepid Ibex (Conexión 3g)</title><link>http://bilson.cl/blog/2009/02/configurar-sony-ericsson-md300-de-entelpcs-en-ubuntu-intrepid-ibex-conexion-3g/</link> <comments>http://bilson.cl/blog/2009/02/configurar-sony-ericsson-md300-de-entelpcs-en-ubuntu-intrepid-ibex-conexion-3g/#comments</comments> <pubDate>Sun, 01 Feb 2009 20:22:33 +0000</pubDate> <dc:creator>bilson</dc:creator> <category><![CDATA[Sin categoría]]></category><guid
isPermaLink="false">http://bilson.cl/blog/?p=10</guid> <description><![CDATA[
La información que aquí publico está tomada básicamente de tres partes (ubuntu-cl.org, laudecioliveira.org y ubuntu-es.org). Ha sido probado con EntelPCS en Chile, y funciona sin problemasLo primero es ayudar a udev a identificar el módem como tal, para eso necesitamos el id del dispositivo y de vendedor. Esta información la obtenemos así:sudo lsusb -v&#124;grep [...]]]></description> <content:encoded><![CDATA[<p> La información que aquí publico está tomada básicamente de tres partes (<a
href="http://foros.ubuntu-cl.org/viewtopic.php?t=4990&#038;postdays=0&#038;postorder=asc&#038;start=0">ubuntu-cl.org</a>, <a
href="http://laudecioliveira.org/blog/?p=70">laudecioliveira.org</a> y <a
href="http://www.ubuntu-es.org/index.php?q=node/94744">ubuntu-es.org</a>). Ha sido probado con EntelPCS en Chile, y funciona sin problemas <img
src='http://bilson.cl/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p><p> Lo primero es ayudar a udev a identificar el módem como tal, para eso necesitamos el id del dispositivo y de vendedor. Esta información la obtenemos así:</p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> lsusb -v<span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-i</span> vendor
&nbsp;
  idVendor           0x0fce Sony Ericsson Mobile Communications AB</pre></div></div><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> lsusb -v<span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-i</span> product
&nbsp;
  idProduct          0xd0cf 
  iProduct                <span style="color: #000000;">2</span> Sony Ericsson MD300</pre></div></div><p> Ahora creamos el archivo <em>/etc/udev/rules.d/50-md300modem.rules</em> con nuestro editor favorito:</p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;">ACTION<span style="color: #000000; font-weight: bold;">!</span>=<span style="color: #ff0000;">&quot;add&quot;</span>, <span style="color: #007800;">GOTO</span>=<span style="color: #ff0000;">&quot;3G_End&quot;</span>
<span style="color: #007800;">BUS</span>==<span style="color: #ff0000;">&quot;usb&quot;</span>, SYSFS<span style="color: #7a0874; font-weight: bold;">&#123;</span>idProduct<span style="color: #7a0874; font-weight: bold;">&#125;</span>==<span style="color: #ff0000;">&quot;d0cf&quot;</span>, SYSFS<span style="color: #7a0874; font-weight: bold;">&#123;</span>idVendor<span style="color: #7a0874; font-weight: bold;">&#125;</span>==<span style="color: #ff0000;">&quot;0fce&quot;</span>, <span style="color: #007800;">PROGRAM</span>=<span style="color: #ff0000;">&quot;/bin/sh -c 'echo 3 &gt; /sys/%p/device/bConfigurationValue'&quot;</span>
<span style="color: #007800;">LABEL</span>=<span style="color: #ff0000;">&quot;3G_END&quot;</span></pre></div></div><p>Ahora desconectamos el módem y descargamos los módulos del kernel, lo volvemos a cargar con los parámetros que necesitamos</p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> modprobe <span style="color: #660033;">-r</span> usbserial
<span style="color: #c20cb9; font-weight: bold;">sudo</span> rmmod usb_storage
<span style="color: #c20cb9; font-weight: bold;">sudo</span> modprobe usbserial <span style="color: #007800;">vendor</span>=0x0fce <span style="color: #007800;">product</span>=0xd0cf</pre></div></div><p>Creamos el archivo <strong>/etc/modprobe.d/md300</strong> con nuestro editor de texto favorito. Este archivo tendrá un alias para que el módulo se cargue correctamente luego de reiniciar el pc.</p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#Sony Ericsson MD300</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> md300 usbserial
options md300 <span style="color: #007800;">vendor</span>=0x0fce <span style="color: #007800;">product</span>=0xd0cf</pre></div></div><p> Reiniciamos udev:</p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>udev restart</pre></div></div><p> Ahora debemos configurar wvdial, editamos el archivo <em>/etc/wvdial.conf</em></p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>Dialer Defaults<span style="color: #7a0874; font-weight: bold;">&#93;</span>
Modem = <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>ttyACM0
ISDN = off
Modem Type = USB Modem
Baud = <span style="color: #000000;">460800</span>
Init = ATZ
Init2 = AT+<span style="color: #007800;">CFUN</span>=<span style="color: #000000;">1</span>
Init3 = ATQ0 V1 E1 <span style="color: #007800;">S0</span>=<span style="color: #000000;">0</span> <span style="color: #000000; font-weight: bold;">&amp;</span>C1 <span style="color: #000000; font-weight: bold;">&amp;</span>D2 +<span style="color: #007800;">FCLASS</span>=<span style="color: #000000;">0</span>
Init4 = 
Init5 = ATZ+<span style="color: #007800;">cgdcont</span>=<span style="color: #000000;">1</span>,<span style="color: #ff0000;">&quot;IP&quot;</span>,<span style="color: #ff0000;">&quot;imovil.entelpcs.cl&quot;</span>
Init6 = 
Init7 = 
Init8 = 
Init9 = 
Phone = <span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">99</span><span style="color: #666666; font-style: italic;">#</span>
Phone1 = 
Phone2 = 
Phone3 = 
Phone4 = 
Dial Prefix = 
Dial Attempts = <span style="color: #000000;">1</span>
Dial Command = ATM1L3DT
Ask Password = off
Password = entelpcs
Username = entelpcs
Auto Reconnect = off
Abort on Busy = off
Carrier Check = off
Check Def Route = on
Abort on No Dialtone = on
Stupid Mode = on
Idle Seconds = <span style="color: #000000;">0</span>
Auto DNS = on</pre></div></div><p> La línea <strong>Init2 = AT+CFUN=1</strong> es para activar la función radio del módem. Sin esta línea, pppd se cierra antes de conectar.</p><p> Enchufamos nuevamente el módem, y ejecutamos wvdial para conectarnos a internet:</p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> wvdial</pre></div></div><p> Obtendremos como resultado algo como esto:</p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;">--<span style="color: #000000; font-weight: bold;">&gt;</span> WvDial: Internet dialer version <span style="color: #000000;">1.60</span>
--<span style="color: #000000; font-weight: bold;">&gt;</span> Cannot get information <span style="color: #000000; font-weight: bold;">for</span> serial port.
--<span style="color: #000000; font-weight: bold;">&gt;</span> Initializing modem.
--<span style="color: #000000; font-weight: bold;">&gt;</span> Sending: ATZ
ATZ
OK
--<span style="color: #000000; font-weight: bold;">&gt;</span> Sending: AT+<span style="color: #007800;">CFUN</span>=<span style="color: #000000;">1</span>
AT+<span style="color: #007800;">CFUN</span>=<span style="color: #000000;">1</span>
OK
--<span style="color: #000000; font-weight: bold;">&gt;</span> Sending: ATQ0 V1 E1 <span style="color: #007800;">S0</span>=<span style="color: #000000;">0</span> <span style="color: #000000; font-weight: bold;">&amp;</span>C1 <span style="color: #000000; font-weight: bold;">&amp;</span>D2 +<span style="color: #007800;">FCLASS</span>=<span style="color: #000000;">0</span>
ATQ0 V1 E1 <span style="color: #007800;">S0</span>=<span style="color: #000000;">0</span> <span style="color: #000000; font-weight: bold;">&amp;</span>C1 <span style="color: #000000; font-weight: bold;">&amp;</span>D2 +<span style="color: #007800;">FCLASS</span>=<span style="color: #000000;">0</span>
OK
--<span style="color: #000000; font-weight: bold;">&gt;</span> Sending: ATZ+<span style="color: #007800;">cgdcont</span>=<span style="color: #000000;">1</span>,<span style="color: #ff0000;">&quot;IP&quot;</span>,<span style="color: #ff0000;">&quot;imovil.entelpcs.cl&quot;</span>
ATZ+<span style="color: #007800;">cgdcont</span>=<span style="color: #000000;">1</span>,<span style="color: #ff0000;">&quot;IP&quot;</span>,<span style="color: #ff0000;">&quot;imovil.entelpcs.cl&quot;</span>
OK
--<span style="color: #000000; font-weight: bold;">&gt;</span> Modem initialized.
--<span style="color: #000000; font-weight: bold;">&gt;</span> Sending: ATM1L3DT<span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">99</span><span style="color: #666666; font-style: italic;">#</span>
--<span style="color: #000000; font-weight: bold;">&gt;</span> Waiting <span style="color: #000000; font-weight: bold;">for</span> carrier.
ATM1L3DT<span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">99</span><span style="color: #666666; font-style: italic;">#</span>
~<span style="color: #7a0874; font-weight: bold;">&#91;</span>7f<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span><span style="color: #666666; font-style: italic;">#@!}!}!} }9}#}%B#}%}(}&quot;}'}&quot;}&quot;}&amp;} } } } }%}&amp;=;+zZC~</span>
CONNECT
--<span style="color: #000000; font-weight: bold;">&gt;</span> Carrier detected.  Starting PPP immediately.
--<span style="color: #000000; font-weight: bold;">&gt;</span> Starting pppd at Sun Feb  <span style="color: #000000;">1</span> <span style="color: #000000;">20</span>:<span style="color: #000000;">21</span>:<span style="color: #000000;">26</span> <span style="color: #000000;">2009</span>
--<span style="color: #000000; font-weight: bold;">&gt;</span> Pid of pppd: <span style="color: #000000;">8630</span>
--<span style="color: #000000; font-weight: bold;">&gt;</span> Using interface ppp0
--<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #7a0874; font-weight: bold;">local</span>  IP address 186.9.56.27
--<span style="color: #000000; font-weight: bold;">&gt;</span> remote IP address 10.64.64.64
--<span style="color: #000000; font-weight: bold;">&gt;</span> primary   DNS address 164.77.252.249
--<span style="color: #000000; font-weight: bold;">&gt;</span> secondary DNS address 164.77.252.215</pre></div></div><p> <strong><em>Actualización</em></strong>: Si tienen distribuciones basadas en RPM, pueden bajar <a
href="https://forge.betavine.net/projects/d-semd300-entcl/">este &#8220;driver&#8221;</a> de betavine (desarrollado por EntelPCS), que básicamente es lo mismo que hice yo a mano, y con algunas pequeñas modificaciones básicamente en el archivo wvdial.conf. Desde ubuntu pueden pasarlo a .deb con alien.</p><p> Si prefieren, también pueden usar gnome-ppp para discar.  Eso es todo&#8230; disfruten <img
src='http://bilson.cl/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p> ]]></content:encoded> <wfw:commentRss>http://bilson.cl/blog/2009/02/configurar-sony-ericsson-md300-de-entelpcs-en-ubuntu-intrepid-ibex-conexion-3g/feed/</wfw:commentRss> <slash:comments>14</slash:comments> </item> <item><title>Get VOIP</title><link>http://bilson.cl/blog/2008/10/get-voip/</link> <comments>http://bilson.cl/blog/2008/10/get-voip/#comments</comments> <pubDate>Thu, 09 Oct 2008 08:28:35 +0000</pubDate> <dc:creator>bilson</dc:creator> <category><![CDATA[Sin categoría]]></category><guid
isPermaLink="false">http://bilson.cl/blog/?p=9</guid> <description><![CDATA[Get VOIPOriginally uploaded by mringleinNotable !!
No será mucho digo yo ?]]></description> <content:encoded><![CDATA[<div
style="float: right; margin-left: 10px; margin-bottom: 10px;"> <a
href="http://www.flickr.com/photos/mringlein/2924987019/" title="photo sharing"><img
src="http://farm4.static.flickr.com/3166/2924987019_64e2f6a711_m.jpg" alt="" style="border: solid 2px #000000;" /></a><br
/> <br
/> <span
style="font-size: 0.9em; margin-top: 0px;"><br
/> <a
href="http://www.flickr.com/photos/mringlein/2924987019/">Get VOIP</a><br
/> <br
/> Originally uploaded by <a
href="http://www.flickr.com/people/mringlein/">mringlein</a><br
/> </span></div><p>Notable !!</p><p>No será mucho digo yo ?<br
/> <br
clear="all" /></p> ]]></content:encoded> <wfw:commentRss>http://bilson.cl/blog/2008/10/get-voip/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Macros</title><link>http://bilson.cl/blog/2008/08/macros/</link> <comments>http://bilson.cl/blog/2008/08/macros/#comments</comments> <pubDate>Sat, 09 Aug 2008 23:45:58 +0000</pubDate> <dc:creator>bilson</dc:creator> <category><![CDATA[Sin categoría]]></category><guid
isPermaLink="false">http://bilson.cl/blog/?p=8</guid> <description><![CDATA[Diente de LeónOriginally uploaded by bilsonclMacro tomada con una Fujifilm S1000fd&#8230;
Nada de mal el modo &#8220;super macro&#8221;]]></description> <content:encoded><![CDATA[<div
style="float: right; margin-left: 10px; margin-bottom: 10px;"> <a
href="http://www.flickr.com/photos/bilson/2748608782/" title="photo sharing"><img
src="http://farm4.static.flickr.com/3019/2748608782_ba73dbbdd6_m.jpg" alt="" style="border: solid 2px #000000;" /></a><br
/> <br
/> <span
style="font-size: 0.9em; margin-top: 0px;"><br
/> <a
href="http://www.flickr.com/photos/bilson/2748608782/">Diente de León</a><br
/> <br
/> Originally uploaded by <a
href="http://www.flickr.com/people/bilson/">bilsoncl</a><br
/> </span></div><p>Macro tomada con una Fujifilm S1000fd&#8230;</p><p>Nada de mal el modo &#8220;super macro&#8221; <img
src='http://bilson.cl/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br
/> <br
clear="all" /></p> ]]></content:encoded> <wfw:commentRss>http://bilson.cl/blog/2008/08/macros/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Finalizado el primer semestre</title><link>http://bilson.cl/blog/2008/07/finalizado-el-primer-semestre/</link> <comments>http://bilson.cl/blog/2008/07/finalizado-el-primer-semestre/#comments</comments> <pubDate>Fri, 25 Jul 2008 12:27:57 +0000</pubDate> <dc:creator>bilson</dc:creator> <category><![CDATA[Sin categoría]]></category><guid
isPermaLink="false">http://bilson.cl/blog/?p=7</guid> <description><![CDATA[Por fin ! Hoy recibí la última nota que me faltaba, y doy por finalizado el primer semestre &#8230; me fue super bien, espero seguir por la buena senda
]]></description> <content:encoded><![CDATA[<p>Por fin ! Hoy recibí la última nota que me faltaba, y doy por finalizado el primer semestre &#8230; me fue super bien, espero seguir por la buena senda <img
src='http://bilson.cl/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br
/> ]]></content:encoded> <wfw:commentRss>http://bilson.cl/blog/2008/07/finalizado-el-primer-semestre/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Actualizar el estado de Kopete con Twitter</title><link>http://bilson.cl/blog/2008/06/actualizar-el-estado-de-kopete-con-twitter/</link> <comments>http://bilson.cl/blog/2008/06/actualizar-el-estado-de-kopete-con-twitter/#comments</comments> <pubDate>Fri, 13 Jun 2008 14:43:27 +0000</pubDate> <dc:creator>bilson</dc:creator> <category><![CDATA[Sin categoría]]></category><guid
isPermaLink="false">http://bilson.cl/blog/?p=6</guid> <description><![CDATA[Un peque&#241;o demonio en PHP para actualizar nuestro estado de kopete, desde twitter &#8230; es simple, pero funciona&#8230;Comentarios y sugerencias son bienvenidas.
// id o username de twitter$usuarioTwitter = "bilsoncl";// tiempo espera en segundos para actualizar$tiempoRefresco = 300;$pid = pcntl_fork();if($pid == -1){	die("Error en el fork");}if($pid) {	// Matar el padre	exit();}// De aqui en adelante solo se ejecuta [...]]]></description> <content:encoded><![CDATA[<p>Un peque&ntilde;o demonio en PHP para actualizar nuestro estado de kopete, desde twitter &#8230; es simple, pero funciona&#8230;<br
/>Comentarios y sugerencias son bienvenidas.</p><p><code
php>// id o username de twitter$usuarioTwitter = "bilsoncl";// tiempo espera en segundos para actualizar$tiempoRefresco = 300;$pid = pcntl_fork();if($pid == -1){	die("Error en el fork");}if($pid) {	// Matar el padre	exit();}// De aqui en adelante solo se ejecuta si soy el hijo y futuro daemon// Lo siguiente que hacemos es soltarnos de la terminal de controlif (!posix_setsid()) {	die ("Error pasando a background");}// De este punto en adelante debemos cambiarnos de directorio y// hacemos las recomendaciones de Wikipedia para un daemonchdir("/");umask(0);// Capturo kill -15pcntl_signal(SIGTERM, "exit_daemon");// Si estamos aqui oficialmente somos un daemon// revisamos la ejecucion por cada linea de codigodeclare(ticks = 1);while(1) {	updateTwitter($usuarioTwitter);	sleep($tiempoRefresco);}// Esta es mi funcion de salidafunction exit_daemon($signo){	// terminando el demonio	exit();}function updateTwitter($usuario){	$twitteruser = "bilsoncl";	$url = "http://twitter.com/statuses/user_timeline/{$twitteruser}.xml";	$twitterupdates = file_get_contents($url);		$status = xml2array($twitterupdates);		`dcop kopete KopeteIface setAway "Twitteando: {$status['statuses'][0]['status'][0]['text']}" true`;}function xml2array($UPSxml){	$p = xml_parser_create();	xml_parser_set_option($p, XML_OPTION_CASE_FOLDING, 0);	xml_parser_set_option($p, XML_OPTION_SKIP_WHITE, 1);	xml_parse_into_struct($p, $UPSxml, $values, $idx);	xml_parser_free($p);		// tracking used keys	$usedKeys = array();	$deepLevel = -1;		// start a php array string (evaluated later)	$forEvalPrefix = '$xml_array';		// loop throught the value array	foreach ($values as $key =&gt; $val) {		$tagName = $val['tag']; // pass the key tag into a more friendly looking variable		$level = $val['level']; // idem		if($val['type'] == 'open') {			$deepLevel++; // increase deep level			$forEvalPrefix .= '[\''. $tagName .'\']';						// begin used keys checks to allow multidimensionatity under the same tag			(isset($usedKeys[$level][$tagName])) ? $usedKeys[$level][$tagName]++ : $usedKeys[$level][$tagName] = 0;			$forEvalPrefix .= '['. $usedKeys[$level][$tagName] .']';		}		if($val['type'] == 'complete') {			($level &gt; $deepLevel) ? $deepLevel++ : ''; // increase $deepLevel only if current level is bigger			$tagValue = addslashes($val['value'] ); // format the value for evaluation as a string			$forEvalSuffix = '[\''. $tagName .'\'] = \''. $tagValue .'\';'; // create a string to append to the current prefix			$forEval = $forEvalPrefix . $forEvalSuffix; // (without "$php_used_prefix"...)			eval($forEval); // write the string to the array structure		}		if($val['type'] == 'close') {			unset($usedKeys[$deepLevel]); // Suppress tagname's keys useless			$deepLevel--;			$forEvalPrefix = substr($forEvalPrefix, 0, strrpos($forEvalPrefix, '[')); // cut off the used keys node			$forEvalPrefix = substr($forEvalPrefix, 0, strrpos($forEvalPrefix, '[')); // cut off the end level of the array string prefix		}	}	return $xml_array;}</code></p> ]]></content:encoded> <wfw:commentRss>http://bilson.cl/blog/2008/06/actualizar-el-estado-de-kopete-con-twitter/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Quitar acentos y caracteres especiales en PHP</title><link>http://bilson.cl/blog/2008/05/quitar-acentos-y-caracteres-especiales-en-php/</link> <comments>http://bilson.cl/blog/2008/05/quitar-acentos-y-caracteres-especiales-en-php/#comments</comments> <pubDate>Mon, 26 May 2008 19:26:44 +0000</pubDate> <dc:creator>bilson</dc:creator> <category><![CDATA[Sin categoría]]></category><guid
isPermaLink="false">http://bilson.cl/blog/?p=5</guid> <description><![CDATA[
Por m&#225;s que busqu&#233; no encontr&#233; funciones que quitaran los acentos eficientemente. Las que funcionaban medianamente bien, fallaban cuando los caracteres eran UTF-8, por lo que me puse en campa&#241;a, y llegu&#233; a esto:&#160;
function quitarAcentos&#40;$text&#41;
&#123;
$text = htmlentities&#40;$text, ENT_QUOTES, 'UTF-8'&#41;;
$text = strtolower&#40;$text&#41;;
$patron = array &#40;
// Espacios, puntos y comas por guion
'/[\., ]+/' =&#62; '-',
&#160;
// Vocales
'/&#38;agrave;/' =&#62; [...]]]></description> <content:encoded><![CDATA[<p> Por m&aacute;s que busqu&eacute; no encontr&eacute; funciones que quitaran los acentos eficientemente. Las que funcionaban medianamente bien, fallaban cuando los caracteres eran UTF-8, por lo que me puse en campa&ntilde;a, y llegu&eacute; a esto:</p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;">&nbsp;
	<span style="color: #000000; font-weight: bold;">function</span> quitarAcentos<span style="color: #009900;">&#40;</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">htmlentities</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$text</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">ENT_QUOTES</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'UTF-8'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strtolower</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$patron</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span> <span style="color: #009900;">&#40;</span>
			<span style="color: #666666; font-style: italic;">// Espacios, puntos y comas por guion</span>
			<span style="color: #0000ff;">'/[\., ]+/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'-'</span><span style="color: #339933;">,</span>
&nbsp;
			<span style="color: #666666; font-style: italic;">// Vocales</span>
			<span style="color: #0000ff;">'/&amp;agrave;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'a'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'/&amp;egrave;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'e'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'/&amp;igrave;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'i'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'/&amp;ograve;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'o'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'/&amp;ugrave;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'u'</span><span style="color: #339933;">,</span>
&nbsp;
			<span style="color: #0000ff;">'/&amp;aacute;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'a'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'/&amp;eacute;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'e'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'/&amp;iacute;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'i'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'/&amp;oacute;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'o'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'/&amp;uacute;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'u'</span><span style="color: #339933;">,</span>
&nbsp;
			<span style="color: #0000ff;">'/&amp;acirc;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'a'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'/&amp;ecirc;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'e'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'/&amp;icirc;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'i'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'/&amp;ocirc;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'o'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'/&amp;ucirc;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'u'</span><span style="color: #339933;">,</span>
&nbsp;
			<span style="color: #0000ff;">'/&amp;atilde;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'a'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'/&amp;etilde;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'e'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'/&amp;itilde;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'i'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'/&amp;otilde;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'o'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'/&amp;utilde;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'u'</span><span style="color: #339933;">,</span>
&nbsp;
			<span style="color: #0000ff;">'/&amp;auml;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'a'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'/&amp;euml;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'e'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'/&amp;iuml;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'i'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'/&amp;ouml;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'o'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'/&amp;uuml;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'u'</span><span style="color: #339933;">,</span>
&nbsp;
			<span style="color: #0000ff;">'/&amp;auml;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'a'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'/&amp;euml;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'e'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'/&amp;iuml;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'i'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'/&amp;ouml;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'o'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'/&amp;uuml;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'u'</span><span style="color: #339933;">,</span>
&nbsp;
			<span style="color: #666666; font-style: italic;">// Otras letras y caracteres especiales</span>
			<span style="color: #0000ff;">'/&amp;aring;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'a'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'/&amp;ntilde;/'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'n'</span><span style="color: #339933;">,</span>
&nbsp;
			<span style="color: #666666; font-style: italic;">// Agregar aqui mas caracteres si es necesario</span>
&nbsp;
		<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array_keys</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$patron</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #990000;">array_values</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$patron</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$text</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span></pre></div></div><p> Cualquier comentario es bienvenido.</p> ]]></content:encoded> <wfw:commentRss>http://bilson.cl/blog/2008/05/quitar-acentos-y-caracteres-especiales-en-php/feed/</wfw:commentRss> <slash:comments>9</slash:comments> </item> <item><title>Homero Simpson en CSS</title><link>http://bilson.cl/blog/2008/04/homero-simpson-en-css/</link> <comments>http://bilson.cl/blog/2008/04/homero-simpson-en-css/#comments</comments> <pubDate>Mon, 14 Apr 2008 17:19:52 +0000</pubDate> <dc:creator>bilson</dc:creator> <category><![CDATA[Sin categoría]]></category><guid
isPermaLink="false">http://bilson.cl/blog/?p=4</guid> <description><![CDATA[Lo v&#237; y no lo pod&#237;a creer &#8230; sencillamente espectacular !!!!
http://www.romancortes.com/blog/homer-css/
&#160;
Gracias eft0 por enlace.
]]></description> <content:encoded><![CDATA[<p>Lo v&iacute; y no lo pod&iacute;a creer &#8230; sencillamente espectacular !!!!</p><p><a
href="http://www.romancortes.com/blog/homer-css/">http://www.romancortes.com/blog/homer-css/</a><p>&nbsp;</p><p>Gracias <a
href="http://eft0.nobody.cl/" title="Esteban Fern&aacute;ndez">eft0</a> por enlace.</p> ]]></content:encoded> <wfw:commentRss>http://bilson.cl/blog/2008/04/homero-simpson-en-css/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Todo de nuevo&#8230;</title><link>http://bilson.cl/blog/2008/04/todo-de-nuevo/</link> <comments>http://bilson.cl/blog/2008/04/todo-de-nuevo/#comments</comments> <pubDate>Fri, 04 Apr 2008 00:30:07 +0000</pubDate> <dc:creator>bilson</dc:creator> <category><![CDATA[Sin categoría]]></category><guid
isPermaLink="false">http://bilson.cl/blog/?p=3</guid> <description><![CDATA[Me da flojera recuperar los posts anteriores, vamos a ver si ahora escribo m&#225;s seguido &#8230;
Lo nuevo: pega nueva, responsabilidades nuevas, nuevos proyectos &#8230;&#160; retom&#233; los estudios &#8230; ojal&#225; salga todo bien
&#160;
]]></description> <content:encoded><![CDATA[<p>Me da flojera recuperar los posts anteriores, vamos a ver si ahora escribo m&aacute;s seguido &#8230;</p><p>Lo nuevo: pega nueva, responsabilidades nuevas, nuevos proyectos &#8230;&nbsp; retom&eacute; los estudios &#8230; ojal&aacute; salga todo bien <img
src='http://bilson.cl/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p><p>&nbsp;</p> ]]></content:encoded> <wfw:commentRss>http://bilson.cl/blog/2008/04/todo-de-nuevo/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> </channel> </rss>
<!-- This site's performance optimized by W3 Total Cache. Dramatically improve the speed and reliability of your blog!

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)
Database Caching 9/14 queries in 0.004 seconds using disk

Served from: webserver.dnsrev.com @ 2010-03-11 10:06:43 -->