Welcome To Snipplr


Everyone's Recent Snippets



1 ... 383 384 385 386 387 ... 554
Ever needed to get the page your user is currently viewing? This can be done quickly in php all thanks to $_server.
3 1010 posted 15 years ago by scopefragger
Dead simple, but often forgotten.
1 1152 posted 15 years ago by rengber
0 1152 posted 15 years ago by iloveitaly
0 885 posted 15 years ago by iloveitaly
Useful for controllers. Put this in your base class for easy caching on variable (GET, POST) dependent pages
0 935 posted 15 years ago by iloveitaly
Sometimes you just need to mask a script or reject a user from a page this can be done effortlessly using a single line of code. Header location will allow you to redirect a user quickly and without them having any control over the action. A good...
1 980 posted 15 years ago by scopefragger
calendar module's mini calendar includes a needles 'empty day' div in every date cell. this kills them.
0 1007 posted 15 years ago by canarymason
Easy check (: **UPD** You can just use [version_compare()](http://ca.php.net/manual/en/function.version-compare.php) function.
1 1060 posted 15 years ago by kirik
For use in conjunction with the get_work function in the theme functions template, functions.php.
0 862 posted 15 years ago by tylersticka
For use in the theme functions template, functions.php.
0 809 posted 15 years ago by tylersticka
For use within The Loop, in your portfolio item page template.
0 938 posted 15 years ago by tylersticka
This is the Aidan Lister PHP countdown, translated for use in Norway. No more 133 days untill christmas, but insted 3 months and 3 weeks.
0 1218 posted 15 years ago by stavelin
This is just a simple function to get the variable without having to worry if its POST or GET, and even allows for a default value to be passed in case the variable was not found.
0 968 posted 15 years ago by mondomondomxcom
0 913 posted 15 years ago by antpaw
My Kohana HTML Helper
1 943 posted 15 years ago by antpaw
Compile, put exe in cgi-bin folder, and post form data to it.
0 990 posted 15 years ago by Zufolek
It's not 100% accurate, but works fine for people under 1.480.
2 1328 posted 15 years ago by nkm
Using the kohana framework for XSS protection
0 1051 posted 15 years ago by iloveitaly
Found at the source link - stealing and indexing :)
2 1011 posted 15 years ago by cyberhobo
sendmail needs to be working and configured properly uses popen and fputs
0 1531 posted 15 years ago by acosonic
e.g. <pre><code> $ twlogmerge.py twitter-log-user-dir read file: twitter-log-user-dir/page001.xml get status: id: 123456789 append status: accum.:1234 ... append status: accum.:3456 write file: twitter-log-user-dir-marged-20090828-130146.xml...
0 1028 posted 15 years ago by mustam
This is xslt file for twitter-logged xml file. * cf. [Backup my twitter-log](http://snipplr.com/view/18925/backup-my-twitterlog/) * cf. [Merge twitter-logged files into one xml-file](http://snipplr.com/view/18928/merge-twitterlogged-files...
0 1370 posted 15 years ago by mustam
e.g. <pre> $ twlog.py user twitter account name: user Now logging start, take several times. r u OK? [y/N]: y DEBUG: make dir: twitter-log-user DEBUG: get log: page=1 DEBUG: new tweet: 21, accum. tweet: 21 DEBUG: remain hits: 149 DEBUG: writ...
1 889 posted 15 years ago by mustam
0 1346 posted 15 years ago by okidoka
1 ... 383 384 385 386 387 ... 554