In php you can emulate an ajax request by inserting a proper header. With this header you can prevent users from directly accessing php pages that are meant only for ajax calls.
With this simple php script you can remove any specified words from a string. This is very useful when you need to filter input to strip forbidden words.
You can use this php script to shorten a text string into a specific number of words without cutting words in half and add three dots to the end of the string.