Joined: 13th Jul 2010
Good way to check link mime-type embed or display in php?
I usually dont mess with web design but ive been for a few days slapping together a media site and basicly what I need to do is check posts for links and mime-types before i display them ect. Atleast I think thats the concept.
I need to check mime-types because I only want people to be able to post linkage for audio/video/image/shockwave ect??
ok I check their post for links like this does this seem efficent? Is it ok to assume I can play all the audio/video/image/shockwave in a flash player?
I just need some input before I continue writing more cases.
function GetContent($text) //$text is url or path
Joined: 7th Apr 2010
Re: Good way to check link mime-type embed or display in php?
Instead of doing many case clauses, I would use a lookup table/dictionary that would associate an array of mime's with a type (e.g. video). I think what you have so far is good, especially if you're just linking them and not uploading anything. As far as displaying everything in flash player, I think that should work but I wouldn't display image just due to the unnecessary flash player overhead.
--- Andrewbob - I would be on the fucking copter of rofls Programmer, Web Developer, and Graphics Designer