Welcome To Snipplr


Everyone's Recent Snippets Tagged php



1 ... 45 46 47 48 49 ... 64
In addition to the recommendations on the Wordpress Website. Limit the amount of PHP files that a writable by Apache. The directory's and files that need to be writable, do not always need to be executed by PHP directly. This makes it a bit har...
1 689 posted 15 years ago by occam
Create a custom 404 handler page which redirects you to the correct page.
1 697 posted 15 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 968 posted 15 years ago by Wilco
2 730 posted 15 years ago by iTony
Use this to quickly clean-up a file which has opening braces on a new line, a particular annoyance of mine.
1 788 posted 15 years ago by Zenithus
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 684 posted 15 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 664 posted 15 years ago by jlvallelonga
1 632 posted 15 years ago by disc0nnect
0 761 posted 15 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 1781 posted 15 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 691 posted 15 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 671 posted 15 years ago by brownrl
1 1179 posted 15 years ago by dsheetz
check out why the get_include_path() was appended to the new path.
0 777 posted 15 years ago by iTony
This snippet will create an array of all images in a directory and sub-directories and display them randomly.
4 3372 posted 15 years ago by superuntitled
Manipulates XML nodes using PHP's Dom library. Includes XPath navigation, child manipulation, and deletion of current document.
0 725 posted 15 years ago by mikeevans
3 698 posted 15 years ago by trebor79
Include file that contains the array of areacodes and states. **This file is needed for the Areacode Script to work. Script here: http://snipplr.com/view/17339/area-code-lookup-script/
2 696 posted 15 years ago by arnoldb
This simple script will return what state an areacode belongs to. Be sure to get the include file that contains the array here: http://snipplr.com/view/17340/area-code-lookup-script--include-file/
1 792 posted 15 years ago by arnoldb
A few days ago i was looking for a script witch one will help me to unzip a file using PHP . There is 2 different ways to do it.One just execute a commend to unzip the file in the shell using PHP and another one is using library functions
2 882 posted 15 years ago by fackz
Save this file as a .php somewhere on your webserver - NOT A WEB ACCESSIBLE LOCATION! Edit the lines in the top portion to suit your needs and call the file from bash like this: $> php cpanel-backup.php You can use a cronjob to make this run autom...
1 883 posted 15 years ago by arnoldb
0 746 posted 15 years ago by njhamann
How to replace sleep(2), for your PHP code. Ideal testing hosting/dns ping.
1 894 posted 15 years ago by nicolaspar
1 801 posted 15 years ago by philokezzar
Takes advantage of the SPL. Much easier and maintainable than the previous revisions. Haven't done any benchmarks yet but I imagine it is much faster. "If you want to omit directories, remove the RecursiveIteratorIterator::SELF_FIRST part."
3 646 posted 15 years ago by DrewDouglass
All credit for this snippet goes to Roshan, link is given above.
4 1146 posted 15 years ago by DrewDouglass
1 ... 45 46 47 48 49 ... 64