Thanks for the reply Shawn!
I thought I need to change to7bit afterwards, this has confused me...
I got it working with this now:
Replaced %40 back to @ afterwards. Thanks for the little push
I thought I need to change to7bit afterwards, this has confused me...
I got it working with this now:
PHP Code:
function clean_img_name($text) {
$text = strip_tags(lowercase($text));
$code_entities_match = array(' ?',' ','--','"','!','@','#','$','%','^','&','*','(',')','+','{','}','|',':','"','<','>','?','[',']','\\',';',"'",',','/','*','+','~','`','=');
$code_entities_replace = array('','-','-','','','@','','','','','','','','','','','','','','','','','','','','');
$text = str_replace($code_entities_match, $code_entities_replace, $text);
$text = urlencode($text);
$text = str_replace('--','-',$text);
$text = str_replace('%40','@',$text);
$text = rtrim($text, "-");
return $text;
}
Replaced %40 back to @ afterwards. Thanks for the little push