ÓÅ¿áÍÁ¶¹ÌÚѶÊÓƵhtmlµØַתflash swfµØÖ·
ÔÎÄ£ºhttp://www.phpddt.com/php/html-to-flashswf.html
ºÜ¶àÓû§²»ÖªµÀÈçºÎ¸´ÖÆflashµØÖ·£¬Ö»ÄÜÔÚ³ÌÐòÖаïËûÃÇÌæ»»ÁË£º
<!--?php /** * Ö§³ÖÓÅ¿á¡¢ÍÁ¶¹¡¢ÌÚѶÊÓƵhtmlµ½swfת»» * @link http://www.phpddt.com */ function convert_html_to_swf($url = '') { if(!is_string($url) || empty($url)) return ; if(strpos($url, 'swf')) return $url; preg_match_all('/http://(.*?)?.(.*?)?.com/(.*)/', $url, $types); $type = $types[2][0]; $domain = $types[1][0]; switch ($type) { case 'youku' : preg_match_all('/http://v.youku.com/v_show/id_(.*)?.html/', $url, $url_array); $swf = 'http://player.youku.com/player.php/sid/' . str_replace('/', '', $url_array[1][0]) . '/v.swf'; break; case 'tudou' : $method = substr($types[3][0], 0, 1); $method = $method == 'p' ? 'v' : $method; preg_match_all('/http://www.tudou.com/(.*)?/(.*)?/', $url, $url_array); $str_arr = explode('/', $url_array[1][0]); $count = count($str_arr); if ($count == 1) { $id = explode('.', $url_array[2][0]); $id = $id[0]; } else if ($count == 2) { $id = $str_arr[1]; } else if ($count == 3) { $id = $str_arr[2]; } $swf = 'http://www.tudou.com/' . $method . '/' . $id . '/v.swf'; break; case 'qq' : $url_array = parse_url($url); $swf = "http://static.video.qq.com/TPout.swf?{$url_array['query']}&auto=0"; break; default : $swf = $url; break; } return $swf; } /** * ÓÅ¿áÊÓƵת»»²âÊÔ * htmlµØÖ· http://v.youku.com/v_show/id_XNzU4Mzg2NDA4.html?f=22720170&ev=2&from=y1.1-2.10001-0.1-2 * swfµØÖ· http://player.youku.com/player.php/sid/XNzU4Mzg2NDA4/v.swf */ echo convert_html_to_swf("http://v.youku.com/v_show/id_XNzU4Mzg2NDA4.html?f=22720170&ev=2&from=y1.1-2.10001-0.1-2"); echo ""; /** * ÍÁ¶¹ÊÓƵת»»²âÊÔ * * htmlµØÖ· http://www.tudou.com/albumplay/hqtp6W5XLN8/Kscjyz4J-RE.html * swfµØÖ· http://www.tudou.com/a/hqtp6W5XLN8/&iid=132223533&resourceId=0_04_0_99/v.swf */ echo convert_html_to_swf("http://www.tudou.com/albumplay/hqtp6W5XLN8/Kscjyz4J-RE.html"); echo "
";
ÍƼöÐÅÏ¢
- ¡¾ÊÓƵ²¥·Å¡¿JplayerÊÓƵ²¥·ÅÆ÷µÄʹÓÃ
- memcacheÄÚ´æÔÀí
- Memcache¼¼Êõ·ÖÏí£º½éÉÜ¡¢Ê¹Óᢴ洢¡¢Ëã·¨¡¢ÓÅ»¯....
- php³£ÓÃÕýÔò±í´ïʽ
- phpÐÔÄܼà²âÄ£¿éXHProf
- ÈÃCI¿ò¼ÜÖ§³Öservice²ã
- ʹÓÃPHPÉú³É´øLOGOµÄ¸öÐÔ»¯¶þάÂëͼÏñ
- ¹ØÓÚCodeIgniterÄã¿ÉÄܲ»ÖªµÀµÄ5¸ö֪ʶµã
- Memcache ºÁÃ뼶³¬Ê±¼°ÆäËû³£¼ûÎÊÌâ»ã×Ü
- [PHP±Ê¼Ç]PHPQueryÒ»¸ö´¦ÀíDOMµÄÀûÆ÷
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
×î½ü¸üÐÂ
- PHP»ñÈ¡Óû§µÄÕæʵIP£¬²¢ÅжÏÊÇ·ñÄÚÍøIP
- PHP ´íÎóÈÕÖ¾ error_log
- ÀûÓÃbigpipe»úÖÆʵÏÖÒ³ÃæÄ£¿éµÄÒì²½äÖȾ chunked¼¼Êõ
- php¿ØÖÆÎļþÏÂÔØËÙ¶È
- js + php ¶ÁÈ¡¡¢²¥·ÅÊÓƵÁ÷ ¼æÈÝfirefox£¬c....
- ¡¾ÊÓƵ²¥·Å¡¿JplayerÊÓƵ²¥·ÅÆ÷µÄʹÓÃ
- UNICODE Óë UTF-8 µÄ¹Øϵ
- memcacheÄÚ´æÔÀí
- Memcache¼¼Êõ·ÖÏí£º½éÉÜ¡¢Ê¹Óᢴ洢¡¢Ëã·¨¡¢ÓÅ»¯....
- phpʹÓÃmb_detect_encoding¼ì²â×Ö·û´®±àÂë
ÆÀÂÛ