Illustration showing PHP mail() errors, SPF/DKIM/DMARC setup, Gmail spam rejection, and SMTP solution using PHPMailer.

Why PHP mail() Is Not Working and How to Fix Email Delivery Issues

Many developers run into problems when using PHP’s built‑in mail() function. Common complaints include:

  • PHP mail() not working
  • PHP mail success but does not deliver the email
  • Not getting email to my Gmail account with PHP mail()
  • Not getting email with the simple PHP mail() function

These issues are widespread because mail() It is very basic and lacks modern authentication. Let’s explore why this happens and how to fix it.

Continue reading “Why PHP mail() Is Not Working and How to Fix Email Delivery Issues”
How to Implement ChatGPT - OpenAI API in PHP Curl

How to implement ChatGPT (Openai) on the website in PHP

Are you interested in integrating the power of OpenAI’s ChatGPT into your PHP applications? In this step-by-step guide, we’ll walk you through the process of using the ChatGPT API with PHP and CURL. It’s easier than you might think!

Continue reading “How to implement ChatGPT (Openai) on the website in PHP”

How to change the MySQL table’s Column Order/Position

Sometimes it happens that once you created the MySQL table, later on, you need to arrange the column position or order according to the new updates.

There are two ways to change the table’s column order or position for your MySQL database:

Continue reading “How to change the MySQL table’s Column Order/Position”

Google reCAPTCHA V3 Implementation in PHP

Google reCaptcha is a free service from Google that helps protect websites from spam and abuse. Google has launched reCAPTCHA v3 to prevent spam bots without any user interaction. It returns us spam scores that can be used to take various actions in your web app.

What do I need to add the Google reCAPTCHA v3?

You only need a Google account to register your site to get API to use in your web application. So simple.

Continue reading “Google reCAPTCHA V3 Implementation in PHP”

How to set India Time Zone to PHP

If your web application store the current date and time to your database when user fill the data or submit any form, you have to set the timezone to save date and time according to your timezone.

You can set the default timezone in following two ways in php.

1) Change to the php.ini file by the changing the default timezone
If you are not aware about to update the php.ini file, please follow the following instructions.

  • Open your php.ini file with the File Manager in cPanel
  • Locate and then open your php.ini file for editing.
  • Add the following line of code to top of your php.ini file

Once you update the php.ini file, please check your phpinfo.php page to verify the change took place. It should looks like below image

You can find the list of Supported Timezones, from the following link:
https://www.php.net/manual/en/timezones.asia.php

2) Add below line to your PHP file (It’s recommended to add it to your main PHP configuration file):
date_default_timezone_set(‘Asia/Kolkata’)