Home :: Forums :: Register :: Sign In :: Links :: Downloads

Knowledge Base Navigation

Articles: 50 Categories: 8

KB Article: Googletap with keywords in Url

Article:Googletap with keywords in Url    
Submitted By:Telli
Date Added:03-08-2008 10:18:14
Hits:4,195



SEO titles in your URL's.


function prepare_title($title) {
   //this is how telli (http://www.codezwiz.com) gets seo titles
   $abc = "1234567890abcdefghijklmnopqrstuvwxyz_";
   $title = strtolower($title);
   $r = '';
   for($i=0; $i < strlen($title); $i++) {
      if (strpos($abc, $title[$i]) !== false) {
         $r .= $title[$i];
      }
      if ( ($title[$i] == ' ') && ($r[strlen($r)-1] != ' ') ) {
         $r .= ' ';
      }
   }
   $r = trim($r);
   return str_replace(' ', '-', $r);
}


To use:


$seo_title = prepare_title($title);
modules.php?name=Forums&file=viewtopic&t=$topic_id&title=$seo_title


If your having problems post a bit of the code where the issue is.


Post: [ Register or login to view links on this board. ]


Current rating: 10 by 2 users
Please take one second and rate this article...

Not a Chance 12345678910 Absolutely

No Comments Allowed for Anonymous, please register.


Jump to a selected article...