求助,判断输入框自动获取微视视频预览 本帖最后由 z13754418942 于 2014-09-06 04:49:04 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <?php$send = isset($_POST['send'])? $_POST['send'] : '';$url = isset($_POST['url'])? $_POST['url'] : '';?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>test</title> </head> <body> <form name="form1" method="post" action="get.php"> <p>url:<input type="text" name="url" value="<?php echo $url; ?>"></p> <p><input type="submit" name="b1" value="submit"></p> <input type="hidden" name="send" value="true"> </form> <?php if($send=='true'){ $file=file_get_contents($url); htmlspecialchars($file); $pattern='/<div class="vBox js_player" id="(.*?)"><\/div>/'; preg_match($pattern,$file,$result); $vid=($result[1]); if($vid){ echo '<embed src="http://mat1.gtimg.com/weishi/player/weishiplayerIn.swf" flashvars="vid='.$vid.'" width="458" height="492">'; } } ?> </body></html> 关于html与mysql的交互,语言是php pear.bat一点就关 急!急!急!PHP网站 apache配置wap??? 谁配置过 resin+apache+mysql mysql数据库没有事务功能 sql语句的疑问??????? PHP获取IP的问题 smarttemplate 使用方法?有没有办法让它不生成临时文件? linux下的php路径执行问题 call_user_func有什么用 关于企业网站后台,请给我说说
<?php
$send = isset($_POST['send'])? $_POST['send'] : '';
$url = isset($_POST['url'])? $_POST['url'] : '';
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>test</title>
</head> <body>
<form name="form1" method="post" action="get.php">
<p>url:<input type="text" name="url" value="<?php echo $url; ?>"></p>
<p><input type="submit" name="b1" value="submit"></p>
<input type="hidden" name="send" value="true">
</form>
<?php
if($send=='true'){
$file=file_get_contents($url);
htmlspecialchars($file);
$pattern='/<div class="vBox js_player" id="(.*?)"><\/div>/';
preg_match($pattern,$file,$result);
$vid=($result[1]);
if($vid){
echo '<embed src="http://mat1.gtimg.com/weishi/player/weishiplayerIn.swf" flashvars="vid='.$vid.'" width="458" height="492">';
}
}
?>
</body>
</html>