Welcome To Snipplr


Everyone's Recent PHP Snippets



« Prev 1 2 3 4 5 ... 147
This code is to find the domain age in PHP.
1 14712 posted 4 years ago by hexgh12345
Updating a record in Laravel using Eloquent.
0 12323 posted 4 years ago by devquora
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....
0 12085 posted 4 years ago by devquora
Learn how to use delete query in Laravel Framework.
0 11920 posted 4 years ago by devquora
Clear Laravel Cache on shared hosting
0 11998 posted 4 years ago by devquora
To display events from The Events Calendar Pro organized by taxonomy
0 11889 posted 4 years ago by reflectiondigital
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.
0 12271 posted 5 years ago by PietKeizer
installed in a special folder /wp-content/mu-plugins and disabled auto-update plugins and core WP
0 11720 posted 5 years ago by cerxx
A quick snippet to rotate a series of words on page load using PHP.
1 11871 posted 5 years ago by danparks
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...
0 10701 posted 5 years ago by daemondevin
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...
0 10967 posted 5 years ago by daemondevin
Default session time in PHP is 1440 seconds (24 minutes) and the Default session storage path is temporary folder/tmp on server.
0 6636 posted 5 years ago by interviewqueries
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();
0 5266 posted 5 years ago by interviewqueries
Get the Value of the Custom Field Using the Shortcode
0 10576 posted 5 years ago by cerxx
Read a file with the file function
0 1201 posted 5 years ago by martinbrait
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.
0 1307 posted 5 years ago by martinbrait
List only certain files in a folder with PHP Lists only certain files extensions as links on a page from a defined folder
0 1269 posted 5 years ago by martinbrait
php list all files of a given directory
0 1158 posted 5 years ago by martinbrait
php selection list of french departments
0 1360 posted 5 years ago by martinbrait
php list files and directories beginning with .... 1 paramètre d'entrée
0 1271 posted 5 years ago by martinbrait
Underconstruction redirect
0 1198 posted 5 years ago by cerxx
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.
0 1332 posted 5 years ago by cerxx
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...
0 1943 posted 5 years ago by cerxx
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...
0 1495 posted 5 years ago by cerxx
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...
0 1289 posted 5 years ago by cerxx
Debugger analog for PHP: debugger console_log ().
0 1423 posted 6 years ago by cerxx
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...
0 1223 posted 6 years ago by cerxx
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...
0 1106 posted 6 years ago by cerxx
Code to upload a file in PHP
0 1579 posted 6 years ago by devquora
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...
0 1373 posted 6 years ago by devquora
« Prev 1 2 3 4 5 ... 147