PHP and MySQL Web Development (4th Edition) by Welling Luke & Thomson Laura
Author:Welling, Luke & Thomson, Laura [Welling, Luke]
Language: eng
Format: mobi
Publisher: Sams
Published: 2008-09-30T16:00:00+00:00
If the URL is valid, you then go on to check the email address. First, you split it into username and hostname with a call to explode():
$email = explode('@', $email);
$emailhost = $email[1];
When you have the host part of the address, you can check to see whether there is a place for that mail to go by using the dns_get_mx() function:
dns_get_mx($emailhost, $mxhostsarr);
This function returns the set of Mail Exchange (MX) records for an address in the array you supply at $mxhostsarr.
An MX record is stored at the DNS and is looked up like a hostname. The machine listed in the MX record isn’t necessarily the machine where the email will eventually end up. Instead, it’s a machine that knows where to route that email. (There can be more than one; hence, this function returns an array rather than a hostname string.) If you don’t have an MX record in the DNS, there’s nowhere for the mail to go.
Note that the dns_get_mx() function is not implemented in Windows versions of PHP. If you are using Windows, you should look into the PEAR::Net_DNS package, which will work for you (http://pear.php.net/package/NET_DNS).
If all these checks are okay, you can put this form data in a database for later review by a staff member.
In addition to the functions you just used, you can use the more generic function checkdnsrr(), which takes a hostname and returns true if any record of it appears in the DNS.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Access | Data Mining |
Data Modeling & Design | Data Processing |
Data Warehousing | MySQL |
Oracle | Other Databases |
Relational Databases | SQL |
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8258)
Azure Data and AI Architect Handbook by Olivier Mertens & Breght Van Baelen(6411)
Building Statistical Models in Python by Huy Hoang Nguyen & Paul N Adams & Stuart J Miller(6370)
Serverless Machine Learning with Amazon Redshift ML by Debu Panda & Phil Bates & Bhanu Pittampally & Sumeet Joshi(6259)
Data Wrangling on AWS by Navnit Shukla | Sankar M | Sam Palani(6035)
Driving Data Quality with Data Contracts by Andrew Jones(5999)
Learning SQL by Alan Beaulieu(5959)
Machine Learning Model Serving Patterns and Best Practices by Md Johirul Islam(5766)
Weapons of Math Destruction by Cathy O'Neil(5722)
Big Data Analysis with Python by Ivan Marin(5175)
Data Engineering with dbt by Roberto Zagni(4200)
Solidity Programming Essentials by Ritesh Modi(3839)
Time Series Analysis with Python Cookbook by Tarek A. Atwan(3690)
Pandas Cookbook by Theodore Petrou(3407)
Blockchain Basics by Daniel Drescher(3274)
Hands-On Machine Learning for Algorithmic Trading by Stefan Jansen(2885)
Feature Store for Machine Learning by Jayanth Kumar M J(2797)
Learn T-SQL Querying by Pam Lahoud & Pedro Lopes(2779)
Mastering Python for Finance by Unknown(2731)
