Tag: PHP
Using Google Search Operators
Using Google Search Operators for Better Results Google defines Search Operators as the “words or symbols in one’s search phrase that make the search results more precise”. These operators have their basis in coding as they are nothing but shortcuts
Sending Emails in CakePHP with Example
What support/library is there in CakePHP for sending emails and how to use it? In CakePHP3, there are Transport and Email classes available under Cake/Network/Email namespace that are used for sending emails. After an update in the version 3.1 email
Data Sanitization using PHP
Understanding PHP data sanitization with an example In PHP data sanitization is a process in which we remove unwanted content from the strings to make them safe to use in HTML code. For example if user types Javascript code in
SequenceMatcher in Python and Calling Python Script in PHP
Introduction to SequenceMatcher in Python and Calling Python Script in PHP SequenceMatcher is a class in Python which compares pairs of sequences of any type.SequenceMatcher is a class which comes under the difflib module. It provides classes and functions for
Laravel Configuration and Environment Variables
Laravel Configuration and Environment Variables Each laravel application has one “Config” directory which includes all the basic configuration files. You can configure your application by adding custom or built-in configuration variables. Environment Configuration: Based on the environment where the application
Handling zip file download completion and cancellation event in PHP
Handling zip file download completion and cancellation event (PHP) Problem: I am working on a project in which user needs to download a zip file from the website. I am creating zip file on the server temporarily which should be
Why and How to use spl_autoload_register?
Purpose and Usage of spl_autoload_register with example __autoload is an older method. This method was first introduced in PHP 5 as a magic function but now this method is deprecated as of PHP version 7.2.0. If we want our code
Introduction to Magic Methods in PHP
Here we will go through different Magic Methods in PHP The PHP functions which starts with the double underscore “__” are called magic methods. These are the methods which are always defined in classes, and can not be used alone
PHP script scheduling without cron jobs
PHP script scheduling without cron job Sometimes a website built in php needs to schedule a script on daily or hourly basis – for example, Reminder Emails, Newsletter emails or Database backups to be taken automatically. Normally, these types of