Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged php



1 ... 6 7 8 9 10 ... 58
A function to get a files size via curl. Accepts $_path, $_unit, $_float, $_username & $_password; In the listed order.
1 2956 posted 13 years ago by o0110o
Highlight Search Terms in Text
0 1440 posted 13 years ago by pruntrut
A simple class to cache files (or other results) with PHP.
1 2626 posted 13 years ago by peckham
Takes a # of seconds and converts it to human readable format. If happened within seconds-years.
0 1492 posted 13 years ago by mburica
It is a bit simpler reversing of multibyte strings.
0 1478 posted 13 years ago by iTony
PDO-format insert array function
0 1629 posted 13 years ago by rickygri
I will show you how to crate an app for facebook to handle the facebook connect process on your web site. Then I will show you the php code to perform the login on facebook and retrieve the informations you need for your site. The last suggestion w...
0 1571 posted 13 years ago by ginoplusio
When you add facebook like button to your site, probably, you also want to save the number of likes of your pages to your database.These data are very useful and very important because they tell you which of your articles are better than others. More...
0 2969 posted 13 years ago by ginoplusio
Wordpress Custom Post Type, custom taxonomy and queries
0 1562 posted 13 years ago by SidFerreiraZ
Use: echo format_size(filesize("fichier")); Example result: 13,37 Ko
0 2238 posted 13 years ago by zhyar
This will take an IP and try to find the city.
0 2478 posted 13 years ago by iTony
This is a route that ables the website to show the user's profile to the world.
0 970 posted 13 years ago by rafaelfragosom
Just an example showing how to minimise the mixture of HTML and PHP in a view.
0 1135 posted 13 years ago by JonnySnip3r
CREATE A HEADER MINI-CART IN WP E-COMMERCE - Part 3
0 1367 posted 13 years ago by ecksteing
easy way of catching and displaying errors and return values from a exec() command back in PHP.
0 1386 posted 13 years ago by iroybot
easy way of catching and displaying errors and return values from a exec() command back in PHP.
0 1521 posted 13 years ago by iroybot
A simple code to read/write an XML file by using Cakephp 1.3.
0 2464 posted 13 years ago by tucq88
Reduces the string size according to the parameter that has been send and put '...' at the end of the new string
0 998 posted 13 years ago by Gianino
Display Copyright
0 885 posted 13 years ago by evinweissenberg
I use this primarily for debugging purposes. This simply takes an array and creates an expandable item that prints the array out in a \<pre\> wrapping, making it easy to read. Very basic snippet.
0 2475 posted 13 years ago by ringo380
Allows you to connect to different datasources. Very common to use something like this for development,staging and production deployments.
0 1239 posted 13 years ago by evinweissenberg
These two snippets together, the first in the .htaccess file, and the second in your PHP create an elegantly simple solution to arbitrary URLs with php. For a breakdown and example check out the link. Don't want to follow the link, how about the q...
0 2311 posted 13 years ago by FatFolderDesigner
Basic template for Joomla 2.5 with 3 columns
1 2399 posted 13 years ago by gradamedia
Show html on homepage and different html on other pages
0 1467 posted 13 years ago by morktron
Create variable named PHP variables. Having dynamically named variables can be helpful when dealing with loops and arrays. For example instead of having seven if () statements for handling seven individual days of the week, you could reduce it to one...
0 1082 posted 13 years ago by dialeleven
This class is used to store global information for general access throughout the application.
0 1235 posted 13 years ago by ryantxr
Sometimes it’s helpful to ONLY get numeric characters. Phone numbers, age — whatever your little PHP heart desires.
0 2545 posted 13 years ago by satie83
Once in a while we need to check whether a string contains substring, some other string or characters or a value. Checking for existence of a string (or substring) inside another string is easier than it might seem. The following article describes ho...
0 1441 posted 13 years ago by satie83
Auto language selection based on site languages and user preferences.
0 1103 posted 13 years ago by Narayon
1 ... 6 7 8 9 10 ... 58