Revision: 43253
Updated Code
at November 5, 2011 02:37 by KabuqueJoe
Updated Code
<?php function seoUrl($str){ /** by Jonatas Urias B Teixeira **/ $a = array('/(à |á|â|ã|ä|Ã¥|æ)/','/(è|é|ê|ë)/','/(ì|Ã|î|ï)/','/(ð|ò|ó|ô|õ|ö|ø|Å“)/','/(ù|ú|û|ü)/','/ç/','/þ/','/ñ/','/ß/','/(ý|ÿ)/','/(=|\+|\/|\\\|\.|\'|\_|\\n| |\(|\))/','/[^a-z0-9_ -]/s','/-{2,}/s'); $b = array('a','e','i','o','u','c','d','n','ss','y','-','','-'); return trim(preg_replace($a, $b, strtolower($str)),'-'); } ?>
Revision: 43252
Updated Code
at April 29, 2011 23:51 by KabuqueJoe
Updated Code
<?php function seoUrl($str){ /** by Jonatas Urias B Teixeira **/ $a = array('/(à |á|â|ã|ä|Ã¥|æ)/','/(è|é|ê|ë)/','/(ì|Ã|î|ï)/','/(ð|ò|ó|ô|õ|ö|ø)/','/(ù|ú|û|ü)/','/ç/','/þ/','/ñ/','/ß/','/(ý|ÿ)/','/(=|\+|\/|\\\|\.|\'|\_|\\n| |\(|\))/','/[^a-z0-9_ -]/s','/-{2,}/s'); $b = array('a','e','i','o','u','c','d','n','s','y','-','','-'); return trim(preg_replace($a, $b, strtolower($str)),'-'); } ?>
Revision: 43251
Updated Code
at March 21, 2011 04:21 by KabuqueJoe
Updated Code
<?php function seoUrl($str){ /** by Jonatas Urias B Teixeira **/ $a = array('/(à |á|â|ã|ä|Ã¥|æ)/','/(è|é|ê|ë)/','/(ì|Ã|î|ï)/','/(ð|ò|ó|ô|õ|ö|ø)/','/(ù|ú|û|ü)/','/ç/','/þ/','/ñ/','/ß/','/(ý|ÿ)/','/(=|\+|\/|\\\|\.|\'|\_|\\n| |\(|\))/','/[^a-z0-9_ -]/s','/-{2,}/s','/([^a-z]*)([a-z-]*)([^a-z])/'); $b = array('a','e','i','o','u','c','d','n','s','y','-','','-',"$2"); return trim(preg_replace($a, $b, strtolower($str)),'-'); } ?>
Revision: 43250
Updated Code
at March 21, 2011 04:20 by KabuqueJoe
Updated Code
<?php function seoUrl($str){ /** by Jonatas Urias B Teixeira **/ $a = array('/(à|á|â|ã|ä|Ã¥|æ)/','/(è|é|ê|ë)/','/(ì|ÃÂ|î|ï)/','/(ð|ò|ó|ô|õ|ö|ø)/','/(ù|ú|û|ü)/','/ç/','/þ/','/ñ/','/�/','/(ý|ÿ)/','/(=|\+|\/|\\\|\.|\'|\_|\\n| |\(|\))/','/[^a-z0-9_ -]/s','/-{2,}/s','/([^a-z]*)([a-z-]*)([^a-z])/'); $b = array('a','e','i','o','u','c','d','n','s','y','-','','-',"$2"); return trim(preg_replace($a, $b, strtolower($str)),'-'); } ?>
Revision: 43249
Updated Code
at March 21, 2011 04:15 by KabuqueJoe
Updated Code
<?php function seoUrl($str){ /** by Jonatas Urias B Teixeira **/ $a = array('/(à |á|â|ã|ä|Ã¥|æ)/','/(è|é|ê|ë)/','/(ì|Ã|î|ï)/','/(ð|ò|ó|ô|õ|ö|ø)/','/(ù|ú|û|ü)/','/ç/','/þ/','/ñ/','/ß/','/(ý|ÿ)/','/(=|\+|\/|\\\|\.|\'|\_|\\n| |\(|\))/','/[^a-z0-9_ -]/s','/-{2,}/s','/([^a-z]*)([a-z-]*)([^a-z])/'); $b = array('a','e','i','o','u','c','d','n','s','y','-','','-',"$2"); return trim(preg_replace($a, $b, strtolower($str)),'-'); } ?>
Revision: 43248
Updated Code
at March 21, 2011 04:12 by KabuqueJoe
Updated Code
<?php function seoUrl($str){ /** by Jonatas Urias B Teixeira **/ $a = array('/(à |á|â|ã|ä|Ã¥|æ)/','/(è|é|ê|ë)/','/(ì|Ã|î|ï)/','/(ð|ò|ó|ô|õ|ö|ø)/','/(ù|ú|û|ü)/','/ç/','/þ/','/ñ/','/ß/','/(ý|ÿ)/','/(=|\+|\/|\\\|\.|\'|\_|\\n| |\(|\))/','/[^a-z0-9_ -]/s','/-{2,}/s','/([^a-z]*)([a-z-]*)([^a-z])/'); $b = array('a','e','i','o','u','c','d','n','s','y','-','','-',"$2"); return trim(trim(preg_replace($a, $b, strtolower($str))),'-'); } ?>
Revision: 43247
Updated Code
at March 21, 2011 04:12 by KabuqueJoe
Updated Code
<?php function seoUrl($str){ /** by Jonatas Urias B Teixeira **/ $a = array('/(à|á|â|ã|ä|Ã¥|æ)/','/(è|é|ê|ë)/','/(ì|ÃÂ|î|ï)/','/(ð|ò|ó|ô|õ|ö|ø)/','/(ù|ú|û|ü)/','/ç/','/þ/','/ñ/','/�/','/(ý|ÿ)/','/(=|\+|\/|\\\|\.|\'|\_|\\n| |\(|\))/','/[^a-z0-9_ -]/s','/-{2,}/s','/([^a-z]*)([a-z-]*)([^a-z])/'); $b = array('a','e','i','o','u','c','d','n','s','y','-','','-',"$2"); return trim(trim(preg_replace($a, $b, strtolower($str))),'-'); } ?>
Revision: 43246
Updated Code
at March 20, 2011 07:27 by KabuqueJoe
Updated Code
<?php function seoUrl($str){ /** by Jonatas Urias B Teixeira **/ $a = array('/(à |á|â|ã|ä|Ã¥|æ)/','/(è|é|ê|ë)/','/(ì|Ã|î|ï)/','/(ð|ò|ó|ô|õ|ö|ø)/','/(ù|ú|û|ü)/','/ç/','/þ/','/ñ/','/ß/','/(ý|ÿ)/','/(=|\+|\/|\\\|\.|\'|\_|\\n| |\(|\))/','/[^a-z0-9_ -]/s','/-{2,}/s','/([^a-z]*)([a-z-]*)([^a-z])/'); $b = array('a','e','i','o','u','c','d','n','s','y','-','','-',"$2"); return trim(trim(preg_replace($a, $b, strtolower($str))),'-'); } ?>
Revision: 43245
Updated Code
at March 20, 2011 07:21 by KabuqueJoe
Updated Code
<?php function seoUrl($str){ /** by Jonatas Urias B Teixeira **/ $a = array('/(à |á|â|ã|ä|Ã¥|æ)/','/(è|é|ê|ë)/','/(ì|í|î|ï)/','/(ð|ò|ó|ô|õ|ö|ø)/','/(ù|ú|û|ü)/','/ç/','/þ/','/ñ/','/ß/','/(ý|ÿ)/','/(=|\+|\/|\\|\.|\'|\_|\n| |\(|\))/','/[^a-z0-9_ -]/s','/-{2,}/s','/([^a-z]*)([a-z-]*)([^a-z])/','/(=|\+|\/|\\\|\.|\'|\_|\\n| |\(|\))/','/[^a-z0-9_ -]/s','/-{2,}/s','/([^a-z]*)([a-z-]*)([^a-z])/'); $b = array('a','e','i','o','u','c','d','n','s','y','-','','-',"$2"); return trim(trim(preg_replace($a, $b, strtolower($str))),'-'); } ?>
Revision: 43244
Updated Code
at March 20, 2011 06:03 by KabuqueJoe
Updated Code
<?php function seoUrl($str){ /** by Jonatas Urias B Teixeira **/ $a = array('/(à|á|â|ã|ä|Ã¥|æ)/','/(è|é|ê|ë)/','/(ì|ÃÂ|î|ï)/','/(ð|ò|ó|ô|õ|ö|ø)/','/(ù|ú|û|ü)/','/ç/','/þ/','/ñ/','/�/','/(ý|ÿ)/','/(=|\+|\/|\\\|\.|\'|\_|\\n| |\(|\))/','/[^a-z0-9_ -]/s','/-{2,}/s','/([^a-z]*)([a-z-]*)([^a-z])/'); $b = array('a','e','i','o','u','c','d','n','s','y','-','','-',"$2"); return trim(trim(preg_replace($a, $b, strtolower($str))),'-'); } ?>
Revision: 43243
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at March 20, 2011 05:59 by KabuqueJoe
Initial Code
<?php function seoUrl($str){ /** by Jonatas Urias B Teixeira **/ $a = array('/(à |á|â|ã|ä|Ã¥|æ)/','/(è|é|ê|ë)/','/(ì|Ã|î|ï)/','/(ð|ò|ó|ô|õ|ö|ø)/','/(ù|ú|û|ü)/','/ç/','/þ/','/ñ/','/ß/','/(ý|ÿ)/','/(=|\+|\/|\\\|\.|\'|\_|\\n| |\(|\))/','/[^a-z0-9_ -]/s','/-{2,}/s','/([^a-z]*)([a-z-]*)([^a-z])/'); $b = array('a','e','i','o','u','c','d','n','s','y','-','','-',"$2"); return trim(trim(preg_replace($a, $b, strtolower($str))),'-'); } ?>
Initial URL
http://tinyphp.tumblr.com/post/3750074024/php-seo-url-string-filter
Initial Description
This function will transform any string to an seo url like string. It suports latin, french and german special characters. Example: applying the function to "Exemplo de aplicação da função" returns "exemplo-de-aplicacao-da-funcao"
Initial Title
PHP SEO url string filter
Initial Tags
url, php
Initial Language
PHP