Welcome To Snipplr


Everyone's Recent PHP Snippets



1 ... 11 12 13 14 15 ... 152
The example here is if you had a form on a website that when submitted, needed to use that information to go to a special URL where the login information was all appeneded to the URL. (ex : <a href="http://giochionline1.123homepage.it"> giochi online...
0 452 posted 8 years ago by haydin
Add this snippet to `wp-config.php` to remove the file editor links from the WordPress admin menus. Read more about... [disabling the WordPress file editor](http://www.orderofbusiness.net/blog/disable-wordpress-file-editor/)
0 338 posted 8 years ago by tacudtap
Get the first char of a lastname in php
0 303 posted 8 years ago by dego89
Validating an email address is one of the hardest feats on the web. A valid email can be marketing gold, but an invalid email address is dead weight. Not only does it require a CPU-taxing PHP regular expression ("/^[A-z0-9\._-]+"."@" . "[A-z0-9][A-...
1 437 posted 8 years ago by mafhh14
This is a combined version of Bill Erickson's hide post editor and rilwis' Metabox include for specific IDs. It hides the editor for a specified post ID. You can have multiple IDs, just separate with commas.
1 401 posted 8 years ago by rickahontas
This snippet shows how to retrieve information from the SEO plugin of Yoast, to be used for front-end use. This snippet is taken from the opensource free Nexus WP framework supporting front-end editing, custom layout and drag & drop.
0 382 posted 8 years ago by barkgj
WordPress, IIS, Permalinks and index.php | Richard Shepherd
0 301 posted 8 years ago by thesmu
This snippet is a lambda function (anonymous function) to create an xml from an array. It uses recursiveness.
1 444 posted 8 years ago by abrahamsustaita
To make a custom link to a downloadable File in Views
0 368 posted 8 years ago by mktimes5
Monster.com Clone v6.3.8 is a ready Job-Portal and the best clone of Monster.com. The script comes packed with tons of essential features.
0 323 posted 8 years ago by iTechScripts
Send array through ajax tools request to js
0 482 posted 8 years ago by dosde
Disable (remove) some sidebars, or widgets at all in **Wordpress** on page template with suffix in the template name (*-no-widgets.php, *-no-sidebars.php)
1 373 posted 8 years ago by Internet-Uzver
To solve an issue for a blog main page in wordpress to display the latest post in its entirety and the remaining posts only the excerpt.
1 283 posted 8 years ago by rickahontas
A simple widget for displaying a single post in a dynamic sidebar. Originally developed to accommodate a WP user who wanted full control of which posts were displayed and what order they were on a certain page.
0 349 posted 8 years ago by chasecrawford
This table is based on the ISO 2 letter (Alpha-2 code, ISO 639-1) and 3 letter (Alpha-3 code, ISO 639-2) Standard Codes for the Representation of Names of Languages.
0 669 posted 8 years ago by rwt
Use below SQL code and replace references within the theme files.
0 345 posted 8 years ago by ihatetomatoes
This example of code shows how to do a simple POST request in PHP to another web server by using a socket connection.
0 729 posted 8 years ago by apphp-snippets
You need a copy of your model and relations (ObjectStorage properties). In this example there is a model Product with property ProductAddition (1:n relation).
0 347 posted 8 years ago by FazzyX
Use this plugin: http://wordpress.org/extend/plugins/members/ Settings are here: http://justintadlock.com/archives/2010/07/10/meta-capabilities-for-custom-post-types http://codex.wordpress.org/Function_Reference/register_post_type Gravity Fo...
0 315 posted 8 years ago by ihatetomatoes
With increasing of popularity of WordPress script, Gravatars have become a really quite popular. Now you may easy integrate them into your own script as they provide a very easy to use API.
0 278 posted 8 years ago by apphp-snippets
Usually when you're using different CSS files on your site, they might take a quite long to be loaded. Using this PHP code, you can compress them into a single file with no unnecessary white spaces or comments. Why we need to compress multiple CSS fi...
0 346 posted 8 years ago by apphp-snippets
This code allows to remove all duplicate elements from an array using PHP array_unique() function.
0 505 posted 8 years ago by apphp-snippets
This snippet allows you set a limitation for download rate of the file that visitors download from your site.
1 562 posted 8 years ago by apphp-snippets
This code shows how to parse XML file in easy way using PHP.
0 444 posted 8 years ago by apphp-snippets
This code allows to list the contents of any given directory.
1 401 posted 8 years ago by apphp-snippets
This code allows to pass filename in the $file_name variable and function will return file extension only.
0 428 posted 8 years ago by apphp-snippets
**Example of use:** echo base64DataUri('/var/www/html/background.png'); *or* echo base64DataUri('http://static.php.net/www.php.net/images/php.gif');
0 339 posted 8 years ago by phpdev
This function returns the duration of the given time period in days, hours, minutes and seconds. For example: echo convertSecToStr('654321'); would return "7 days, 13 hours, 45 minutes, 21 seconds"
0 433 posted 8 years ago by apphp-snippets
You may retrieve all needed file path data using PHP's built-in function pathinfo. You don't need to create your own functions or use regular expressions to get this info. It was already been created for this purpose.
0 536 posted 8 years ago by apphp-snippets
Sometimes you need to generate passwords for customers automatically when a new account is created. This code allows you choose the desired length and strength for the password and it is very flexible.
0 292 posted 8 years ago by apphp-snippets
1 ... 11 12 13 14 15 ... 152