Welcome To Snipplr


Everyone's Recent PHP Snippets



Use this to format a phone number for display on a page.
1 437 posted 15 years ago by fbnewtz
1 375 posted 15 years ago by mikeejay
0 275 posted 15 years ago by Corhol
A simple function to check if the request comes from an AJAX XMLHttpRequest. Use it if your page should behave differently when called from AJAX. Comes from jquery mailing list: http://jquery.com/discuss/2006-June/006656/
29 1809 posted 15 years ago by TC
7 325 posted 15 years ago by smilylion
admin panel for php scripts with a login form elaborated by a function.php page, then an upload form with canc option
2 487 posted 15 years ago by dandyna
Generates a random string of variable length.
11 472 posted 15 years ago by javierarce
File admin.php di una galleria di immagini in php - Function.php file to include in an image gallery php script Directory structure: Gallery(main directory) _admin.php _function.php _photo(directory) __image1.gif __image2.gif
2 308 posted 15 years ago by dandyna
File function.php di una galleria di immagini in php - Function.php file to include in an image gallery php script Directory structure: Gallery(main directory) _admin.php _function.php _photo(directory) __image1.gif __image2.gif
2 299 posted 15 years ago by dandyna
Heres how to use print_r(browser_detection('full')); We can also use this script print "IP: ". $_SERVER['REMOTE_ADDR'].""; ### IP ADDRESS ## print "Browser:" . $_SERVER["HTTP_USER_AGENT"].""; ## Browser print "OS: ". $_ENV["OS"]; ### OS
8 370 posted 15 years ago by mail_json
3 467 posted 15 years ago by smilylion
0 316 posted 15 years ago by deadmoon
1 336 posted 15 years ago by deadmoon
two ways of doing it. 2nd is best
0 384 posted 15 years ago by deadmoon
put "register_sidebar_widget(..)" into "function widgets_init()"
4 406 posted 15 years ago by yuconner
2 398 posted 15 years ago by pablazo
0 291 posted 15 years ago by olive
Select the last autoincrement index from the last inserted item in a table.
0 440 posted 15 years ago by arcturus
2 296 posted 15 years ago by weitzman
Shows how to upload a single file to a FTP server.
28 3715 posted 15 years ago by hxseven
(Applies to the HTML_Template_IT PEAR package) Useful script to find all global variables and put them in a format for an array. $t is the HTML_Template_IT(X) object.
0 399 posted 15 years ago by pckujawa
The form method must be post and the enctype set as it is below. The hidden input for MAX_FILE_SIZE must also be included. The value is the max file size (in bytes?).
4 369 posted 15 years ago by pckujawa
Recorta el texto recibido al limite especificado de caracteres. Caracteristicas: * Si el texto es HTML el texto no contendra tags incompletos * Si el texto no es HTML no se recortaran palabras Notas: Se debe tener en cuenta que el texto pod...
1 317 posted 15 years ago by Navegante
Elimina las etiquetas de párrafo <P< y </P< (sin parámetros) y las sustituye por saltos de línea <BR />. En caso necesario inserta un <BR /> adicional para simular la separación de párrafos.
0 314 posted 15 years ago by Navegante
Took 0.164692 seconds for array[] Took 0.395778 seconds for array_push As you can see array_push is more than twice as slow. Here are the reasons. Array_push is a function call, Function calls are always slower. Array_push takes mixed parameters,...
0 1648 posted 15 years ago by mthorn