function clean_image_name($name)
{
$name = strtolower($name);
$code_entities_match = array( '"' ,'!' ,'@' ,'#' ,'$' ,'%' ,'^' ,'&' ,'*' ,'(' ,')' ,'+' ,'{' ,'}' ,'|' ,':' ,'"' ,'<' ,'>' ,'?' ,'[' ,']' ,'' ,';' ,"'" ,',' ,'_' ,'/' ,'*' ,'+' ,'~' ,'`' ,'=' ,' ' ,'---' ,'--','--');
$code_entities_replace = array('' ,'-' ,'-' ,'' ,'' ,'' ,'-' ,'-' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'-' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'-' ,'-' ,'-' ,'' ,'' ,'' ,'' ,'' ,'-' ,'-' ,'-','-');
$name = str_replace($code_entities_match, $code_entities_replace, $name);
return $name;
}
clean image file name function in php
clean image file name function in php
Post Description: clean image file name function in php Snippets
Post Tags:
This Post Has Been Viewed 689 Times Since Mon Feb 25, 2008 10:32 am Author hostman with 1 replies
Post Description: clean image file name function in php Snippets
Post Tags:
This Post Has Been Viewed 689 Times Since Mon Feb 25, 2008 10:32 am Author hostman with 1 replies
clean image file name function in php
Advertise On This Page
Leave Your Comments
Share
Share this page by putting this URL in your comments to other websites like myspace, Facebook, Twitter friendster, Hi5, Groups, Boards, Forum or others. Just Copy and Paste this Code
URL:
To embed this topic, just copy the code from the "Embed" box. Once you've copied the code, just paste it into your website or blog to embed it.

Embed:
BBCODE is use on forums. You can put this code on all your BBCODE enabled forums like PhpBB, vBulletin® and others. Just Copy and Paste this code on your Posts and Replies on your forums

BBCODE:
Webmasters - Exchange Links With Us. Add related websites to this topic
Links Related to : clean image file name function in php
Comments and replies About clean image file name function in php
:: 1 :: Reply #98690 Reply By some On Sun Mar 29, 2009 7:00 pm
bad. does not take account for every symbol and unicode. should be done with a regex
