// mqsto.com/video Code
define("MQSTOV_WIDTH", 610);
define("MQSTOV_HEIGHT", 488);
define("MQSTOV_REGEXP", "/\[mqstov ([[:print:]]+)\]/");
define("MQSTOV_TARGET", "<object width=\"".MQSTOV_WIDTH."\" height=\"".MQSTOV_HEIGHT."\" allowfullscreen=\"true\" allowscriptaccess=\"always\" allownetworking=\"all\"><param name=\"movie\" value=\"http://mqsto.com/vids/###URL###\"><embed src=\"http://mqsto.com/vids/###URL###\" width=\"".MQSTOV_WIDTH."\" height=\"".MQSTOV_HEIGHT."\" allowfullscreen=\"true\" allowscriptaccess=\"always\" allownetworking=\"all\"></embed></object>");
function mqstov_plugin_callback($match) {
$tag_parts = explode(" ", rtrim($match[0], "]"));
$urltrailer = "http://mqsto.com/video/" . $tag_parts[1] . "";
$urltrailer2 = file_get_contents($urltrailer);
$first2=explode("http://mqsto.com/vids/",$urltrailer2);
$second2=explode("\"><embed",$first2[1]);
$output = MQSTOV_TARGET;
$output = str_replace("###URL###", $second2[0], $output);
return ($output);
}
function mqstov_plugin($content) {
return preg_replace_callback(MQSTOV_REGEXP, 'mqstov_plugin_callback', $content);
}
add_filter('the_content', 'mqstov_plugin');
add_filter('the_content_rss', 'mqstov_plugin');
add_filter('comment_text', 'mqstov_plugin');
add_filter('the_excerpt', 'mqstov_plugin');