Fetch Mails in Core PHP
Create an Core php app on console (https://console.developers.google.com).
Download Google Client library from the following link (https://github.com/googleapis/google-api-php-client)
Download the file of credentials(client_id,client_secret) and put it in the project directory.
Create Read more…
What is an EML File ?
EML is an email message file extension (means an email is stored in a file with an extension .eml). This file is in the standard MIME RFC 822 format by Microsoft Outlook Express and other email programs. EML files can contain plain ASCII Read more…
Below are the best practices that should be followed in PHP:
1. define() vs. const
In the early version of PHP, one would use define() function to set constants. But with new updates in PHP gained one more way to declare constants as “const”. They both Read more…
Regular expressions use arithmetic operators like +,^,- and create complex expressions that can help to validate IP address, email address, telephone no, etc. They save our coding time.
Some of built-in PHP regular expressions are:
Preg_replace- perform pattern match on a string and returns true if Read more…
How to convert PDF to image file using PHP?
Before installing PDF to Images package, firstly you need to install two PHP extensions
Imagick and Ghostscript.
Step 1: Install Imagick
sudo apt-get install php-imagick
Step 2: Restart Apache
In the second step Read more…
Broken image link issue
While creating a website or any project, we usually need to add some images to it. Suppose we have a Laravel project where we are showing some images from s3 or somewhere else.
We may include the image in HTML tag like this below Read more…
Events are one of the many powerful features of the Laravel. The event basically means the thing that happens or takes place, especially the one that is important. So, in Laravel’s case, events are triggered when some condition is met like most websites have authentication Read more…
The mysqli_query statement
Generally, we use mysqli_query to execute Mysql queries in PHP. We can use multiple mysqli_query statements to execute multiple operations like insert, update, and select. Sometimes, we store records in more than one table during save operation at the backend, but it is Read more…
Methods of Debugging by dumping information
These methods are used for debugging in PHP. We can see the variable values in human-readable form on the console and can find errors in case there are issues due to variables incorrect values. print_r() and var_dump() are used Read more…
Paytm gateway integration in PHP
Paytm is a very popular way to make payments these days. To integrate Paytm in our site we need to follow the given steps –
Step 1. First, we need to create an account at https://business.paytm.com/ and get our Read more…
How to add Text to Image with Php and Python
Step 1: Call the python file from PHP with the following arguments.
$ filePathForPython: Specify the location of the python file.
$imageName: Dynamic name of the image.
$ imageText: Text to be written on the image Read more…
Method of Face detection using Laravel
Laravel is a PHP framework for Web Development. It provides many features to make things easy for Web Development. It also takes care of the security of the application. If you have an intermediate level knowledge of PHPRead more…
How to install MPDF 7.x for PHP version > 5.6 on https://www.ionos.com/ and use in PHP Project?
Since from January 2019, https://www.ionos.com/ has been resisting the use of PHP version 5.6, it is supporting PHP versions >= 7.1 Read more…
How to Send Emails Using Mandrill
Mandrill is a transactional email platform which was built by Mailchimp. It is used for sending the personalized, one-to-one e-commerce emails, and automated transactional emails like password resets, order confirmations, and welcome messages
1. Firstly we Read more…
Detect mobile device php code
We often need to detect if site visitor is using an iPad, a smartphone or any other mobile device in order to change website appearance and even make it faster by reducing data load. Normally we use the media queries and Read more…
Implementing Salesforce SOAP and Bulk API Integration in PHP
Salesforce SOAP API:
Salesforce SOAP API is a coding method to use our Org’s information with the help of inbuilt functions and SOQL query. With the help of these function, we can access or Read more…
How to Create a custom plugins in wordpress
What is a WordPress plugin:
A plugin in WordPress is a small software app that can be added to a WordPress site to extend its functionality and to add new features to it without changing its Read more…
How to resolve “Class ‘App\Controller\Aws\S3\S3Client’ not found” error in CakePHP 3.*
Problem: Class ‘App\Controller\Aws\S3\S3Client’ not found error occurs when we are trying to create S3Client class object with given code (code copied from github):
$s3 = new Read more…
Introduction to Laravel Eloquent ORM
Eloquent ORM is an Object Relational Mapper that interacts with the database. It is a package separate from laravel so can be used outside the laravel too. It implements active record pattern. Laravel Eloquent ORM uses Object-Oriented Read more…
How to sort query result according to various search conditions in fetch query of CakePHP 2.
Problem: Priority based sorting of records
Example: Search a string (“Proposalways StudySection”) and display records in following order:
Contain all words (“Proposalways StudySection”) in Read more…