afaaro Posted June 7, 2010 Share Posted June 7, 2010 Hi everyone, this is my first topic I really need help if someone can give me a solution. In my database; am using 2 provider which is Youtube and Blip Example I want to make if the file is youtube it should play youtube and when is blip it should play blip. How can i do it. These are the database and code ".$db_prefix."video_config ( `key` varchar(255) collate latin1_general_ci NOT NULL, `value` text collate latin1_general_ci NOT NULL, UNIQUE KEY `key` (`key`) ) TYPE=MyISAM;"; "".$db_prefix."video_config (`key`, `value`) VALUES ('thumbnail', 'http://i.ytimg.com/vi/{{VIDEOID}}/default.jpg'), ('width', '425'), ('height', '355'), ('code', '<object width=\"{{W}}\" height=\"{{H}}\"><param name=\"movie\" value=\"http://www.youtube.com/v/{{VIDEOID}}\"></param><param name=\"wmode\" value=\"transparent\"></param><embed src=\"http://www.youtube.com/v/{{VIDEOID}}\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"{{W}}\" height=\"{{H}}\"></embed></object>'), ('blipv', '<embed src=\"http://a.blip.tv/scripts/flash/showplayer.swf?file=http://blip.tv/rss/flash/{{VIDEOID}}\" type=\"application/x-shockwave-flash\" width=\"{{W}}\" height=\"{{H}}\" allowscriptaccess=\"always\" allowfullscreen=\"true\"></embed>')"; $patterns = array('{{W}}','{{H}}','{{VIDEOID}}'); $replaces = array($width,$height,$videoid); $player = str_replace($patterns,$replaces,outCode($config['code'])); $thumbnail = str_replace("{{VIDEOID}}",$videoid,outCode($config['thumbnail'])); $thumbnail = "<img src='$thumbnail' border='0' width='41' height='34' alt='' align='left' class='box' style='margin:3px 6px 0 2px;' />"; This one [ outCode($config['code']) ] is just youutbe and I need to use this one as well [outCode($config['blipv']) ] Link to comment https://forums.phpfreaks.com/topic/204114-need-help-with-this-code/ Share on other sites More sharing options...
afaaro Posted June 8, 2010 Author Share Posted June 8, 2010 Is there anyone can help me with the above code? Link to comment https://forums.phpfreaks.com/topic/204114-need-help-with-this-code/#findComment-1069379 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.