function img_check($string, $width) { if($width > "475") { return " Image too big!
Please use thumbnails
Click here for the image"; } else { $string = trim($string); if(preg_match("/^(ht|f)tp:\/\/([a-z0-9-]+(\.[a-z0-9-]+)*\.[a-z0-9]{1,4})(\/[\w%~!*().\'[:space:]-]+)+\.(jpe?g|png|gif|bmp)(\?[=&+\w%@:\/.~!*()\'-]*)?$/ix", $string)) { return "\"\""; } else { return " Invalid Image!"; } } } function img_check2($string) { $string = trim($string); if(preg_match("/^(ht|f)tp:\/\/([a-z0-9-]+(\.[a-z0-9-]+)*\.[a-z0-9]{1,4})(\/[\w%~!*().\'[:space:]-]+)+\.(jpe?g|png|gif|bmp)(\?[=&+\w%@:\/.~!*()\'-]*)?$/ix", $string)) { $size = @getimagesize($string); $width = $size[0]; if ($width > "475") { return " Image too big!
Please use thumbnails
Click here for the image"; } else { $new_width = "".$width.""; } return "\"\""; } else { return " Invalid Image!"; } }