Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged function



Parses a url correctly even with a url as query parameter, also retuns dirname, basename and extension besides the other parse_url bits. See comments for more info.
0 1768 posted 14 years ago by tasmanweb
Returns the number of days in the month taking leap-years into account.
0 1629 posted 14 years ago by tasmanweb
A better and more accurate function to see if a value is an integer.
0 1536 posted 14 years ago by tasmanweb
Pagination function
0 1327 posted 14 years ago by zealmurapa
Very basic dont judge!
0 1665 posted 15 years ago by JonnySnip3r
Advance Mail function using PHP Mailer Class
1 1747 posted 15 years ago by erraja_07
0 1489 posted 15 years ago by roflman79
0 1083 posted 15 years ago by PubliOne
0 1669 posted 15 years ago by pickyj
5 2471 posted 15 years ago by pickyj
This takes a date like so: Sat, 08 Jan 2011 from a database and allows you to use it in your code. For example if you wanted to work out a week from Sat, 08 Jan 2011 it can be done with ease. I created this for a project i am currently working on. Th...
0 1301 posted 15 years ago by JonnySnip3r
A little function used to set cookies as arrays of values instead of single combinations key->value. Note that it saves values as a stack.
1 1417 posted 15 years ago by claudiowebdesign
Im pretty new to oop php i have tried to create a php search function but im sure this needs alot of improvement. So add on :D
0 1100 posted 15 years ago by JonnySnip3r
I wrote this little bit of code myself so if you see where you can improve on it, let me know. This is great for making complex menu's and also for making sure your POST data gets saved and reselected when the screen refreshes. I use it in all my pro...
0 2116 posted 15 years ago by geilt
Youtube ID simple extractor
1 1487 posted 15 years ago by jhonqwerty
1 1508 posted 15 years ago by CJness
0 1303 posted 15 years ago by bedomax
This custom function is useful if you want to get the ID of a page.
1 1633 posted 15 years ago by simonbouchard
You can use this script in your projects when you need an image upload function. It checks file type, file size and error report. I also want you to check [giochi di spongebob](http://www.giochidispongebob.net) and [gratis mahjong](http://www.gratism...
1 1540 posted 15 years ago by jackoder
Creates a tiny url for posting on twitter etc.
1 2284 posted 16 years ago by vagrantradio
Many scripts rely on `$_SERVER[SCRIPT_URL]` which is sometimes missing. This function detects it from other server variables and fixes the missing field.
1 2536 posted 16 years ago by drwitt
This is a simple function that will return an array of all the dates corresponding to the day 'Monday' for a given year. It's pretty simple and may not be the cleanest way but it works for my purpose.
0 1906 posted 16 years ago by aristoworks
Place in your functions.php file and call it in your theme like this: <?php>
1 3013 posted 16 years ago by afj176
Convert string to underscore, for SE safe URLs etc.
1 1287 posted 16 years ago by jspicher
Used to sanitize user input for email.
0 1216 posted 16 years ago by jspicher