Welcome To Snipplr


Everyone's Recent Snippets Tagged php



1 ... 6 7 8 9 10 ... 64
If you need to get the whois information for a specific domain, why not using PHP to do it? The following function take a domain name as a parameter, and then display the whois info related to the domain.
1 1536 posted 13 years ago by o0110o
In order to optimize your scripts, you may definitely want to know how many amount of RAM they use on your server. This snippet will check memory and then print initial, final and peak usages.
3 1323 posted 13 years ago by o0110o
Point the script to an image and get its dominant color.
1 2261 posted 13 years ago by o0110o
Add this to functions.php and then you can call the focus keyword anywhere you want with: <?php wpseoFocusKW();?>
0 1698 posted 13 years ago by itsmrchris
How to insert the less preprocessor script in WordPress Websites and Blogs
0 1481 posted 13 years ago by ecksteing
If you are a PHP developer, you are probably aware that you can pass an array of strings as the search strings and an array as the replacements to the str_replace function. In this example you can see how to automatically replace smiley shortcuts by...
1 996 posted 13 years ago by martijnhoogwerf
Simple method to insert data to sql
0 1197 posted 13 years ago by BergBenji
This function will compress any text-based content.
1 1304 posted 13 years ago by o0110o
Get the text in between more text in a string. Accepts $content,$start,$end & $is_string as parameters.
1 1559 posted 13 years ago by o0110o
Get the absolute webroot URL.
1 2762 posted 13 years ago by o0110o
This function will force a file to be downloaded. It accepts $_path as a parameter.
1 2680 posted 13 years ago by o0110o
This function performs several checks to make sure it's getting the correct IP address.
1 3044 posted 13 years ago by o0110o
A handy function to get the contents of a file with curl. Accepts $_path as a parameter.
1 2910 posted 13 years ago by o0110o
This function will use curl to see if a file exists at the location it's provided. It accepts $_path as a parameter.
1 3153 posted 13 years ago by o0110o
A function to get a files size via curl. Accepts $_path, $_unit, $_float, $_username & $_password; In the listed order.
1 3148 posted 13 years ago by o0110o
Highlight Search Terms in Text
0 1561 posted 13 years ago by pruntrut
A simple class to cache files (or other results) with PHP.
1 2793 posted 13 years ago by peckham
Takes a # of seconds and converts it to human readable format. If happened within seconds-years.
0 1671 posted 13 years ago by mburica
It is a bit simpler reversing of multibyte strings.
0 1639 posted 13 years ago by iTony
PDO-format insert array function
0 1777 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 1728 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 3159 posted 13 years ago by ginoplusio
Wordpress Custom Post Type, custom taxonomy and queries
0 1728 posted 13 years ago by SidFerreiraZ
Use: echo format_size(filesize("fichier")); Example result: 13,37 Ko
0 2374 posted 13 years ago by zhyar
This will take an IP and try to find the city.
0 2652 posted 13 years ago by iTony
This is a route that ables the website to show the user's profile to the world.
0 1125 posted 13 years ago by rafaelfragosom
Just an example showing how to minimise the mixture of HTML and PHP in a view.
0 1267 posted 13 years ago by JonnySnip3r
Simulate the $_GET array from php in javascript to get url parameters this way: url= http://localhost/?var1=example $_GET['var1'] will return "example" Just copy and paste the code.
2 2904 posted 13 years ago by sergiazow
CREATE A HEADER MINI-CART IN WP E-COMMERCE - Part 3
0 1509 posted 13 years ago by ecksteing
CREATE A HEADER MINI-CART IN WP E-COMMERCE - Part 1
0 1751 posted 13 years ago by ecksteing
1 ... 6 7 8 9 10 ... 64