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

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

    
    <item>
        <title>Formater une URL proprement pour URL Rewriting</title>
        <link>http://www.posteet.com/view/554</link>
        <description>
        <![CDATA[<pre>function format_url( $url, $type = '' ){
	$url = preg_replace(&quot;`\[.*\]`U&quot;,&quot;&quot;,$url);
	$url = preg_replace('`&amp;(amp;)?#?[a-z0-9]+;`i','-',$url);
	$url = htmlentities($url, ENT_COMPAT);
	$url = preg_replace( &quot;`&amp;([a-z])(acute|uml|circ|grave|ring|cedil|slash|tilde|caron|lig);`i&quot;,&quot;\\1&quot;, $url );
	$url = preg_replace( array(&quot;`[^a-z0-9]`i&quot;,&quot;`[-]+`&quot;) , &quot;-&quot;, $url);
	$url = ( $url == &quot;&quot; ) ? $type : strtolower(trim($url, '-'));
	return $url;
}</pre> <a href="http://www.posteet.com/tags/php">[php]</a>  <a href="http://www.posteet.com/tags/uri">[uri]</a>  <a href="http://www.posteet.com/tags/url rewriting">[url rewriting]</a> ]]>        </description>
        <dc:creator>mikaweb</dc:creator>
        <pubDate>Sat, 08 Dec 2007 08:38:12 +0000</pubDate>

            <category>php</category>
            <category>uri</category>
            <category>url rewriting</category>
    
    </item>

  
    <item>
        <title>Fonction de mise en forme de texte pour utilisation dans une URL (Par exemple pour de l'URL Rewriting)</title>
        <link>http://www.posteet.com/view/214</link>
        <description>
        <![CDATA[<pre>function convert_for_uri($text) {
  // Définition du séparateur
  define(&quot;SEPARATOR&quot;, &quot;-&quot;);

  $tofind = &quot;àáâãäåòóôõöøèéêëçìíîïùúûüÿñ&quot;; // Lettre accentuées
  $replac = &quot;aaaaaaooooooeeeeciiiiuuuuyn&quot;; // Equivalant non accentué

  // Mise en minuscule + suppression des lettres accentuées par leur équivalant non accentué
  $text = strtr(strtolower($text),$tofind,$replac);

  // Remplacement de caractère non alphanumérique par un séparateur
  $text = ereg_replace(&quot;[^a-z0-9]&quot;, SEPARATOR, $text);

  // Suppression des doubles séparateurs
  while (strstr($text, SEPARATOR . SEPARATOR))
    $text = str_replace(SEPARATOR . SEPARATOR, SEPARATOR, $text);

  // Retour avec suppression d’un possible séparateur en fin de chaîne
  return(ereg_replace(SEPARATOR . &quot;$&quot;, &quot;&quot;, $text));
}</pre> <a href="http://www.posteet.com/tags/php">[php]</a>  <a href="http://www.posteet.com/tags/uri">[uri]</a>  <a href="http://www.posteet.com/tags/url rewriting">[url rewriting]</a>  <a href="http://www.posteet.com/tags/web">[web]</a> ]]>        </description>
        <dc:creator>xillon</dc:creator>
        <pubDate>Mon, 05 Nov 2007 09:41:53 +0000</pubDate>

            <category>php</category>
            <category>uri</category>
            <category>url rewriting</category>
            <category>web</category>
    
    </item>


</channel>
</rss>
