Home php教程 php手册 采集邮箱的php代码(抓取网页中的邮箱地址)

采集邮箱的php代码(抓取网页中的邮箱地址)

Jun 13, 2016 am 11:59 AM
http php url code address copy crawl of Web page Mail collection

复制代码 代码如下:


$url='http://www.jb51.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));
?>

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

okx Ouyi official website registration portal 2025 okx Ouyi official website registration portal 2025 Mar 04, 2025 pm 11:45 PM

OKX Ouyi is a leading cryptocurrency trading platform. This article will provide detailed steps to guide you on how to register an OKX Ouyi official website account. You will learn how to access the official website, choose the registration method, fill in the necessary information, and complete the registration process. The article also contains information about precautions, such as the importance of using real personal information and setting a strong password.

Sesame Open Door Exchange Web Page Login Latest version gateio official website entrance Sesame Open Door Exchange Web Page Login Latest version gateio official website entrance Mar 04, 2025 pm 11:48 PM

A detailed introduction to the login operation of the Sesame Open Exchange web version, including login steps and password recovery process. It also provides solutions to common problems such as login failure, unable to open the page, and unable to receive verification codes to help you log in to the platform smoothly.

gateio exchange app old version gateio exchange app old version download channel gateio exchange app old version gateio exchange app old version download channel Mar 04, 2025 pm 11:36 PM

Gateio Exchange app download channels for old versions, covering official, third-party application markets, forum communities and other channels. It also provides download precautions to help you easily obtain old versions and solve the problems of discomfort in using new versions or device compatibility.

How to register and download the latest app on Bitget official website How to register and download the latest app on Bitget official website Mar 05, 2025 am 07:54 AM

This guide provides detailed download and installation steps for the official Bitget Exchange app, suitable for Android and iOS systems. The guide integrates information from multiple authoritative sources, including the official website, the App Store, and Google Play, and emphasizes considerations during download and account management. Users can download the app from official channels, including app store, official website APK download and official website jump, and complete registration, identity verification and security settings. In addition, the guide covers frequently asked questions and considerations, such as

Sesame Open Door Login Registration Entrance gate.io Exchange Registration Official Website Entrance Sesame Open Door Login Registration Entrance gate.io Exchange Registration Official Website Entrance Mar 04, 2025 pm 04:51 PM

Gate.io (Sesame Open Door) is the world's leading cryptocurrency trading platform. This article provides a complete tutorial on spot trading of Gate.io. The tutorial covers steps such as account registration and login, KYC certification, fiat currency and digital currency recharge, trading pair selection, limit/market transaction orders, and orders and transaction records viewing, helping you quickly get started on the Gate.io platform for cryptocurrency trading. Whether a beginner or a veteran, you can benefit from this tutorial and easily master the Gate.io trading skills.

gate.io official login web version Sesame Open Door Trading Platform web version login web version gate.io official login web version Sesame Open Door Trading Platform web version login web version Mar 04, 2025 pm 04:33 PM

The login method of the Sesame Open Door Trading Platform is convenient. Users only need to visit their official website (please search for the domain name yourself), enter the registered email/mobile phone number and password to log in. The platform may enable security verification mechanisms such as 2FA to ensure account security.

Ouyi okx trading platform app official website registration portal Ouyi okx trading platform app official website registration portal Mar 04, 2025 pm 11:27 PM

OKX trading platform, a digital asset trading platform trusted by global users. The platform provides a variety of digital asset trading services, including spot trading, futures trading, option trading, etc.

binance download APP binance Binance platform download free APP binance download APP binance Binance platform download free APP Mar 18, 2025 pm 01:54 PM

This article introduces in detail two methods for downloading Binance APP on Apple iOS system and Android system mobile phones. For iOS systems, since the App Store in China cannot be downloaded directly, users need to use the Apple ID in the outer zone, and they can choose to borrow or register the Apple ID in the outer zone to download it. Android users can directly search and install it in the app store, or visit Binance's official website to scan the QR code to download the installation package. It should be noted that when downloading applications from unofficial channels, you may need to enable the application installation permissions of unknown sources on your phone. No matter which system you are, you can use the Binance APP after downloading.

See all articles