采集邮箱php代码
span style=color:#333333;font-family:Arial;font-size:14px;line-height:21px;由于搞了个群发邮件的程序,当然没邮箱不行,所以写了个采集邮箱程序.br / 转载自:/span a href=http://www.tongqiong.com/read.php?tid-35-ds-1
由于搞了个群发邮件的程序,当然没邮箱不行,所以写了个采集邮箱程序.
转载自: http://www.tongqiong.com/read.php?tid-35-ds-1.html
转载自: http://www.tongqiong.com/read.php?tid-35-ds-1.html
<?php
//作者:www.tongqiong.com
$url='http://www.tongqiong.com/read.php?tid-1-ds-1.html'; //这个网页里绝对含有邮件地址。
$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));
//作者:www.tongqiong.com
?>
精彩图集
精彩文章






