php正则匹配动态页面文章标题<h1>
2016-06-23 19:11
495 查看
<?php
header("Content-type:text/html;charset=utf-8");
$file = file_get_contents('http://www.manew.com/6176.html');
preg_match_all('/<h1>(.*)<\/h1>/si',$file,$content);
print_r($content);
?>
header("Content-type:text/html;charset=utf-8");
$file = file_get_contents('http://www.manew.com/6176.html');
preg_match_all('/<h1>(.*)<\/h1>/si',$file,$content);
print_r($content);
?>
相关文章推荐
- 在php获取访问方的ip
- php中curl
- H.264 基础及 RTP 封包详解
- PHP实现完全二叉树
- PHP abstract与interface之间的区别
- PHP设计模式:策略模式
- PHP添加zip&&curl扩展
- 云主机上部署兔子TuziCMS系统图文教程
- php session 严格过期时间实现
- 简单解析PHP程序的运行流程
- php各项下载地址
- Windows下通过Composer安装Yii2 [ 2.0 版本 ]
- php概率算法(转)
- php如何发起POST DELETE GET POST 请求
- PHP格式化显示时间(x秒前,x天前等格式)
- Windows下搭建PHP开发环境
- Yii2 advanced版API接口开发 基于RESTful架构的 配置、实现、测试
- 解决php网页运行超时问题:Maximum execution time of 30 seconds exceeded
- Hadoop Straming 调用PHP
- windows 服务器提示curl_init() not function