Clean Image File Name Function In Php
clean image file name function in php
clean, image, file, name, function, in, php
Clean Image File Name Function In Php
Post Description: clean image file name function in php
POST# 1065
Posted On: Fri Feb 29, 2008 12:01 pm
web hosting
Topic: Clean Image File Name Function In Php
i frequently like to use this page because it sometimes image files are too big or have a huge file name and then the browser doesn't open it, for example, i know internet explorer you can do that. but this way you can reduce the number of charracter and make the image or picture file name shorter.much better

function clean_image_name($name)
{
$name = strtolower($name);
$code_entities_match = array( '&quot;' ,'!' ,'@' ,'#' ,'$' ,'%' ,'^' ,'&' ,'*' ,'(' ,')' ,'+' ,'{' ,'}' ,'|' ,':' ,'"' ,'<' ,'>' ,'?' ,'[' ,']' ,'' ,';' ,"'" ,',' ,'_' ,'/' ,'*' ,'+' ,'~' ,'`' ,'=' ,' ' ,'---' ,'--','--');
$code_entities_replace = array('' ,'-' ,'-' ,'' ,'' ,'' ,'-' ,'-' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'-' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'' ,'-' ,'-' ,'-' ,'' ,'' ,'' ,'' ,'' ,'-' ,'-' ,'-','-');
$name = str_replace($code_entities_match, $code_entities_replace, $name);
return $name;
}
Share:
BBCODE:
HTML Code:


Mon Mar 24, 2008 6:01 pm
1
stan
Reply #1789
Picture 24--camara-digital.jpg
i love taking photographs but i always have problems posting my images online because the camera always makes a really huge and big file and the website will not allow me to upload or post my pictures. i hope this can help me.

What do you think?

* name:  

* email:  

* Please enter comments:


Receive Replies on my Comments
(An email will be sent to you when someone replies to your comments)

Add image to comments
yes no             upload