<?xml version="1.0" encoding="UTF-8" ?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Posteet: jacinmontava</title> 
    <link>http://www.posteet.com/</link> 
    <description>Recent posteets posted to Posteet</description>
    <ttl>60</ttl>

    
    <item>
        <title>Acortar direcciones con PHP</title>
        <link>http://www.posteet.com/view/1049</link>
        <description>
        <![CDATA[<pre>&lt;?php
function acortarurl($url){
	$longitud = strlen($url);
	if($longitud&gt; 45){
		$longitud = $longitud - 30;
		$parte_inicial = substr($url, 0, -$longitud);
		$parte_final = substr($url, -15);
		$nueva_url = $parte_inicial.&quot;[ ... ]&quot;.$parte_final;
		return $nueva_url;
	}else{
		return $url;
	}
}
$url_larga = &quot;http://www.google.com.pe/search?hl=en&amp;q=ribosomatic&amp;btnG=Google+Search&amp;meta=&quot;;
$url_corta = acortarurl($url_larga);
echo&quot;&lt;a href=\&quot;$url_larga\&quot;&gt;$url_corta&lt;/a&gt;&quot;;
?&gt;</pre> <a href="http://www.posteet.com/tags/enlaces">[enlaces]</a>  <a href="http://www.posteet.com/tags/optimizacion">[optimizacion]</a>  <a href="http://www.posteet.com/tags/php">[php]</a> ]]>        </description>
        <dc:creator>jacinmontava</dc:creator>
        <pubDate>Mon, 07 Jul 2008 11:00:43 +0000</pubDate>

            <category>enlaces</category>
            <category>optimizacion</category>
            <category>php</category>
    
    </item>

  
    <item>
        <title>Medir la velocidad de los scripts en PHP</title>
        <link>http://www.posteet.com/view/1029</link>
        <description>
        <![CDATA[<pre>$tiempo_inicio = microtime(true);

mifunciondelaostia();

$tiempo_final = microtime(true);
$tiempo = $tiempo_final - $tiempo_inicio;

echo &quot;Ha tardado &quot;,$tiempo,&quot; segundos&quot;;</pre> <a href="http://www.posteet.com/tags/desarrollo">[desarrollo]</a>  <a href="http://www.posteet.com/tags/optimizacion">[optimizacion]</a>  <a href="http://www.posteet.com/tags/php">[php]</a> ]]>        </description>
        <dc:creator>jacinmontava</dc:creator>
        <pubDate>Thu, 26 Jun 2008 08:16:03 +0000</pubDate>

            <category>desarrollo</category>
            <category>optimizacion</category>
            <category>php</category>
    
    </item>

  
    <item>
        <title>Recibe un email cuando el robot de Google visite tu página</title>
        <link>http://www.posteet.com/view/1025</link>
        <description>
        <![CDATA[<pre>&lt;?php

   if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'Googlebot' ) !== false )
   {
	 // Tu direccecion de correo
	 $email_address = 'tu@tudominio.com ';

	 // Enviate el email
	 mail($email_address,'Alerta de Googlebot',
	 'El Googlebot ha visitado tu pagina: '.$_SERVER['REQUEST_URI']);
   }
?&gt;</pre> <a href="http://www.posteet.com/tags/php robots google">[php robots google]</a> ]]>        </description>
        <dc:creator>jacinmontava</dc:creator>
        <pubDate>Mon, 23 Jun 2008 06:12:37 +0000</pubDate>

            <category>php robots google</category>
    
    </item>

  
    <item>
        <title>Limpiar de espacios una cadena con PHP</title>
        <link>http://www.posteet.com/view/870</link>
        <description>
        <![CDATA[<pre>function eliminarblancos($cadena){
         $cadena = trim($cadena);
         $cadena = preg_replace('/\s(?=\s)/', '', $cadena);
         $cadena = preg_replace('/[\n\r\t]/', ' ', $cadena);
         return $cadena;
}</pre> <a href="http://www.posteet.com/tags/php">[php]</a> ]]>        </description>
        <dc:creator>jacinmontava</dc:creator>
        <pubDate>Wed, 16 Apr 2008 11:06:38 +0000</pubDate>

            <category>php</category>
    
    </item>

  
    <item>
        <title>Traduccion dias y meses</title>
        <link>http://www.posteet.com/view/868</link>
        <description>
        <![CDATA[<pre>// Obtenemos y traducimos el nombre del día
$dia=date(&quot;l&quot;);
if ($dia==&quot;Monday&quot;) $dia=&quot;Lunes&quot;;
if ($dia==&quot;Tuesday&quot;) $dia=&quot;Martes&quot;;
if ($dia==&quot;Wednesday&quot;) $dia=&quot;Miércoles&quot;;
if ($dia==&quot;Thursday&quot;) $dia=&quot;Jueves&quot;;
if ($dia==&quot;Friday&quot;) $dia=&quot;Viernes&quot;;
if ($dia==&quot;Saturday&quot;) $dia=&quot;Sabado&quot;;
if ($dia==&quot;Sunday&quot;) $dia=&quot;Domingo&quot;; 

// Obtenemos y traducimos el nombre del mes
$mes=date(&quot;F&quot;);
if ($mes==&quot;January&quot;) $mes=&quot;Enero&quot;;
if ($mes==&quot;February&quot;) $mes=&quot;Febrero&quot;;
if ($mes==&quot;March&quot;) $mes=&quot;Marzo&quot;;
if ($mes==&quot;April&quot;) $mes=&quot;Abril&quot;;
if ($mes==&quot;May&quot;) $mes=&quot;Mayo&quot;;
if ($mes==&quot;June&quot;) $mes=&quot;Junio&quot;;
if ($mes==&quot;July&quot;) $mes=&quot;Julio&quot;;
if ($mes==&quot;August&quot;) $mes=&quot;Agosto&quot;;
if ($mes==&quot;September&quot;) $mes=&quot;Setiembre&quot;;
if ($mes==&quot;October&quot;) $mes=&quot;Octubre&quot;;
if ($mes==&quot;November&quot;) $mes=&quot;Noviembre&quot;;
if ($mes==&quot;December&quot;) $mes=&quot;Diciembre&quot;;</pre> <a href="http://www.posteet.com/tags/fecha">[fecha]</a>  <a href="http://www.posteet.com/tags/php">[php]</a> ]]>        </description>
        <dc:creator>jacinmontava</dc:creator>
        <pubDate>Wed, 09 Apr 2008 06:21:32 +0000</pubDate>

            <category>fecha</category>
            <category>php</category>
    
    </item>

  
    <item>
        <title>Mostrar contenido sólo a visitantes que provengan de buscadores | Solo Código |</title>
        <link>http://www.posteet.com/view/842</link>
        <description>
        <![CDATA[<pre>&lt;?php
  if (preg_match('/q=|search/', $_SERVER['HTTP_REFERER']) ) {
	print '';
  }
  //Dentro del print, meteremos el código que queramos, como puede ser
  //un bloque de anuncios Adsense
?&gt;</pre> <a href="http://www.posteet.com/tags/php">[php]</a> ]]>        </description>
        <dc:creator>jacinmontava</dc:creator>
        <pubDate>Wed, 19 Mar 2008 10:46:10 +0000</pubDate>

            <category>php</category>
    
    </item>

  
    <item>
        <title>Como visualizar elementos criticos en CSS</title>
        <link>http://www.posteet.com/view/804</link>
        <description>
        <![CDATA[<pre>/* Empty Elements */
div:empty, span:empty, li:empty, p:empty, td:empty, th:empty
{ padding: 20px; border: 5px dotted yellow !important; }

/* Empty Attributes */
*[alt=&quot;&quot;], *[title=&quot;&quot;], *[class=&quot;&quot;], *[id=&quot;&quot;], a[href=&quot;&quot;], a[href=&quot;#&quot;]
{ border: 5px solid yellow !important; }

/* Deprecated Elements */
applet, basefont, center, dir, font, isindex, menu, s, strike, u
{ border: 5px dotted red !important; }

/* Deprecated Attributes */

*[background], *[bgcolor], *[clear], *[color], *[compact], *[noshade], *[nowrap], *[size], *[start],
*[bottommargin], *[leftmargin], *[rightmargin], *[topmargin], *[marginheight], *[marginwidth], *[alink], *[link], *[text], *[vlink],
*[align], *[valign],
*[hspace], *[vspace],
*[height], *[width],
ul[type], ol[type], li[type]
{ border: 5px solid red !important; }

/* Proposed Deprecated Elements */
input[type=&quot;button&quot;], big, tt
{ border: 5px dotted #33FF00 !important; }

/* Proposed Deprecated Attributes */
*[border], a[target], table[cellpadding], table[cellspacing], *[name]
{ border: 5px solid #33FF00 !important; }</pre> <a href="http://www.posteet.com/tags/css">[css]</a>  <a href="http://www.posteet.com/tags/estandares">[estandares]</a>  <a href="http://www.posteet.com/tags/usabilidad">[usabilidad]</a>  <a href="http://www.posteet.com/tags/w3c">[w3c]</a> ]]>        </description>
        <dc:creator>jacinmontava</dc:creator>
        <pubDate>Fri, 29 Feb 2008 07:19:59 +0000</pubDate>

            <category>css</category>
            <category>estandares</category>
            <category>usabilidad</category>
            <category>w3c</category>
    
    </item>

  
    <item>
        <title>Creador de nombres o palabras aleatorias con php</title>
        <link>http://www.posteet.com/view/771</link>
        <description>
        <![CDATA[<pre>//palabra aleatoria o creador de nombres aleatorios
function construir_nombre($min=4, $max=8){
	$vocales = array(&quot;a&quot;, &quot;e&quot;, &quot;i&quot;, &quot;o&quot;, &quot;u&quot;);
	$consonantes = array(&quot;b&quot;, &quot;c&quot;, &quot;d&quot;, &quot;f&quot;, &quot;g&quot;, &quot;j&quot;, &quot;l&quot;, &quot;m&quot;, &quot;n&quot;, &quot;p&quot;, &quot;r&quot;, &quot;s&quot;, &quot;t&quot;);
	$random_nombre = rand($min, $max);//largo de la palabra
	$random = rand(0,1);//si empieza por vocal o consonante
	for($j=0;$j&lt;$random_nombre;$j++){//palabra
		switch($random){
			case 0: $random_vocales = rand(0, count($vocales)-1); $nombre.= $vocales[$random_vocales]; $random = 1; break;
			case 1: $random_consonantes = rand(0, count($consonantes)-1); $nombre.= $consonantes[$random_consonantes]; $random = 0; break;
		}
	}
	return $nombre;
}

echo ucfirst(construir_nombre());
//ejemplos Bumuc, Acal, Baluceda, Leceme, Rirobit...</pre> <a href="http://www.posteet.com/tags/php">[php]</a> ]]>        </description>
        <dc:creator>jacinmontava</dc:creator>
        <pubDate>Tue, 19 Feb 2008 08:19:21 +0000</pubDate>

            <category>php</category>
    
    </item>

  
    <item>
        <title>Enviar formulario al pulsar 'Intro'</title>
        <link>http://www.posteet.com/view/768</link>
        <description>
        <![CDATA[<pre>&lt;html&gt;
&lt;head&gt;
   &lt;title&gt;Enviar formulario al pulsar un enlace&lt;/title&gt;
&lt;script&gt;
function enviar_formulario(){
   document.formulario1.submit()
}
&lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;form action=&quot;pagina_destino.php&quot; method=post name=&quot;formulario1&quot;&gt;
   &lt;input name=&quot;nombre&quot; onkeypress=&quot;if (event.keyCode == 13) enviar_formulario()&quot;/&gt;
&lt;/form&gt;

&lt;/body&gt;
&lt;/html&gt;</pre> <a href="http://www.posteet.com/tags/formularios">[formularios]</a>  <a href="http://www.posteet.com/tags/javascript">[javascript]</a> ]]>        </description>
        <dc:creator>jacinmontava</dc:creator>
        <pubDate>Mon, 18 Feb 2008 10:37:55 +0000</pubDate>

            <category>formularios</category>
            <category>javascript</category>
    
    </item>

  
    <item>
        <title>Enviar Form desde enlace</title>
        <link>http://www.posteet.com/view/767</link>
        <description>
        <![CDATA[<pre>&lt;html&gt;
&lt;head&gt;
   &lt;title&gt;Enviar formulario al pulsar un enlace&lt;/title&gt;
&lt;script&gt;
function enviar_formulario(){
   document.formulario1.submit()
}
&lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;form action=&quot;pagina_destino.php&quot; method=post name=&quot;formulario1&quot;&gt;
&lt;input type=&quot;hidden&quot; name=&quot;campo1&quot; value=&quot;valor&quot;&gt;
&lt;input type=&quot;hidden&quot; name=&quot;campo2&quot; value=&quot;otroValor&quot;&gt;
&lt;/form&gt;

&lt;a href=&quot;javascript:enviar_formulario()&quot;&gt;Enviar formulario&lt;/a&gt;
&lt;/body&gt;
&lt;/html&gt;</pre> <a href="http://www.posteet.com/tags/formularios">[formularios]</a>  <a href="http://www.posteet.com/tags/javascript">[javascript]</a> ]]>        </description>
        <dc:creator>jacinmontava</dc:creator>
        <pubDate>Mon, 18 Feb 2008 10:33:56 +0000</pubDate>

            <category>formularios</category>
            <category>javascript</category>
    
    </item>

  
    <item>
        <title>Solapamiento Div's y Flash</title>
        <link>http://www.posteet.com/view/723</link>
        <description>
        <![CDATA[<pre>&lt;object classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0&quot; width=&quot;500&quot; height=&quot;200&quot; title=&quot;slip&quot;&gt;
&lt;param name=&quot;movie&quot; value=&quot;RUTA_ARCHIVO&quot;&gt;
&lt;param name=&quot;quality&quot; value=&quot;high&quot;&gt;
&lt;param name=&quot;wmode&quot; value=&quot;transparent&quot;&gt; &lt;!-- este es el parametro que hara que los div's esten por encima del objeto flash --&gt; 
&lt;embed src=&quot;RUTA_ARCHIVO&quot; width=&quot;500&quot; height=&quot;200&quot; quality=&quot;high&quot; pluginspage=&quot;http://www.macromedia.com/go/getflashplayer&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot;&gt;&lt;/embed&gt;
&lt;/object&gt;</pre> <a href="http://www.posteet.com/tags/css">[css]</a>  <a href="http://www.posteet.com/tags/flash">[flash]</a>  <a href="http://www.posteet.com/tags/html">[html]</a>  <a href="http://www.posteet.com/tags/object">[object]</a> ]]>        </description>
        <dc:creator>jacinmontava</dc:creator>
        <pubDate>Mon, 04 Feb 2008 09:54:11 +0000</pubDate>

            <category>css</category>
            <category>flash</category>
            <category>html</category>
            <category>object</category>
    
    </item>

  
    <item>
        <title>Comprueba que el NIF sea valido</title>
        <link>http://www.posteet.com/view/681</link>
        <description>
        <![CDATA[<pre>function nif_valido(campo)
{
abc=campo.value
nif=abc.substring(0,abc.length-1)
let=abc.charAt(abc.length-1)
if (!isNaN(let))
 {
  alert('El nif debe tener 8 digitos y una letra al final ')
  campo.focus()
  return false
 }
else
 {
  cadena=&quot;TRWAGMYFPDXBNJZSQVHLCKET&quot;
  posicion = nif % 23
  letra = cadena.substring(posicion,posicion+1)
  if (letra!=let.toUpperCase())
   {
    alert(&quot;NIF incorrecto.Revise la letra y no deje espacios. &quot;)
    campo.focus()
    return false
   }
 }

return(true)

}</pre> <a href="http://www.posteet.com/tags/formularios">[formularios]</a>  <a href="http://www.posteet.com/tags/javascript">[javascript]</a>  <a href="http://www.posteet.com/tags/validacion">[validacion]</a> ]]>        </description>
        <dc:creator>jacinmontava</dc:creator>
        <pubDate>Thu, 17 Jan 2008 13:16:03 +0000</pubDate>

            <category>formularios</category>
            <category>javascript</category>
            <category>validacion</category>
    
    </item>

  
    <item>
        <title>Mostrar una imagen aleatoria con PHP</title>
        <link>http://www.posteet.com/view/657</link>
        <description>
        <![CDATA[<pre>&lt;?php 
//Crear una array con las distintas imagenes 
$imagenes[0]='imagen1.gif'; 
$imagenes[1]='imagen2.gif'; 
$imagenes[2]='imagen3.gif'; 
$imagenes[3]='imagen4.gif'; 
$imagenes[4]='imagen5.gif'; 
$imagenes[5]='imagen6.gif';     
// Elegimos un valor entre 0 y 5 
$i=rand(0,5);   
// Mostramos la imagen  
print '&lt;img src=&quot;'.$imagenes[$i].'&quot;&gt;';
?&gt;</pre> <a href="http://www.posteet.com/tags/imagenes">[imagenes]</a>  <a href="http://www.posteet.com/tags/php">[php]</a> ]]>        </description>
        <dc:creator>jacinmontava</dc:creator>
        <pubDate>Tue, 08 Jan 2008 11:45:37 +0000</pubDate>

            <category>imagenes</category>
            <category>php</category>
    
    </item>

  
    <item>
        <title>Youtube estándar con (X)HTML válido</title>
        <link>http://www.posteet.com/view/656</link>
        <description>
        <![CDATA[<pre>&lt;object data=&quot;http://www.youtube.com/v/O0G7iKj6PS0&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;425&quot; height=&quot;350&quot;&gt; &lt;param name=&quot;quality&quot; value=&quot;high&quot; /&gt; &lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/O0G7iKj6PS0&quot; /&gt; &lt;img border=&quot;0&quot; src=&quot;/img/video.png&quot; alt=&quot;Video (Objeto multimedia)&quot; /&gt; &lt;/object&gt;</pre> <a href="http://www.posteet.com/tags/estandares">[estandares]</a>  <a href="http://www.posteet.com/tags/html">[html]</a> ]]>        </description>
        <dc:creator>jacinmontava</dc:creator>
        <pubDate>Tue, 08 Jan 2008 08:14:36 +0000</pubDate>

            <category>estandares</category>
            <category>html</category>
    
    </item>

  
    <item>
        <title>Mostrar código fuente de una página con PHP</title>
        <link>http://www.posteet.com/view/635</link>
        <description>
        <![CDATA[<pre>&lt;?
$url = 'http://www.google.es';
$lineas = file($url);
for ($i = 0; $i &lt;count($lineas); $i++)
{
	$total = $total.htmlentities($lineas[$i]).&quot;&lt;br/&gt;&quot;;
}
echo $total;
?&gt;</pre> <a href="http://www.posteet.com/tags/php">[php]</a> ]]>        </description>
        <dc:creator>jacinmontava</dc:creator>
        <pubDate>Thu, 27 Dec 2007 15:33:34 +0000</pubDate>

            <category>php</category>
    
    </item>


</channel>
</rss>
