On the Internet, you must enter a maximum of email addresses for registration, and then some websites require email activation and authentication. Imagine that some users just want to download or read some content before they can register. Can those emails be used? I would like to write more mail addresses like asfsagdfg@adfdlknsafdf.com. There is no problem in verifying the email format in the background, and then the background starts sending emails. How serious is the waste of resources?ProgramAfter waiting for half a day, the result times out, so the system resources are consumed. Is there a way to verify the mail format and whether the mail host itself is correct?
Today, I read a book and read many PHP network-related functions, such as viewing DNS records (dns_get_record), obtaining host MX records (getmxrr), and obtaining server port numbers (getservname) and socket, mail, and other functions.
Since PHP has so many good functions to view the status of the host domain name, why not write a host verification function, which saves both bandwidth and valuable system resources:
php $ A = filter_var ('sa _ d-fs.a12d@163.com ', filter_validate_email ); $ site = explode ('@', $ A ); $ result = Che Ckdnsrr ($ site [1], 'mx '); echo ($ result ); ?>