Welcome To Snipplr


Everyone's Recent PHP Snippets



  1. FAV

    Yii2 timestamp behavior

    In the model
    PHP 9 views posted 4 years ago by guimarca
  2. FAV

    Wordpress plugin for Snipplr

    This is the simple plugin for your wp site , with this plugin you can embed snippets code from http://snipplr.com . Easy to use , just paste url from http://snipplr.com and thats it. Version: 1.1
    PHP 12 views posted 4 years ago by snipembed
  3. FAV

    Convert XML to Array in PHP

    Convert easily XML File or String to Associative Array in PHP
    PHP 15 views posted 4 years ago by kavikms
  4. FAV

    Insert HTML code in PHP

    Se puede escribir código HTML sin problema insertando además las variables php que se necesiten dentro del propio "relleno"
    PHP 20 views posted 4 years ago by tionazo
  5. FAV

    Database Connection in PHP

    try to with mysqli_*
    PHP 19 views posted 4 years ago by smagic39
  6. FAV

    WordPress Video Modal Widget

    A plugin that adds widget functionality to a third-party video modal plugin. The widget accepts a YouTube video ID and a thumbnail URL of the user's choice. It then generates a thumbnail link that launches a video modal via the third-party plugin. Op...
    PHP 17 views posted 4 years ago by julian90
  7. FAV

    feeds with memcache

    feed class with baseUrl and endpoint curling the target and caching on memcache
    PHP 10 views posted 4 years ago by ramirog89
  8. FAV

    Creating an RSS Feed From Your Site

    If you syndicate your content with an RSS feed it can help to drive additional traffic to the content pages.
    PHP 8 views posted 4 years ago by COBOLdinosaur
  9. FAV

    generate thumbs

    define ur thumbx
    PHP 9 views posted 4 years ago by ramirog89
  10. FAV

    Wordpress Loop - WP_Query

    Wordpress Loop - WP_Query
    PHP 12 views posted 4 years ago by alanyoshida
  11. FAV

    Save multiple row of checkbox value into database

    I have been trying to solve my problems on stackoverflow, but none seems to help. Hopefully someone here could help me.
    PHP 14 views posted 4 years ago by raymondeu
  12. FAV

    Using cURL get webpage

    Using cURL to get webpage DOM
    PHP 7 views posted 4 years ago by mos666
  13. FAV

    Formatted Text Output using str_pad()

    This is a simple PHP class that can be used to produce nicely formatted reports from unorganized data.
    PHP 6 views posted 4 years ago by COBOLdinosaur
  14. FAV

    Use curl in php to post to a php webpage programmatically and retrieve the result

    This source code contains two files: 1) result.php is a php webpage which expects a post request and renders some static results 2) mycurl.php uses curl to post programmatically some data to the result.php and after rendering the result is being re...
    PHP saved by 1 person 11 views posted 4 years ago by pligor
  15. FAV

    WordPress Parent Page with Child Page Excerpts

    Snippet for a parent page to list child pages with excerpts.
    PHP 12 views posted 4 years ago by hussong
  16. FAV

    Detect and convert utf-8 on string

    I can't say I can rely on mb_detect_encoding(). Had some freaky false positives a while back. The following code will detect when you need to enconde or decode it.
    PHP saved by 1 person 11 views posted 4 years ago by fackz
  17. FAV

    Distance between two UK postcodes

    A PHP function for calculating the distance between two UK postcodes
    PHP 9 views posted 4 years ago by mickeywilko
  18. FAV

    Get Current Server Path in PHP

    Get Current Server Path in PHP
    PHP saved by 9 people 11 views posted 4 years ago by ursdeep
  19. FAV

    PHP simple pagination

    PHP pagination simple algorithms;
    PHP 17 views posted 4 years ago by mus7afa
  20. FAV

    An Utility to Search Text in All Files of Any Directory in PHP

    An Utility to Search Text in All Files of Any Directory in PHP
    PHP saved by 25 people 14 views posted 4 years ago by ursdeep
  21. FAV

    Allow login from specific IP Address

    Allow login from specific IP Address
    PHP 10 views posted 4 years ago by nbpurohit
  22. FAV

    Disable "Add to basket" button for price zero

    Disable "Add to basket" button for price zero
    PHP 9 views posted 4 years ago by nbpurohit
  23. FAV

    Shorthand for Ternary Operator in PHP

    Shorthand for Ternary Operator in PHP
    PHP saved by 9 people 6 views posted 4 years ago by ursdeep
  24. FAV

    Different ways to change the Maximum Execution time for PHP Scripts

    Different ways to change the Maximum Execution time for PHP Scripts
    PHP saved by 4 people 11 views posted 4 years ago by ursdeep
  25. FAV

    WordPress - redirect to the post instead of archive page when search query returns single result

    Courtesy Kevin Chard at WPSnipp.com. Adding this snippet to the functions.php of your wordpress theme will redirect your search to the post automatically when wordpress only returns a single search result.
    PHP saved by 4 people 11 views posted 4 years ago by adambundy
  26. FAV

    Using Array_multisort to re-order data

    This snippet allows an array or multiple arrays to be re-sorted using multiple key fields.
    PHP 8 views posted 4 years ago by COBOLdinosaur
  27. FAV

    Distance in SQLITE

    This is damn crazy! sQlite does not have all the trig functions need to do distances. So here is how you load that into sQlite on the fly.
    PHP 9 views posted 4 years ago by brownrl
  28. FAV

    Drupal 7 - Module .info file

    Starter .info file
    PHP 14 views posted 4 years ago by sherakama
  29. FAV

    Wordpress add multiple image upload custom field to any post type

    Hi, here i implement multiple image upload custom field to page post type if you want it for another post type just change post type name. Add this following code to your current theme’s function.php file. Go to your pages from wordpress admin a...
    PHP 25 views posted 4 years ago by nbpurohit
  30. FAV

    Load own jquery files on YII framework

    Override yii's jquery files and load your own.
    PHP 9 views posted 4 years ago by federaik_