Welcome To Snipplr


Everyone's Recent PHP Snippets



1 ... 8 9 10 11 12 ... 147
Here's a country list with continent and country by country code!
0 1030 posted 10 years ago by kilise
**Example of use:** if (!isUniversityEmail('[email protected]')) exit('You must have a valid and .edu email address to register for an account.');
1 746 posted 10 years ago by phpdev
By default Apache won't allow you to download a file over 2GB. This PHP script overcomes that along with some extra goodies. The script will read from standard url path the file on the server to download and display the filesize along with a link...
1 748 posted 10 years ago by deanhouseholder
To be used in WordPress template. List full taxonomy, or only custom post type associated with the post. Examples include a linking or non linking list.
2 541 posted 10 years ago by lromak
To insert custom loop of post attachments as images (at core or custom size) linked not to full size image but custom-configured (or core) size.
2 706 posted 10 years ago by adambundy
PrestaShop Advance SEO module is offered by FME. This module is used to configure On Page SEO components of Product pages. The Meta title, keywords and descriptions can be utilized by using this module. Due to its intelligent formula this module is a...
0 647 posted 10 years ago by AlastairBrian
Traverses a multidimensional array and returns an array with the results. It also echoes the result as a string just for demonstration.
0 552 posted 10 years ago by gummiost
This is the code to add facebook comments to your wordpress site.
1 733 posted 10 years ago by bitsculptor
This will print out a variable to a <pre>
0 520 posted 10 years ago by brownrl
Generate a generic file comment
0 537 posted 10 years ago by brownrl
Generate a generic function comment block
0 478 posted 10 years ago by brownrl
This is a quick sublime snippet to quickly setup a DB table for pagination. Ideally from here you will be into a smarty template.
0 485 posted 10 years ago by brownrl
When using PDO with sQlite ->rowCount() doesn't work. the recommendation is to do a pre query to get the number. Thus, I created this snippet to help things along.
0 513 posted 10 years ago by brownrl
This simple function allows you to getect a country code and city of your site visitors, using the www.geoplugin.net service. You may use this data to add default values in registration form or use it for any other purposes, like blocking access to y...
0 952 posted 10 years ago by apphp-snippets
This example shows you how to define custom error pages in .htaccess file and also how to display the error page on your site. You may create separate files for each error, described in Sample 1 or just create the one PHP file for Sample 2. Here...
0 606 posted 10 years ago by apphp-snippets
Der folgende Codeschnipsel enthält keinerlei Überprüfungen der übergebenen Parameter, diese sollten für den produktiven Einsatz noch nachgepflegt werden. Wie man sieht, ist die Berechnung von Wochendenden und Feiertagen recht einfach. Diese Ber...
1 694 posted 10 years ago by satie83
*Example:* if (!isRewriteMod()) exit('Please install Apache mod_rewrite module.');
0 576 posted 10 years ago by phpdev
Free PHP tools with code snippets for Magento; 1. Banners 2. New Products Slider 3. Request for code 4. Product solds 5. Quick contact
0 596 posted 10 years ago by robocarlo
Lists only certain files extensions as links on a page from a defined folder
1 1233 posted 10 years ago by kidmizere
This shop by brand plugin allows Magento merchants to create a separate page where all brands are listed in alphabetical order with an attractive slider on top of the page. Upon clicking on brand it takes users to the individual brand landing page wh...
0 533 posted 10 years ago by simonwalker
Magento Google maps extension allows visitors to track the nearest physical store and get the directions online. It is a useful extension for e-merchants having multiple stores on different locations. The customers can also search for the store by t...
0 615 posted 10 years ago by simonwalker
Get all custom taxonomies that are attached to posts that have another custom taxonomy. Like fetching all categories that are attached to products that have the brand taxonomy "Nike".
0 701 posted 10 years ago by JoshChris
Doing the echo with multiple concatenated bits of strings was very error prone and I was always getting parsing errors. The toggle format where you flip PHP on and off throughout the HTML is less error prone but is a real pain in the ass if you have...
0 545 posted 10 years ago by COBOLdinosaur
Thanks to Stephen Harris for this > http://wordpress.stackexchange.com/questions/50425/show-current-navigation-path-from-menu
1 968 posted 10 years ago by adambundy
Change the Views Slideshow pager items in <li> elements so that they are easier to style
0 537 posted 10 years ago by mktimes5
Genius stuff right here from https://gist.github.com/BronsonQuick
1 665 posted 10 years ago by JoshChris
Create new user account programmatically - drupal 7
0 561 posted 10 years ago by pictonio
Increase server memory limit in wp-config.php
0 538 posted 10 years ago by fweeeb
1 ... 8 9 10 11 12 ... 147