Welcome To Snipplr


Everyone's Recent PHP Snippets



  1. FAV

    Email Validation For Form Submission

    This code will demonstrate how to implement the email validation for form submission by using php. You can obtain a free account at https://www.mailboxvalidator.com/pay/9
    PHP 4 views posted 1 year ago by Hexasoft
  2. FAV

    Auto Complete City Search Sample Code

    This tutorial will demonstrate how to implement the autocomplete search function by using php and ajax. You can obtain free IPV6 database at http://www.ip2location.com/free/ipv6
    PHP 5 views posted 1 year ago by Hexasoft
  3. FAV

    PHP regex e-mail validation

    It should work for domains like @something.co.uk note that regex will never really be able to match 100% of e-mail addresses without allowing some false positives
    PHP 1 views posted 1 year ago by plasticbottle
  4. FAV

    Add Separators in WordPress Admin Menu

    Add this snippet to theme's functions.php Add menu items that will have separator after them to $separatorsAfter array.
    PHP 5 views posted 2 years ago by cusmin
  5. FAV

    Add Admin Menu Separators

    Please add this code to functions.php This will add admin menu separators between all admin menu items.
    PHP 3 views posted 2 years ago by cusmin
  6. FAV

    Hide Cusmin Appearance in WordPress

    Hide Cusmin plugin appearance from all other users, even administrators. Add this code to active themes's functions.php
    PHP 3 views posted 2 years ago by cusmin
  7. FAV

    WordPress/WooCommerce - Redirect add to cart button to the checkout page

    Automatically redirect users to the checkout page once a product has been added to the cart. This code should go to your functions.php file.
    PHP 6 views posted 2 years ago by catswhocode
  8. FAV

    Example of PHP Sample SMS code - Messaging API

    BroadNet Technologies furnishes you with a variety of PHP Sample SMS code examples and programming objects, and assist you in connecting to our gateway via the PHP script. Sending your messages via our designed PHP SMS Sample Code is easier than you...
    PHP 13 views posted 2 years ago by Broadnet
  9. FAV

    Calculate Full Size of Directory in PHP

    This code allows to calculate the full size of a directory using PHP.
    PHP 4 views posted 2 years ago by apphp-snippets
  10. FAV

    WhoIs Query in PHP

    This code allows to perform a query to WhoIs service in PHP.
    PHP 5 views posted 2 years ago by apphp-snippets
  11. FAV

    Download file headers

    Set headers for file download
    PHP 3 views posted 2 years ago by macodev
  12. FAV

    Generate all old PDF preview images in WordPress

    From WordPress 4.7 when you upload a PDF it generates jpg previews. All pdf will remain without previews, or you can use this script to generate previews.
    PHP 6 views posted 2 years ago by ginoplusio
  13. FAV

    Update multiple fields using #ajax in Drupal 7 form

    Update multiple fields using #ajax in Drupal 7 form
    PHP 2 views posted 2 years ago by guruparthi
  14. FAV

    Get A Website Using Curl (SSL Support)

    This example will CURL a forum and echo it's contents using SSL support.
    PHP 1 views posted 3 years ago by Davis34
  15. FAV

    How to use date pop-up calendar in custom drupal form

    How to use date pop-up calendar in custom drupal form
    PHP 3 views posted 3 years ago by guruparthi
  16. FAV

    PHP website accelerator - Cloudflare-style full page caching with page rules in 1 PHP file

    # Slick.php PHP full page cache with Cloudflare-style page rules. No DNS changes required, just upload the PHP file, configure and then include from your main application controller (e.g. index.php
    PHP 1 views posted 3 years ago by mattnicholson
  17. FAV

    Cakephp Can't get query strings from URL

    Typically when you use Security->requireSecure() to do https redirects, you have to make sure you do pass all data from http to https.
    PHP 4 views posted 3 years ago by Pidarasiya
  18. FAV

    cakephp elastic-search pagination

    How do you use the elastic-search plugin with cake's native pagination?
    PHP 2 views posted 3 years ago by Pidarasiya
  19. FAV

    Credit card Year dropdown

    This snippet adds credit card select box dropdown values 10 years in future from current year.
    PHP 3 views posted 3 years ago by acosonic
  20. FAV

    Php File Upload Script

    General file upload script in php. Error set using SESSIONS.
    PHP 9 views posted 3 years ago by aravindnair93
  21. FAV

    Batch Zip Download

    Code for downloading multiple files as Zip file
    PHP saved by 1 person 5 views posted 3 years ago by aravindnair93
  22. FAV

    PHP Country Code to Continent with switch error html remove

    This is editing of code http://snipplr.com/view/36870/ because that use if which will slow performance this snippet use switch
    PHP saved by 1 person 5 views posted 3 years ago by ah72king
  23. FAV

    PHP Country Code to Continent with switch

    This is editing of code http://snipplr.com/view/36870/ because that use if which will slow performance this snippet use switch
    PHP saved by 1 person 3 views posted 3 years ago by ah72king
  24. FAV

    Select Wordpress posts by number of revisions

    Too many revisions taking up space in your database? Use this script to find which posts have more than 10 - and then you can figure out what to do with them.
    PHP 4 views posted 3 years ago by JoshChris
  25. FAV

    Wordpress Query: Sort posts nearest proximity to farthest

    A quick query example for a wordpress database query that gets posts ordered by distance via the custom fields `latitude` and `longitude`.
    PHP 2 views posted 3 years ago by JoshChris
  26. FAV

    Redirect to Another Directory in .htaccess

    This example shows you how to create redirection o another directory. It may be useful, for example, when you have a project, placed in sub-directory.
    PHP 6 views posted 3 years ago by apphp-snippets
  27. FAV

    Get last order details from checkout session in Magento

    The code snippet below can be placed in any template file or anywhere after the Mage is initialized, and there has to be an order placed before.
    PHP saved by 1 person 3 views posted 4 years ago by toannguyen
  28. FAV

    Yii2 dropwdown list filter in GridView

    Put it in the columns array
    PHP 2 views posted 4 years ago by guimarca
  29. FAV

    Yii2 signup captcha

    First, for SignUp Model. Second, for signup view.
    PHP 6 views posted 4 years ago by guimarca
  30. FAV

    Yii2 Gridview Foreign Key

    The 1stline in the function that generates the Foreign key relation in the model, 2nd is the name of the attribute in the gridview
    PHP 4 views posted 4 years ago by guimarca