As we have imagecreatefrompng, imagecreatefromgif, imagecreatefromjpeg....for images....Is there anything premade function for swf.....or flv.....or vedio files.....
Actually I am trying to add flash files with my image function.....
I hope this is correct.....please have a look.
PHP Code:
if (preg_match("/jpg|jpeg|JPG|JPEG/",$system[1])){$src_img=imagecreatefromjpeg($name);} if (preg_match("/gif|GIF/",$system[1])){$src_img=imagecreatefromgif($name);} if (preg_match("/png|PNG/",$system[1])){$src_img=imagecreatefrompng($name);} if (preg_match("/swf|SWF/",$system[1])){$src_img=imagecreatefrompng($name);} if (preg_match("/flv|FLV/",$system[1])){$src_img=imagecreatefrompng($name);}
I'm out of my element here, but I really doubt that using imagecreatefrompng on anything other than a png will work as intended. What exactly are you trying to do? Even if imagecreatefrompng returned a valid resource I don't see how any of the GD functions would apply to a video rather than an image.
Also, you can use the i flag in your regular expression to ignore case: