checks the week day of my birthday depending on the year I specify
The scope of this function is to encode the data with the status in JSON format.
status = 1
error is not generated while encoding data
key 'data' holds the data
status = 0
error is generated while encoding data
key 'msg' holds the error message and the error-code
Gets a subset of words from a string.
Use this snippet to track what pages users have come from to get to your site.
This function will take an image and create a thumbnail.
This simple function allows you to automatically generate breadcrumbs! Notice that it is important to follow the example given as a comment I mean: - array(URL, TEXT, BOOLEAN) : "TRUE" makes the link active
Allows you to change something on a daily basis using just php.
The scope of this function is to validate given value. It returns true if the value is non-zero positive integer value and false otherwise.
Checking is_bool is required because if we remove is_bool checking and pass true to function that it returns true which is against the expected behaviour.
I have mentioned few test-cases that i have tested. I would love to have your feedback on this.
This class will take a movie and convert it to an ascii movie (FFMpeg required). Note, output files are about 10x larger than the actual movie, but it is a really cool effect!
Sometimes you need to do preg_replace on user input. Don't forget to escape all special characters or you'll get funny results.
Forces a number between two numbers, this helps avoid if lots of statements.
List all IP v4 addresses of the server/machine where script is executed. It works on Windows, Ubuntu and MacOSX
This function will check to see if the file your checking is an image.
Convert a string with accented characters to uppercase or lowercase.
scope of isAjax function is to check whether request is done via ajax or not.
This function will make a transparent gif thumbnail.
I am currently working on my own content management system and decided I would release a little pre-installation checklist script that makes sure you have all the required functions enabled on your hosting environment and shows you what you currently have and what is required in the end. If you have all the requirements that the script requires, it shows a little button at the bottom to continue the installation, if not, an error. You can easily change the file you want to check writing to by editing $file It comes with some styling already and in a nice table. Enjoy and let me know how it is.
A very simple rendered for PHP based templates. Not a template language, just a simple wrapper that handles undefined template variables, helper functions, and turning a phtml file into a string. If you're using some kind of framework, you probably shouldn't be using this. I threw this together to be pasted (yes, pasted, if you have composer up and running, pull in a real template library) into exsisting legacy projects and turn classic HTML with embedded PHP into a bit more up-to-date PHP rendered templates. Source: [url=https://github.com/tjlytle/Render]Github.com[/url]