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 1297 posted 12 years ago by o0110o
Highlight Search Terms in Text
0 936 posted 12 years ago by pruntrut
A simple class to cache files (or other results) with PHP.
1 1092 posted 12 years ago by peckham
Takes a # of seconds and converts it to human readable format. If happened within seconds-years.
0 998 posted 12 years ago by mburica
It is a bit simpler reversing of multibyte strings.
0 998 posted 12 years ago by iTony
PDO-format insert array function
0 1130 posted 12 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 1031 posted 12 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 1368 posted 12 years ago by ginoplusio
Wordpress Custom Post Type, custom taxonomy and queries
0 880 posted 12 years ago by SidFerreiraZ
Use: echo format_size(filesize("fichier")); Example result: 13,37 Ko
0 897 posted 12 years ago by zhyar
This will take an IP and try to find the city.
0 1011 posted 12 years ago by iTony
This is a route that ables the website to show the user's profile to the world.
0 611 posted 12 years ago by rafaelfragosom
Just an example showing how to minimise the mixture of HTML and PHP in a view.
0 736 posted 12 years ago by JonnySnip3r
CREATE A HEADER MINI-CART IN WP E-COMMERCE - Part 3
0 858 posted 12 years ago by ecksteing
easy way of catching and displaying errors and return values from a exec() command back in PHP.
0 902 posted 12 years ago by iroybot
easy way of catching and displaying errors and return values from a exec() command back in PHP.
0 991 posted 12 years ago by iroybot
A simple code to read/write an XML file by using Cakephp 1.3.
0 1044 posted 12 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 588 posted 12 years ago by Gianino
Display Copyright
0 551 posted 12 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 1014 posted 12 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 800 posted 12 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 941 posted 12 years ago by FatFolderDesigner
Basic template for Joomla 2.5 with 3 columns
1 944 posted 12 years ago by gradamedia
Show html on homepage and different html on other pages
0 889 posted 12 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 670 posted 12 years ago by dialeleven
This class is used to store global information for general access throughout the application.
0 768 posted 12 years ago by ryantxr
Sometimes it’s helpful to ONLY get numeric characters. Phone numbers, age — whatever your little PHP heart desires.
0 1852 posted 12 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 893 posted 12 years ago by satie83
Auto language selection based on site languages and user preferences.
0 679 posted 12 years ago by Narayon
1 ... 6 7 8 9 10 ... 58