<?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>Juan Benavides &#187; php</title>
	<atom:link href="http://juanbenavides.info/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://juanbenavides.info</link>
	<description>Anotaciones de un Geek</description>
	<lastBuildDate>Tue, 25 Oct 2011 05:08:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Buscar y reemplazar texto en muchos archivos</title>
		<link>http://juanbenavides.info/buscar-y-reemplazar-texto-en-muchos-archivos/2009/12/</link>
		<comments>http://juanbenavides.info/buscar-y-reemplazar-texto-en-muchos-archivos/2009/12/#comments</comments>
		<pubDate>Tue, 29 Dec 2009 11:47:13 +0000</pubDate>
		<dc:creator>Juan Benavides</dc:creator>
				<category><![CDATA[Programación]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://juanbenavides.info/?p=257</guid>
		<description><![CDATA[Hay muchas formas de hacerlo y seguramente muchos IDEs ya lo hacen. Creo que Textmate, Notepad++ y Textedit son los únicos editores de código ligeros que lo hacen. Terrible que uno sea solo para OS X y los otros dos para Windows. La gente asume que todos los linuxeros usamos la consola y las expresiones [...]]]></description>
			<content:encoded><![CDATA[<p>Hay muchas formas de hacerlo y seguramente muchos IDEs ya lo hacen. Creo que Textmate, Notepad++ y Textedit son los únicos editores de código ligeros que lo hacen. Terrible que uno sea solo para OS X y los otros dos para Windows. La gente asume que todos los <em>linuxeros</em> usamos la consola y las expresiones regulares para todo.</p>
<p>Bueno, quizás lo primero si. Pero usar expresiones regulares siempre ha sido un dolor de cabeza para mi (no se como pasé Compiladores I). En busca de una solución express, tiré código a lo idiota y he aquí la idiotez llamada <strong>replace.php</strong> que me ha sacado de apuro:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'argv'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$find</span> <span style="color: #339933;">=</span>		<span style="color: #0000ff;">'&lt;td class=&quot;pie&quot;&gt;&lt;a href=&quot;#&quot;&gt;Políticas de privacidad&lt;/a&gt; &lt;a href=&quot;#&quot;&gt;Vigencia del catalogo&lt;/a&gt; &lt;a href=&quot;#&quot;&gt;Mapa del sitio&lt;/a&gt;&lt;/td&gt;'</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$replace</span> <span style="color: #339933;">=</span>	<span style="color: #0000ff;">'&lt;td class=&quot;pie&quot;&gt;&lt;a href=&quot;/pagina/politicas-privacidad&quot;&gt;Políticas de privacidad&lt;/a&gt; &lt;a href=&quot;/pagina/terminos-condiciones&quot;&gt;Terminos y condiciones&lt;/a&gt;&lt;/td&gt;'</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$new_data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$find</span><span style="color: #339933;">,</span><span style="color: #000088;">$replace</span><span style="color: #339933;">,</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span> <span style="color: #339933;">!=</span> <span style="color: #000088;">$new_data</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'argv'</span><span style="color: #009900;">&#93;</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; &lt;-- Modificado<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">file_put_contents</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'argv'</span><span style="color: #009900;">&#93;</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: #000088;">$new_data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Se ejecuta desde consola para <strong>más practicidad</strong>, si, lo he dicho :D</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">find</span> .<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-name</span> <span style="color: #000000; font-weight: bold;">*</span>.ctp <span style="color: #660033;">-exec</span> php replace.php <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;</pre></div></div>

<p>El comando <code>find</code> buscará en el directorio <code>./</code> todos los archivos que terminen con la extensión <code>.ctp</code> y ejecutará mi script mandandole como argumento la ruta del archivo encontrado. El proceso es recursivo, por lo que si encuentra un archivo en varios subdirectorios la ejecución manualmente se traduciría en algo como <code>php replace.php ./views/pages/politicas.ctp</code></p>
<p>La ventaja de usarlo en consola es que podemos personalizar la elección de los archivos a modificar con una sencilla expresión regular, que se podría hacer más poderosa para un filtro más avanzado de archivos, pero igual yo he sido feliz concatenando la instrucción dos veces en una misma linea, así:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">find</span> .<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-name</span> <span style="color: #000000; font-weight: bold;">*</span>.ctp <span style="color: #660033;">-exec</span> php replace.php <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \; <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">find</span> .<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-name</span> <span style="color: #000000; font-weight: bold;">*</span>.html <span style="color: #660033;">-exec</span> php replace.php <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;
.<span style="color: #000000; font-weight: bold;">/</span>views<span style="color: #000000; font-weight: bold;">/</span>layouts<span style="color: #000000; font-weight: bold;">/</span>default.ctp <span style="color: #000000; font-weight: bold;">&lt;</span>-- Modificado
.<span style="color: #000000; font-weight: bold;">/</span>webroot<span style="color: #000000; font-weight: bold;">/</span>formulario.html <span style="color: #000000; font-weight: bold;">&lt;</span>-- Modificado
.<span style="color: #000000; font-weight: bold;">/</span>webroot<span style="color: #000000; font-weight: bold;">/</span>viajes.html <span style="color: #000000; font-weight: bold;">&lt;</span>-- Modificado
.<span style="color: #000000; font-weight: bold;">/</span>webroot<span style="color: #000000; font-weight: bold;">/</span>hacemos.html <span style="color: #000000; font-weight: bold;">&lt;</span>-- Modificado
.<span style="color: #000000; font-weight: bold;">/</span>webroot<span style="color: #000000; font-weight: bold;">/</span>contacto.html <span style="color: #000000; font-weight: bold;">&lt;</span>-- Modificado
.<span style="color: #000000; font-weight: bold;">/</span>webroot<span style="color: #000000; font-weight: bold;">/</span>static.catalogo.html <span style="color: #000000; font-weight: bold;">&lt;</span>-- Modificado
.<span style="color: #000000; font-weight: bold;">/</span>webroot<span style="color: #000000; font-weight: bold;">/</span>estamos.html <span style="color: #000000; font-weight: bold;">&lt;</span>-- Modificado
.<span style="color: #000000; font-weight: bold;">/</span>webroot<span style="color: #000000; font-weight: bold;">/</span>quienes.html <span style="color: #000000; font-weight: bold;">&lt;</span>-- Modificado
.<span style="color: #000000; font-weight: bold;">/</span>webroot<span style="color: #000000; font-weight: bold;">/</span>nuevos.html <span style="color: #000000; font-weight: bold;">&lt;</span>-- Modificado
.<span style="color: #000000; font-weight: bold;">/</span>webroot<span style="color: #000000; font-weight: bold;">/</span>beneficios.html <span style="color: #000000; font-weight: bold;">&lt;</span>-- Modificado
.<span style="color: #000000; font-weight: bold;">/</span>webroot<span style="color: #000000; font-weight: bold;">/</span>gracias.html <span style="color: #000000; font-weight: bold;">&lt;</span>-- Modificado
.<span style="color: #000000; font-weight: bold;">/</span>webroot<span style="color: #000000; font-weight: bold;">/</span>principal.html <span style="color: #000000; font-weight: bold;">&lt;</span>-- Modificado
.<span style="color: #000000; font-weight: bold;">/</span>webroot<span style="color: #000000; font-weight: bold;">/</span>unete.html <span style="color: #000000; font-weight: bold;">&lt;</span>-- Modificado
.<span style="color: #000000; font-weight: bold;">/</span>webroot<span style="color: #000000; font-weight: bold;">/</span>negocio.html <span style="color: #000000; font-weight: bold;">&lt;</span>-- Modificado
$</pre></div></div>

<p>Algo bruto, pero funciona incluso con mucho texto por buscar y mucho por reemplazar. La he usado tanto que decidí dedicarle este pequeño apunte, quizás a alguien más le puede servir.</p>
]]></content:encoded>
			<wfw:commentRss>http://juanbenavides.info/buscar-y-reemplazar-texto-en-muchos-archivos/2009/12/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Anuncios solo para visitantes de buscadores</title>
		<link>http://juanbenavides.info/anuncios-solo-para-visitantes-de-buscadores/2008/11/</link>
		<comments>http://juanbenavides.info/anuncios-solo-para-visitantes-de-buscadores/2008/11/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 07:38:47 +0000</pubDate>
		<dc:creator>Juan Benavides</dc:creator>
				<category><![CDATA[Programación]]></category>
		<category><![CDATA[anuncios]]></category>
		<category><![CDATA[buscadores]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://juanbenavides.info/?p=90</guid>
		<description><![CDATA[El Tip me lo pasó Otháner hace poco. Una manera de tener a nuestros usuarios fieles sin publicidad y mostrarla a los usuarios que llegan desde buscadores, además normalmente ellos son quienes dejan más ganancia. Los visitantes fieles a tu blog rara vez darán click los anuncios. Tambien me contó que existe un plugin para [...]]]></description>
			<content:encoded><![CDATA[<p>El Tip me lo pasó <a href="http://othaner.net/">Otháner</a> hace poco. Una manera de tener a nuestros usuarios fieles sin publicidad y mostrarla a los usuarios que llegan desde buscadores, además normalmente ellos son quienes dejan más ganancia. Los visitantes fieles a tu blog rara vez darán click los anuncios. Tambien me contó que existe un plugin para WordPress que hace eso, pero la funcionalidad es tan simple que no necesita de un plugin, solo un par de lineas de código.</p>
<p>La siguiente función me dirá si el usuario nos está visitando desde un buscador conocido:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> desdeUnBuscador<span style="color: #009900;">&#40;</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: #990000;">ereg</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'(google|yahoo|live|terra|msn|ask|aol|t-online)\.([a-z]|[A-Z]){2}'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_REFERER'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</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></pre></div></div>

<p>La forma de implementarlo en la plantilla es igual de sencillo:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>desdeUnBuscador<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;!-- contenido solo para visitantes que vienen desde buscadores --&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>No estoy seguro de exactamente las ventajas y desventajas en cuando a posicionamiento y rendimiento de la publicidad, pero es una forma de mostrar cierto contenido a usuarios que vengan referenciados desde otros sitios en especifico que funciona aunque no estemos usando wordpress.</p>
]]></content:encoded>
			<wfw:commentRss>http://juanbenavides.info/anuncios-solo-para-visitantes-de-buscadores/2008/11/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Importando imagenes de un sitio a uno nuevo.</title>
		<link>http://juanbenavides.info/importando-imagenes-de-un-sitio-a-uno-nuevo/2008/10/</link>
		<comments>http://juanbenavides.info/importando-imagenes-de-un-sitio-a-uno-nuevo/2008/10/#comments</comments>
		<pubDate>Fri, 10 Oct 2008 20:19:26 +0000</pubDate>
		<dc:creator>Juan Benavides</dc:creator>
				<category><![CDATA[Programación]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://juanbenavides.info/?p=51</guid>
		<description><![CDATA[La tarea que menos me gusta hacer, es migrar bases de datos, menos cuando incluyen una buena base de datos de imagenes. En este caso, la nueva DB relaciona los usuarios con su imagen mediante el ID de éste. Si el usuario tenía ID 5, la imagen se llamaba 5.jpg y así. La vieja base [...]]]></description>
			<content:encoded><![CDATA[<p>La tarea que menos me gusta hacer, es migrar bases de datos, menos cuando incluyen una buena base de datos de imagenes. En este caso, la nueva <em>DB</em> relaciona los usuarios con su imagen mediante el <strong>ID</strong> de éste. Si el usuario tenía <strong>ID 5</strong>, la imagen se llamaba <strong>5.jpg</strong> y así. La vieja base de datos guardaba la imagen con su nombre aleatorio (aparentemente) y guardaba el nombre en el <em>DB</em>.</p>
<p>Traerme miles de imagenes del viejo server y renomarlas manualmente es imposible y ridículo. Así que la solución fué bajarme la base de datos, la instalé en mi equipo y escribí éste script en <a href="http://cakephp.org/">CakePHP</a>:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> ImportarController <span style="color: #000000; font-weight: bold;">extends</span> AppController
<span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$name</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Importar'</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$uses</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'User'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">function</span> imagenes<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$users</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">User</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">findAll</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$users</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$user</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #990000;">copy</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://domain.com/images/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$user</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'image'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'/tmp/images/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$user</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'.jpg'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #990000;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Imagenes importadas.'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Lo que hace es obtener todos los usuarios de la vieja base de datos con <a href="http://cakephp.org/">CakePHP</a>. Si no lo usas no importa, la idea es obtener los nombres de las imagenes y la información que necesites de la base de datos.</p>
<p>La función <a href="http://mx.php.net/manual/es/function.copy.php"><strong>copy</strong></a> de <strong>PHP</strong> no solo copia archivos dentro del mismo servidor, sino que puede hacerlo de servidores remotos como en éste caso. El segundo parametro es el nombre y destino de la imagen, yo he dejado una carpeta dentro de los archivos temporales de Linux.</p>
<p>Si nos funciona bien el script, entonces esa carpeta estará llena de imagenes, que finalmente podrás usar donde quieras. Éste script tambien sirve para pasar muchisimas imagenes de un servidor a otro, sin tener que hacerlo tu actuando de intermediario. Es muy simple, pero muy útil :)</p>
]]></content:encoded>
			<wfw:commentRss>http://juanbenavides.info/importando-imagenes-de-un-sitio-a-uno-nuevo/2008/10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>¿Se puede hacer programación distribuida con PHP?</title>
		<link>http://juanbenavides.info/%c2%bfse-puede-hacer-programacion-distribuida-con-php/2008/09/</link>
		<comments>http://juanbenavides.info/%c2%bfse-puede-hacer-programacion-distribuida-con-php/2008/09/#comments</comments>
		<pubDate>Sun, 21 Sep 2008 05:13:10 +0000</pubDate>
		<dc:creator>Juan Benavides</dc:creator>
				<category><![CDATA[Programación]]></category>
		<category><![CDATA[boinc]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programación distribuida]]></category>

		<guid isPermaLink="false">http://blog.juanbenavides.info/?p=46</guid>
		<description><![CDATA[Leyendo un poco sobre el LHC (el tema de moda entre geeks) me encontré con que existe un proyecto de éste para BOINC (LHC@home). Explico rapidamente, BOINC es un proyecto libre que provee una infraestructura muy robusta para proyectos que requieran de computación distribuida. Cuando una aplicación requiere hacer procesos muy complejos con muchos calculos, [...]]]></description>
			<content:encoded><![CDATA[<p>Leyendo un poco sobre el LHC (el tema de moda entre geeks) me encontré con que existe un proyecto de éste para <a href="http://es.wikipedia.org/wiki/Berkeley_Open_Infrastructure_for_Network_Computing">BOINC</a> (<a href="http://lhcathome.cern.ch/">LHC@home</a>). Explico rapidamente, <a href="http://es.wikipedia.org/wiki/Berkeley_Open_Infrastructure_for_Network_Computing">BOINC</a> es un proyecto libre que provee una infraestructura muy robusta para proyectos que requieran de <a href="http://es.wikipedia.org/wiki/Computación_distribuida">computación distribuida</a>. Cuando una aplicación requiere hacer procesos muy complejos con muchos calculos, uno tiene pocas opciones:</p>
<ul>
<li>Ejecutar los procesos en tu PC de escritorio y esperar unos cuantos años a que termine.</li>
<li>Comprar una <strong>carísima</strong> <a href="http://es.wikipedia.org/wiki/Supercomputadora">supercomputadora</a> para correr tu programa.</li>
<li>O mejor, utilizar muchas computadoras para ejecutar tu aplicación y que entre todas, sumen una potencia de cálculo considerable.</li>
</ul>
<p>La última opción, tambien llamada computación distribuida, es muy interesante y es relativamente fácil de aplicar. Pues me entró la curiosidad sobre si se podría hacer experimentos con PHP, simple y sencillamente por que este lenguaje tipo <em>scripting</em> tan famoso, es muy poderoso si se le explotan sus capacidades, además es muy fácil y rápido programar cosas complejas como sucede con la mayoría de éste tipo de lenguajes. Resulta que si, existen proyectos que permiten la programación distribuida con PHP, lo cual me emociona mucho :)</p>
<p><a href="http://www.zeroc.com/icephp.html">ICE soporta PHP5,</a> lo que resulta ser una opción, tambien existe un proyecto de <a href="http://phporb.sourceforge.net/">CORBA para PHP5</a> y además está <a href="http://universe-phpext.sourceforge.net/">Universe para PHP4</a>. Por si eso no fuera poco, <a href="http://www.zeroc.com/">ICE</a> soporta tambien lenguajes como Ruby y existe algo de CORBA para Perl, TCL y Smalltalk. Con Java, C++ y otros lenguajes para <em>Programación de fierros™</em> es más evidente su soporte para este tipo de desarrollos y la gran mayoría de infraestructuras están pensadas para ellos, pero los de <em>scripting</em> tampoco quedan atrás.</p>
<p>El primer experimento que haría distribuido es (inevitablemente) un script para encontrar contraseñas encriptadas bajo <strong>MD5</strong> con <em>fuerza bruta</em> :D &#8230; pero ya, por ahora no tengo de mucho tiempo (ni siquiera debería estar escribiendo éste post), pero pronto, me haré con el espacio para aprender a hacer este tipo de chucherías que son realmente apasionantes.</p>
]]></content:encoded>
			<wfw:commentRss>http://juanbenavides.info/%c2%bfse-puede-hacer-programacion-distribuida-con-php/2008/09/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

