PHP Verification Mailbox and IP address the simplest method rollup, IP minimalist _php tutorial

Source: Internet
Author: User

PHP Verification Mailbox and IP address the simplest method summary, IP simplest


In the development of the verification of mailboxes, URLs, numbers are some of our common examples, the following collation of the verification mailbox, URL, digital programs, we are interested to refer to.

The example code is as follows:

add: use PHP's own function to operate.

PHP verification Mailbox, the code is as follows:

$email = ' fengdingbo@gmail.com ';             

PHP validates the URL address with the following code:

PHP validates the IP address with the following code:

$url = "192.168.1.110"; $result = Filter_var ($url, FILTER_VALIDATE_IP); Var_dump ($result); String (13) "192.168.1.110"//This method can also be used to validate IPv6. $url = "2001:db8:2de::e13";              $result = Filter_var ($url, FILTER_VALIDATE_IP); Var_dump ($result); String ("2001:db8:2de::e13")

The above is the simplest way to verify the email and IP address of PHP, hoping to help you learn.

http://www.bkjia.com/PHPjc/1066500.html www.bkjia.com true http://www.bkjia.com/PHPjc/1066500.html techarticle PHP Verification Mailbox and IP address the simplest method summary, IP simplest in the development of verification mailbox, URL, numbers are some of our common examples, the following collation of the verification mailbox, URL, digital program, ...

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.