<?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>Petra Link Factory &#187; web</title>
	<atom:link href="http://www.petralinkfactory.com/tag/web/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.petralinkfactory.com</link>
	<description>Programar no es un hobby es una pasión</description>
	<lastBuildDate>Sun, 15 Jan 2012 09:14:58 +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>Clientes Webmail en php</title>
		<link>http://www.petralinkfactory.com/2009/11/07/clientes-webmail-en-php/</link>
		<comments>http://www.petralinkfactory.com/2009/11/07/clientes-webmail-en-php/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 19:18:07 +0000</pubDate>
		<dc:creator>Valde</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[comparativa]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.petralinkfactory.com/?p=92</guid>
		<description><![CDATA[Cuando nos dedicamos a realizar webs para empresas, en muchas ocasiones, además llevamos la administración del dominio y esas cosas. Si por cuestiones económicas tenemos que alojar las webs de nuestros clientes en un mismo plan de hosting. En mucho &#8230; <a href="http://www.petralinkfactory.com/2009/11/07/clientes-webmail-en-php/">Sigue leyendo <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Cuando nos dedicamos a realizar webs para empresas, en muchas ocasiones, además llevamos la administración del dominio y esas cosas. Si por cuestiones económicas tenemos que alojar las webs de nuestros clientes en un mismo plan de hosting. En mucho de estos planes de hosting que nos permiten multidominio. A esos clientes además les podemos dar servicio de correo electrónico, mediante IMAP o POP3.</p>
<p>El problema viene cuando uno de los clientes te pide que le des acceso al correo por webmail, en la mayoría de los casos le podemos decir que acceda por el acceso que nos suelen dar los proveedores del hosting, el problema es que queda poco profesional y además no es buena idea, el cliente se puede ir si le estas cobrando un precio mayor que el que pagues por tu hosting, que debe ser lo normal, ya que aprender a configurar y manejar las cosas hay que cobrarlas, pero la gente no entiende esto.</p>
<p>Bueno la solución es montar un cliente de Webmail para cada dominio que tengas alojado en tu cuenta.</p>
<p>En el mercado podemos encontrar varias opciones, yo voy a enseñaros 3, una totalmente gratuita y dos de pago, con versiones lite gratuitas.</p>
<h2>Rouncube</h2>
<p>Roundcube [1] es opensource. Escrito en php, necesita una conexión con una base de datos, nos permite conectarnos a MySQL, MS SQL-Server y SQLite. Yo lo he probado con MySQL, y va muy bien, es una buena opción si tienes un servidor web con pocas bases de datos y ya tienes muchas de ellas ocupadas.</p>
<p>La instalación es muy sencilla, solo hubo que configurar un fichero de configuración, donde se le indica la conexión con la base de datos y los datos del servidor de correo al que nos vamos a conectar.</p>
<p>Por último decir que el aspecto se puede modificar mediante CSS.</p>
<div id="attachment_93" class="wp-caption aligncenter" style="width: 465px"><a href="http://www.petralinkfactory.com/wp-content/uploads/2009/11/roncecube.jpg"><img class="size-full wp-image-93 " title="roncecube" src="http://www.petralinkfactory.com/wp-content/uploads/2009/11/roncecube.jpg" alt="Rouncecube" width="455" height="326" /></a><p class="wp-caption-text">Rouncecube</p></div>
<h2>Afterlogic Webmail Lite</h2>
<p>Este cliente webmail es bantante sencillo de instalar, puesto que no hay que configurar ningún fichero, sino que tiene un asistente web bastante sencillo. Necesita MySQL o MS SQL Server, en la web también dice que funciona con Acces, pero me imagino que será para versión que hay en ASP.NET.</p>
<p>Tiene la posibilidad de temas, que el usuario puede cambiar, si desde el panel de administración principal lo habilitamos. Estos temas son fáciles de manipular y están en carpetas que nos permiten elimiar aquellos que no querramos que se muestren.</p>
<p>La versión de pago, nos permite utlizar un calendario, la posibilidad de utlizar varios dominios y versión para el móvil. Dicha versión cuesta 149$.</p>
<p style="text-align: left;">
<div id="attachment_94" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.petralinkfactory.com/wp-content/uploads/2009/11/afterlogic_webmail_lite.png"><img class="size-medium wp-image-94 " title="Afterlogic Webmail Lite" src="http://www.petralinkfactory.com/wp-content/uploads/2009/11/afterlogic_webmail_lite-300x225.png" alt="Afterlogic Webmail Lite" width="300" height="225" /></a><p class="wp-caption-text">Afterlogic Webmail Lite</p></div>
<p>Esta versión Lite funciona perfectamente en el navegador de los móviles con el Sistema Operativo Android.</p>
<p style="text-align: left;">
<h2>Atmail (@mail)</h2>
<p>Atmail[3] es uno de los correos que suelen utilizar los hosting para sus clientes, junto con Horde o con SqurryMail. Su interfaz es muy sencilla y fácil de manejar. La instalación es muy sencilla, mediante asistente web.</p>
<p>En mi servidor local tuve problemas para instalarlo, me daba errores de php, pero no me puse a investigar el por qué de los errores y cómo corregirlo, puesto que de las 3 opciones vistas en este post, este es el que menos me gusta.</p>
<p style="text-align: left;">
<div id="attachment_96" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.petralinkfactory.com/wp-content/uploads/2009/11/atmail.JPG"><img class="size-medium wp-image-96" title="@mail" src="http://www.petralinkfactory.com/wp-content/uploads/2009/11/atmail-300x175.jpg" alt="Pantalla del @mail" width="300" height="175" /></a><p class="wp-caption-text">Pantalla del @mail</p></div>
<p>Hay que decir que este gestor de correo funciona perfectamente con el navegador del Sistema Operativo Android. Y es uno de los que nos ofrece Powweb como gestión de correo Webmail, además de Horde[4] y de SquirrelMail<strong> </strong>[5], que de ellos no he hablado, pero es que no me gustan como gestores de correo.</p>
<h2>Conclusión</h2>
<p>Para mí el más fácil de manejar y de utilizar el es el Afterlogic Webmail Lite, cosa que ha hecho que se lo haya instalado ya a varios amigos, aunque el roundcube también es bastante bueno. El Atmail, como no lo he podido instalar, no puedo hablar de la instalación, pero como usuario de dicho webmail la verdad es que estoy contento. La verdad es que estos 3 gestores de webmail funcionan en mi navegador de Android (tengo el HTC Dream con Movistar), para mí no es muy importante que funcione con el móvil, ya que tengo el gestor de correo del propio sistema operativo, pero hay veces que vienen correos en codificaciones raras y necesito abrir el correo desde el webmail o desde el gestor de correo del ordenador, y ya me ha sacado mirar el correo desde el webmail de varios apuros.</p>
<p style="text-align: left;">
<h2>Enlaces</h2>
<p>[1] Roundcube: <a href="http://roundcube.net" target="_blank">http://roundcube.net</a></p>
<p>[2] Afterlogic Webmail Lite: <a href="http://www.afterlogic.com/products/webmail-lite" target="_blank">http://www.afterlogic.com/products/webmail-lite</a></p>
<p>[3] Atmail: <a href="http://atmail.org" target="_self">http://atmail.org</a></p>
<p>[4] Horde: <a href="http://www.horde.org/" target="_self">http://www.horde.org</a></p>
<p>[5] SquirrelMail: <a href="http://squirrelmail.org/" target="_blank">http://squirrelmail.org</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.petralinkfactory.com/2009/11/07/clientes-webmail-en-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>html2pdf</title>
		<link>http://www.petralinkfactory.com/2008/09/28/html2pdf/</link>
		<comments>http://www.petralinkfactory.com/2008/09/28/html2pdf/#comments</comments>
		<pubDate>Sun, 28 Sep 2008 19:14:42 +0000</pubDate>
		<dc:creator>Valde</dc:creator>
				<category><![CDATA[programación]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.petralinkfactory.com/blog/?p=19</guid>
		<description><![CDATA[De las librerÃ­as que se vieron en el anterior post, esta librerÃ­a es la que me parece mÃ¡s fÃ¡cil de utilizar. Lo primero que tenmos que hacer es descargarnos el fichero dese la web de la librerÃ­a [1]. El sitio &#8230; <a href="http://www.petralinkfactory.com/2008/09/28/html2pdf/">Sigue leyendo <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>De las librerÃ­as que se vieron en el anterior <a title="PDF en php" href="http://www.petralinkfactory.com/2008/09/08/pdf-en-php/" target="_blank">post</a>, esta librerÃ­a es la que me parece mÃ¡s fÃ¡cil de utilizar.</p>
<p>Lo primero que tenmos que hacer es descargarnos el fichero dese la web de la librerÃ­a [1]. El sitio estÃ¡ en FrancÃ©s, por lo que voy a poner el enlace directo de la descarga de la versiÃ³n actual a dÃ­a de hoy es la 3.13 [2].</p>
<p>Una vez que ya estÃ¡ descargado descomprimimos el contenido en un directorio.<a href="http://www.petralinkfactory.com/wp-content/uploads/2009/01/carpetas.jpg"><img class="aligncenter size-medium wp-image-26" title="Contenido de Zip" src="http://www.petralinkfactory.com/wp-content/uploads/2009/01/carpetas-300x240.jpg" alt="" width="300" height="240" /></a></p>
<p style="text-align: center;">
<p style="text-align: left;">Nos encontramos con 4 directorios y 6 archivos, de aquÃ­ solo nos quedaremos con 3 directorios (<strong>_fpdf</strong>, <strong>_mypdf </strong>y <strong>languages</strong>) y con 3 ficheros (<strong>html2pdf.class.php</strong>, <strong>parsingHTML.class.php</strong> y <strong>styleHTML.class.php</strong>). Yo te recomiendo que guardes todo esto en un directorio dentro del directorio donde guardes los includes en tus proyectos, en mi caso es <strong>includes</strong>.</p>
<p style="text-align: left;">En este artÃ­culo voy a enseÃ±ar 3 ejemplos que son bastante censillos.</p>
<h3 style="text-align: left;">Ejemplo 1:</h3>
<p>Este ejemplo es muy sencillo, no es mÃ¡s que poner un texto y generar un PDF con dicho texto.</p>
<p>Lo primero que vamos a ver en este ejemplo son los tags especiales. Hay 3:</p>
<ul>
<li>page: con este tag delimitamos el contenido de una pÃ¡gina. En este indicamos el tipo de documento y los margenes left y top, el bottom y right no se pueden poner.
<pre>&lt;page backtop="10mm" backbottom="10mm" backleft="10mm"&gt; ... &lt;/page&gt;</pre>
<p>El contenido que hay dentro de este tag es lo que se muestra en la pÃ¡gina del PDF.<br />
Cuando insertes el cÃ³digo HTML recuerda que las propiedades las debes poner en el parametro style, como por ejemplo en una tabla, deberÃ­as poner &lt;table style=&#8221;width: 100%px; color: black;&#8221;&gt;</li>
<li>page_footer: Pie de pÃ¡gina. Esta etiquieta debe estar dentro de la etiqueta page y su contenido puede ser un html.</li>
<li>page_header: cabecera. Esta etiquieta debe estar dentro de la etiqueta page y su contenido puede ser un html.</li>
</ul>
<p><a href="http://www.petralinkfactory.com/ejemplos_html2pdf/ejemplo1.php" target="_blank">AquÃ­</a> puedes ver el fichero pdf generado en este primer ejemplo.</p>
<h3 style="text-align: left;">Ejemplo 2:</h3>
<p>En este caso el contenido de lo que vamos a mostrar lo vamos a recoger de una plantilla y sustituimos datos de dicha plantilla desde el cÃ³digo.</p>
<p><a href="http://www.petralinkfactory.com/ejemplos_html2pdf/ejemplo2.php" target="_blank">AquÃ­</a> puedes ver el fichero pdf generado en este primer ejemplo.</p>
<h3 style="text-align: left;">Ejemplo 3:</h3>
<p>En este Ãºltimo ejemplo lo que vamos a ver los distintos cÃ³digos de barras que puede sacar la librerÃ­a html2pdf.</p>
<p><a href="http://www.petralinkfactory.com/ejemplos_html2pdf/ejemplo3.php" target="_blank">AquÃ­</a> puedes ver el fichero pdf generado en este primer ejemplo.</p>
<h3>Documentos del artÃ­culo.</h3>
<p>Desde <a title="Descarga los ficheros" href="http://www.petralinkfactory.com/ejemplos_html2pdf.rar">aquÃ­</a> te puedes descargar todos los ficheros del artÃ­culo.</p>
<h3>Enlaces:</h3>
<p>[1] <a href="http://html2pdf.spipu.net/">http://html2pdf.spipu.net/</a></p>
<p>[2] http://prgm.spipu.net/?id=29&amp;download</p>
]]></content:encoded>
			<wfw:commentRss>http://www.petralinkfactory.com/2008/09/28/html2pdf/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>URL Amigables (II)(php)</title>
		<link>http://www.petralinkfactory.com/2008/07/15/url-amigables-iiphp/</link>
		<comments>http://www.petralinkfactory.com/2008/07/15/url-amigables-iiphp/#comments</comments>
		<pubDate>Tue, 15 Jul 2008 10:46:10 +0000</pubDate>
		<dc:creator>Valde</dc:creator>
				<category><![CDATA[programación]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[seo url]]></category>
		<category><![CDATA[url amigables]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.petralinkfactory.com/?p=7</guid>
		<description><![CDATA[Bueno con mÃ¡s de dos meses de retardo, voy a seguir con esta serie de artÃ­culos que tienen que ver con las URLs Amigables (en inglÃ©s SEO URLs). La razÃ³n ha sido que he estado trabajando a destajo para un &#8230; <a href="http://www.petralinkfactory.com/2008/07/15/url-amigables-iiphp/">Sigue leyendo <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Bueno con mÃ¡s de dos meses de retardo, voy a seguir con esta serie de artÃ­culos que tienen que ver con las URLs Amigables (en inglÃ©s SEO URLs). La razÃ³n ha sido que he estado trabajando a destajo para un proyecto en el que estoy trabajando, en el que estoy aprendiendo mucho y ya irÃ© publicando las cosas que he ido aprendiendo.</p>
<p>Bueno vamos a lio con las URL Amigables.</p>
<p>Lo primero he de decir que dependiendo de si trabajamos en IIS o en Apache, en los ejemplos irÃ© mostrandolo.</p>
<p>En primer lugar decir que las pruebas las he desarrollado sobre Windows Vista Home Premium con el Servidor Web WampServer 2.0, aunque luego lo he probado en un Windows 2003 Server con IIS 6 y en Debian Linux con Apache 2.0 (en mi hosting de Powweb).</p>
<p>Si estamos en Apache lo primero que tenemos que hacer es crear un fichero <em><strong>.htaccess</strong></em> para poder redirigir las urls amigables a las pÃ¡ginas que corresponden, para ello recordamos que el artÃ­culo I se dice que vamos a utilizar esta pequeÃ±a chapuza.</p>
<p>En el fichero .htaccess escribiremos el siguiente texto.</p>
<pre><span style="color: #333333;">ErrorDocument 404 /urlAmigables/controllers/controller.php
</span></pre>
<p><span style="color: #000000;">Esta lÃ­nea que se introduce en el .htaccess significa que si genera el error 404 en el servidor (PÃ¡gina no encontrada) que se vaya a la url /urlAmigables/controllers/controller.php, Es en este fichero donde se va a hacer el procesado de la URL para luego ejecutar dentro las acciones pertinentes.</span></p>
<p>El llamar a esta pÃ¡gina controller.php tiene que ver puesto que esta idea se me ocurriÃ³ aprendiendo a utilizar las Frameworks de PHP, que para mi gusto estÃ¡n bien para hacer desarrollos pequeÃ±os, en desarrollos mÃ¡s grandes es mejor utilizar, desde mi punto de vista, herramientas propias.</p>
<p>En el fichero controller.php debemos introducir:</p>
<div class="igBar"><span id="lphp-2"><a href="#" onclick="javascript:showPlainTxt('php-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-2">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$URLAmigable</span> = <a href="http://www.php.net/urldecode"><span style="color:#000066;">urldecode</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$_SERVER</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'REQUEST_URI'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//&nbsp; Como en el apache tengo varios sitios en el sito web localhost, tengo que quitar de la url</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">// el sitio web sobre el que estoy trabajando.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//$URLAmigable = str_replace('/urlAmigables/', '', $URLAmigable);</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$URLAmigable</span> = <a href="http://www.php.net/substr"><span style="color:#000066;">substr</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$URLAmigable</span>, <span style="color:#CC66CC;color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//&nbsp; Procesamos la URL Amigable para poder procesar el fichero.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$Params</span> = <a href="http://www.php.net/split"><span style="color:#000066;">split</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'/'</span>, <span style="color:#0000FF;">$URLAmigable</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$controller</span> = <span style="color:#FF0000;">''</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/count"><span style="color:#000066;">Count</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$Params</span><span style="color:#006600; font-weight:bold;">&#41;</span>&gt; <span style="color:#CC66CC;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$controller</span> = <span style="color:#0000FF;">$Params</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#CC66CC;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">else</span> <span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$URLAmigable</span> != <span style="color:#FF0000;">''</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$controller</span> = <span style="color:#0000FF;">$URLAmigable</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$strParams</span> = <a href="http://www.php.net/str_replace"><span style="color:#000066;">str_replace</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$controller</span> . <span style="color:#FF0000;">'/'</span>, <span style="color:#FF0000;">''</span>, <span style="color:#0000FF;">$URLAmigable</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">switch</span><span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/strtolower"><span style="color:#000066;">strtolower</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$controller</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">case</span> <span style="color:#FF0000;">"modulo"</span> :</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">case</span> <span style="color:#FF0000;">"mÃ³dulo"</span> :</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">include</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'modulo.php'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">break</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#000000; font-weight:bold;">default</span>:</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/header"><span style="color:#000066;">header</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">''</span>, <span style="color:#000000; font-weight:bold;">true</span>, <span style="color:#CC66CC;color:#800000;">404</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">include</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'error404.php'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">break</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>En el IIS en vez de poner el fichero .htaccess, hay que cambiar la url del error 404, si tienes acceso al IIS de tu servidor, deberÃ¡s acceder a Ã©l y luego en el sitio web cambiar las direcciones de error del 404 (por defecto vienen 3) y ponerlas a este fichero. Sino tienes acceso al IIS, seguro que tu servicio de hosting tiene en algÃºn lugar algÃºn sitio donde poder cambiar dicho fichero.</p>
<p>Pues ya estÃ¡ solo hace falta hacer el fichero de error para cuando se introducen direcciones que no son vÃ¡lidas (error404.php) y los ficheros de nuestras herramientas, en el ejemplo es modulo.php, que responde a las url amigables modulo1 y modulo2.</p>
<p>Puedes ver un ejemplo de esta forma de trabajar en <a href="http://urlamigables.petralinkfactory.com">http://urlamigables.petralinkfactory.com</a></p>
<p>Y te puedes descargar el ejemplo desde: <a href="http://urlamigables.petralinkfactory.com/urlamigables.zip">http://urlamigables.petralinkfactory.com/urlamigables.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.petralinkfactory.com/2008/07/15/url-amigables-iiphp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

