Denver WordPress Design by Chris Strom, LLC

This is a series of free PHP code snippets that you can use in your web development projects. We have snippets to display a user's IP address, block multiple IP addresses, print the current page's file path, print the current page's directory path, replace swear words, and auto-populate a textarea from an external file.

PHP Display User's IP Address

Example:

Click here to see an example

Source Code:

PHP Block Multiple IP Addresses

Example:

Source Code:

PHP Print Current File Path

Example:

Click here to see an example

Source Code:

PHP Print Current Directory Path

Example:

Click here to see an example

Source Code:

PHP Replace Swear Words

Example:

Click here to see an example

Source Code:

PHP Auto-Populate Textarea

Example:

Click here to see an example

Source Code: