Results 1 to 4 of 4

Thread: Php Seo Function

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2011
    Posts
    11

    Default Php Seo Function

    Php Seo Function

    <?php
    function seo($str, $replace=array(), $delimiter='-'){
    setlocale(LC_ALL, 'en_US.UTF8');
    if( !empty($replace) ) {
    $str = str_replace((array)$replace, ' ', $str);
    }else{
    $trArr = array('','','ı','İ','ş','Ş','ğ','Ğ','','','', '');
    $toArr = array('c','c','i','i','s','s','g','g','o','o','u', 'u');
    $str = str_replace($trArr,$toArr,$str);
    }


    $clean = iconv('UTF-8', 'ASCII//TRANSLIT', $str);
    $clean = preg_replace("/[^a-zA-Z0-9\/_|+ -]/", '', $clean);
    $clean = mb_strtolower(trim($clean, '-'),'UTF-8');
    $clean = preg_replace("/[\/_|+ -]+/", $delimiter, $clean);


    return $clean;
    }
    ?>

  2. #2
    Join Date
    Feb 2012
    Posts
    17

    Default

    Your PHP function is very useful for human beings. Thanks for sharing.





    Exam Questions | Test Questions | TestKiller | Exam Dumps
    Last edited by jimmy carter; 02-22-2012 at 07:35 AM.

  3. #3
    Join Date
    Mar 2012
    Posts
    6

    Default

    Thankyou ^_^

  4. #4
    Join Date
    Aug 2015
    Posts
    5

    Default

    so ... what does this php script actually do ?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •