function generateSeoURL($string, $wordLimit = 0){ $before = array('I', 'ı', 'ğ', 'ü', 'ş', 'ö', 'ç', 'İ', 'Ğ', 'Ü', 'Ö', 'Ç', 'Ş'); // , '\'', '""' $after = array('i', 'i', 'g', 'u', 's', 'o', 'c', 'i', 'g', 'u', 'o', 'c','s'); // , '', '' $string = str_replace($before, $after, $string); $separator = '-'; if($wordLimit != 0){ $wordArr = explode(' ', $string); $string = implode(' ', array_slice($wordArr, 0, $wordLimit)); } $quoteSeparator = preg_quote($separator, '#'); $trans = array( '&.+?;' => '', '[^\w\d _-]' => '', '\s+' => $separator, '('.$quoteSeparator.')+'=> $separator ); $string = strip_tags($string); foreach ($trans as $key => $val){ $string = preg_replace('#'.$key.'#i'.('UTF8_ENABLED' ? 'u' : ''), $val, $string); } $string = Transliterator::create('tr-lower')->transliterate($string); return trim(trim($string, $separator)); } function s2p($sinematurk){ return 173 * (int) ($sinematurk); } function p2s($programizle){ return (int) ($programizle / 173); } function list_movies_az(){ $myData = ""; $myData .= "
"; $myData .= "
"; $myData .= "