PHP Code Snippets

PHP Code Snippets

PHP Code Snippets

Collection of PHP code snippets

Recent articles in PHP Code Snippets

  • Validate IPv4, IPv6 IP Addresses. These PHP Code snippets show how to validate IPv4 or IPv6 IP addresses. Also it allows checking IP address belongs to private network address spaces.
  • PHP Code Snippet - Check Email Headers. PHP code snippet to check email headers in a string. NoEmailHeaders function checks given string. Function return TRUE if there are no email headers in given string, if not function will return FALSE.
  • PHP Code Snippet - Check for new line characters. PHP code snippet to check new lines in a string. NoNewLines function checks given string. Function return TRUE if there are no new line characters in given string, if not function will return FALSE.

Recent articles in PHP Code Snippets

  • PHP Code Snippet - Validate Email Address. PHP code snippet to validate given email address. IsValidEmail function validate email address. Function return TRUE if valid email address found, if not function will return FALSE.
  • PHP Code Snippet - Write data to text file. PHP code snippet to write text data into a file using file_put_contents function. Write2TxtFile function writes text data to a given file. Function return TRUE if data successfully written to file, if not function will return FALSE.

Be Social