Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged php



1 ... 41 42 43 44 45 ... 58
Dumps whole query so developer can see where is error. However it's potential security issue, exposing SQL commands to attacker. (Recommended to use only during development, replace message code with some custom error text)
0 1460 posted 16 years ago by acosonic
Below are two functions I've been using to make event tracking a little easier in CodeIgniter. Two functions are available, google_analytics() & track_event(). google_analytics() takes one argument and uses it as the UA code for your tracking p...
5 1826 posted 16 years ago by brettbergeron
The below code helps you move your site assets (images, css, javascript) to a public folder inside the application directory of CodeIgniter. One thing you'll need to do is define ASSETPATH to be the path to the location of your public items. For m...
1 1207 posted 16 years ago by brettbergeron
A simple class layout template that I always use to get me started. Nothing fancy. Just your basic structure.
1 1390 posted 16 years ago by StrawMan
I made this script to count the days until a birthday, the birthdays are stored in mysql with the year intact YYYY-MM-DD, so this function strips the first 4 chars, and adds the current year, if the date has already passed it adds the next year and c...
9 2664 posted 16 years ago by jcroom
0 1025 posted 16 years ago by jonniespratley
0 1009 posted 16 years ago by jonniespratley
http://code.google.com/p/jquery-jtwitter/ for examples.
2 1496 posted 16 years ago by jonniespratley
I recently found the need to run multiple CodeIgniter applications inside of a single codebase for development & test purposes. So, I rewrote a few lines of the primary index file (/index.php) to automatically route URLs like subdomain.domain.com to...
3 1422 posted 16 years ago by brettbergeron
Take the contens from a table in MySQL and display it in an email
2 1101 posted 16 years ago by jcroom
This code will create a human readable string that will look more close to dictionary words, useful for captchas.
3 2328 posted 16 years ago by Mithun
This function converts URLs and e-mail addresses within a string into clickable hyperlinks.
2 1431 posted 16 years ago by Mithun
0 1116 posted 16 years ago by dsntos
0 1279 posted 16 years ago by renatoelias
1 1200 posted 16 years ago by iTony
Function for sanitize input POST, GET, COOKIE arrays.
2 1284 posted 16 years ago by kirik
Create a custom 404 handler page which redirects you to the correct page.
1 1088 posted 16 years ago by Meander365
Determines whether or not the page has been requested directly, or through AJAX. This can allow for combining a page and related AJAX responses within the same script.
1 2301 posted 16 years ago by Wilco
2 1252 posted 16 years ago by iTony
This is one of my favs to use and reuse. Essentially, we make a select box on what is in the table filled values/labels. Download the ISO countries list to make a country table and Bam! with this function you got a country select box... Also grea...
1 1033 posted 16 years ago by brownrl
use this function to insert a string into another string at a certain position.<br> echo insertString("legendary", " wait for it ... ", 5);<br> legen wait for it ... dary
0 1088 posted 16 years ago by jlvallelonga
1 1003 posted 16 years ago by disc0nnect
0 1156 posted 16 years ago by ping_ch
Simple PHP script which allows you to specify your twitter log in details and a search term, then automatically follow users who have tweeted that term. Code is released as Open Source, use it as you wish - please leave my URL in the commented sectio...
3 2635 posted 16 years ago by shakefon
This is my first encounter with FirePHP, I might be using this more often. FirePHP lets you output log lines like console.log would in FireBug. You will need the FirePhp plug-in for Firefox and you will have to upload the FirePHP lib to your server.
2 1020 posted 16 years ago by rbroen
Quick little function to give you a select box for numbers ranging from min to max. Perfect for birthday date selectors.
0 1037 posted 16 years ago by brownrl
1 1777 posted 16 years ago by dsheetz
check out why the get_include_path() was appended to the new path.
0 1144 posted 16 years ago by iTony
1 ... 41 42 43 44 45 ... 58