<?php 
$url='http://www.cnblogs.com/tinyphp/p/3234926.html'; //当页已留邮箱
$content=file_get_contents($url);                         //获取页面内容
function getEmail($str) {                                 //匹配邮箱内容
$pattern = "/([a-z0-9\-_\.]+@[a-z0-9]+\.[a-z0-9\-_\.]+)/"; 
preg_match_all($pattern,$str,$emailArr); 
return $emailArr[0]; 
} 
print_r( getEmail($content)); 
?> 

留下我的邮箱做个测试:tinyphp@163.com

相关文章:

  • 2022-12-23
  • 2021-12-02
  • 2021-09-13
  • 2021-10-19
  • 2022-12-23
猜你喜欢
  • 2021-12-27
  • 2022-12-23
  • 2021-12-02
  • 2021-04-10
  • 2022-02-09
  • 2021-08-29
相关资源
相似解决方案