How to Create, Access and Delete Cookies in PHP

How to Create, Access and Delete Cookies in PHP

Cookies are small text files that are created by the server and stored on the user computer in around 4KB files. Cookies are used to store some information when user visit the website we set the cookies and next time when the user comes to the website we can retrieve the value of the cookie and manipulate the information or data for that particular user as per requirement, so cookies...
How to send PUSH notification from the website using Google FCM and PHP

How to send PUSH notification from the website using Google FCM and PHP

In this article, we are going to discuss, how we can send push notification from the website using Firebase Cloud Messaging (Google FCM) and PHP. In this, We are only going to discuss the PHP part. What actually is a Push Notification? A Push Notification is a message which is sent on the user's smartphone. it is basically used to increase the engagement of users in-app. A push notification can...
PHP Sessions

PHP Sessions

When we open an application on the computer, we do some work on it, the computer knows exactly who we are. But on the internet, the webserver does not know who you are and what you do, because the HTTP address does not maintain state. In order to overcome this server maintains the session or state for every user till the time user is on the website. PHP $_SESSION is a variable...
How to detect Ajax Request using PHP

How to detect Ajax Request using PHP

If you want to detect whether the request is Ajax request or not, just put the below code at the top of your PHP file. Requests from ajax mostly have X-requested-With header, which is sent by Ajax default in most of the javascript libraries. But few new servers do not set this header and thus it can not predict the request. $_SERVER is mostly supported by all server but it...
Send mail with multiple attachments in PHP

Send mail with multiple attachments in PHP

You must know about how to send an email with PHP, it's just a line of simple code to send the email, but it gets tricky when you have to send an attachment with PHP mail. Sending an email is very useful and common in websites to interact with user for different things. For example, we use email when we have to send invoices, promotions, newsletters, a new user joins...