I m trying to make simpe banner rotation script(support gif/jpg and flash file). I am having problem with flash file.
how to check url . ?
letsay I have $imageurl variable which holds the banner link.
if the image url is gif or jpg (ie. http://www.something.com/something.gif)
then i want to display follwoing code
<a href=\"banners.php?op=click&bid=$bid\" target=\"_blank\"><img src=\"$imageurl\" border=\"0\" width=\"468\" height=\"60\" alt=\"\"></a>
if the image url is swf (ie. http://www.something.com/something.swf)
then i want to display
<a href=\"banners.php?op=click&bid=$bid\" target=\"_blank\"><embed src=\"$imageurl\" type=\"application/x-shockwave-flash\" border=\"0\" width=\"468\" height=\"60\" alt=\"\"></a>
so.. i want to use the same variable for pictures and flash file.
Any smart functin or technic ?
cheers