php如何抓取网页中邮箱地址代码
2015-02-26 10:37
567 查看
php如何抓取网页中邮箱地址,下面我就给大家分享一个用php抓取网页中电子邮箱的实例。
原文来自: http://outofmemory.cn/code-snippet/36020/php-how-zhuaqu-wangye-youxiangdizhi-code
原文来自: http://outofmemory.cn/code-snippet/36020/php-how-zhuaqu-wangye-youxiangdizhi-code
<?php /** desc:采集网页中的邮箱的代码 link:www.pc100.net date:2013/2/24 */ $url='http://www.pc100.net'; //要采集的网址 $content=file_get_contents($url); //echo $content; function getEmail($str) { //$pattern = "/([a-z0-9]*[-_\.]?[a-z0-9]+)*@([a-z0-9]*[-_]?[a-z0-9]+)+[\.][a-z]{2,3}([\.][a-z]{2})?/i"; $pattern = "/([a-z0-9\-_\.]+@[a-z0-9]+\.[a-z0-9\-_\.]+)/"; preg_match_all($pattern,$str,$emailArr); return $emailArr[0]; } print_r( getEmail($content)); ?>
相关文章推荐
- 采集邮箱的php代码(抓取网页中的邮箱地址)
- 采集邮箱的php代码(抓取网页中的邮箱地址)
- PHP网页抓取之抓取百度贴吧邮箱数据代码分享
- PHP网页抓取之抓取百度贴吧邮箱数据代码分享
- php结合正则批量抓取网页中邮箱地址
- 如何使用JAVA语言抓取某个网页中的邮箱地址
- php结合正则批量抓取网页中邮箱地址
- 抓取网页并用正则表达式匹配邮箱地址
- PHP代码片段记录:+多线程抓取网页等
- php抓取网页代码四种方法
- php如何抓取网页
- 正则表达式抓取网页中的邮箱地址
- PHP多线程抓取网页实现代码
- js、php验证 邮箱 用户名 电话 邮编 地址 的简单示例代码
- java代码抓取网页邮箱的实现方法
- 批量抓取网页代码中的HTTP和邮件地址,IO,正则表达式,抓网页源码
- 使用php代码从网页中提取有效图片地址
- 批量抓取网页代码中的HTTP和邮件地址,IO,正则表达式,抓网页源码
- 关于如何判断网页是静态还是伪静态的方法——本文来自雅致生活网『www.yzsh0514.com』原帖地址:http://www.yzsh0514.com/bbs/viewthread.php?tid==0
- 这是一个将指定URL地址的网页 抓取为本地网页的代码。