Welcome To Snipplr


Everyone's Recent PHP Snippets



« Prev 1 2 3 4 5 ... 152
  1. FAV

    How To Use Update Query In Laravel ?

    Updating a record in Laravel using Eloquent.
    PHP 197 views posted 1 week ago by devquora
  2. FAV

    How to add validation in Laravel

    Laravel provides several different ways to validate your application incoming data.By default Laravel’s base controller class uses a ValidatesRequests trait which provides a convenient method to validate all incoming HTTP requests coming from client....
    PHP 180 views posted 1 week ago by devquora
  3. FAV

    How To Use Delete Query In Laravel

    Learn how to use delete query in Laravel Framework.
    PHP 176 views posted 2 weeks ago by devquora
  4. FAV

    How to clear laravel cache on Shared Hosting

    Clear Laravel Cache on shared hosting
    PHP 180 views posted 2 weeks ago by devquora
  5. FAV

    List Posts By Terms

    To display events from The Events Calendar Pro organized by taxonomy
    PHP 189 views posted 4 weeks ago by reflectiondigital
  6. FAV

    How to extract the tags shared between two different post types in Wordpress

    Extract all the tags (shared between two post types) used with a specific post type
    PHP 143 views posted 3 months ago by ginoplusio
  7. FAV

    function to obfuscate web text into random design

    Function for obfuscate Text in html pages. good for making screenshot and mind data protection if needed. changes Text into many small divs with different bgcolor.
    PHP 145 views posted 3 months ago by PietKeizer
  8. FAV

    Plugin that disables notifications of wp-kernel and wp-plugin updates

    installed in a special folder /wp-content/mu-plugins and disabled auto-update plugins and core WP
    PHP 149 views posted 3 months ago by cerxx
  9. FAV

    PHP Random Spin

    A quick snippet to rotate a series of words on page load using PHP.
    PHP 145 views posted 4 months ago by danparks
  10. FAV

    lastModified.func.php

    With this snippet you will have the ability to deliver the most recent version of any file. When dealing with a browser's cache you can't be certain your viewers are getting the most recent copy. By appending a GET value (the UNIX timestamp) to, f...
    PHP 143 views posted 4 months ago by daemondevin
  11. FAV

    getDoctype.inc.php

    With this snippet you will have the ability to display the `<DOCTYPE>` while sending the correct headers with support for content type negotiation. It also will correct itself for the W3C validator which does not send the correct Accept header for...
    PHP 148 views posted 4 months ago by daemondevin
  12. FAV

    What is default session time and path in PHP. How to change it ?

    Default session time in PHP is 1440 seconds (24 minutes) and the Default session storage path is temporary folder/tmp on server.
    PHP 146 views posted 5 months ago by interviewqueries
  13. FAV

    How to use "IN" Query in Laravel ?

    In Laravel you can use "IN" query as Using Eloquent $data = YourModel::whereIn('id', array(1, 2, 3))->get(); Using DB Query builder $data = DB::table('your_table')->whereIn('id', array(1, 2, 3))->get();
    PHP 152 views posted 5 months ago by interviewqueries
  14. FAV

    Get the Value of the Custom Field Using the Shortcode

    Get the Value of the Custom Field Using the Shortcode
    PHP 94 views posted 5 months ago by cerxx
  15. FAV

    [php] [txtfile] Lire un fichier avec la fonction file

    Read a file with the file function
    PHP 26 views posted 6 months ago by martinbrait
  16. FAV

    [php] [txtfile] lire la première ligne de texte d'un fichier sur le serveur

    read the first line of text of a file on the server To read the first line of text in your file: The fgets () function retrieves the first 4096 characters from the first line of your file.
    PHP 11 views posted 6 months ago by martinbrait
  17. FAV

    Lister des fichiers en fonction de leur extension

    List only certain files in a folder with PHP Lists only certain files extensions as links on a page from a defined folder
    PHP 11 views posted 6 months ago by martinbrait
  18. FAV

    Lister tous fichiers contenus dans un dossier

    php list all files of a given directory
    PHP 10 views posted 6 months ago by martinbrait
  19. FAV

    Liste de sélection des départements français

    php selection list of french departments
    PHP 11 views posted 6 months ago by martinbrait
  20. FAV

    Lister répertoires et fichiers commençant par ...

    php list files and directories beginning with .... 1 paramètre d'entrée
    PHP 14 views posted 6 months ago by martinbrait
  21. FAV

    Underconstruction redirect Function

    Underconstruction redirect
    PHP 12 views posted 11 months ago by cerxx
  22. FAV

    How To Remove WooCommerce JSON/LD Structured Data

    Going through the templates and removing really isn’t an ideal solution here. Luckily there is a single function you can add to your child theme’s functions.php file that will disable this.
    PHP 17 views posted 1 year ago by cerxx
  23. FAV

    How to remove application/ld + json YOAST SEO plugin in wordpress

    JSON-LD is one of the micromarking schemes. If you use the SEO plugin Yoast SEO on your website, then it defaults to a JSON-LD scheme for the entire website that cannot be changed. In order for the site owner to be able to use any other microdata, th...
    PHP 20 views posted 1 year ago by cerxx
  24. FAV

    Remove version of CSS / JS files in WordPress

    By default, WordPress adds the? Ver = [version] parameter to the end of the address of all connected CSS and JavaScript files. The use of versioning adds a convenient mechanism for monitoring the state of the browser’s cache. After modifying the file...
    PHP 19 views posted 1 year ago by cerxx
  25. FAV

    Transfer the call scripts from header to the footer on WordPress

    If you have been able to check your site by means of the PageSpeed ??Insights service, you may notice that it is not an easy task to recruit even 80% of the test results. Only by completing most of the recommendations of Google, you can hope for an i...
    PHP 14 views posted 1 year ago by cerxx
  26. FAV

    PHP analog of console.log () function

    Debugger analog for PHP: debugger console_log ().
    PHP 12 views posted 1 year ago by cerxx
  27. FAV

    Logging debug arbitrary information

    In certain cases, it is useful to display additional information in a journal that does not report an error, but simply helps in writing your own code. For this PHP provides the function error_log (). This function does not provide formatting, so yo...
    PHP 12 views posted 1 year ago by cerxx
  28. FAV

    wp-change-domain

    Before moving on to the site migration, make sure that the new domain is parked for hosting. To do this simply: go to your new domain and if a message appears that the site has not been launched yet, then everything is fine. If nothing will open at a...
    PHP 12 views posted 1 year ago by cerxx
  29. FAV

    Code to upload a file in PHP

    Code to upload a file in PHP
    PHP 18 views posted 1 year ago by devquora
  30. FAV

    Working with Sessions in PHP

    As HTTP is state protocol.To maintain states on server and share data across multiple pages PHP session are used.PHP sessions are simple way to store data for individual users/client against a unique session ID.Session IDs are normally sent to the br...
    PHP 14 views posted 1 year ago by devquora
« Prev 1 2 3 4 5 ... 152