You Are Viewing Posts Under Category: PHP Codes

How-To-Get-Address-From-Latitude-And-Longitude-Using-PHP-And-Google-Maps-API

How To Get Address From Latitude And Longitude Using PHP And Google Maps API?

Hi! Today let’s see how to get addresses from latitude and longitude using PHP and Google Maps Geocoding API. The process of converting geometric coordinates such as latitude and longitude into addresses is called reverse geocoding. And the geocoding is just the opposite, converting an address...
How-To-Start-And-Use-2-PHP-Session-On-One-Domain-At-A-Time

How To Start And Use 2 PHP Sessions On One Domain At A Time?

Session handling is a key concept in PHP that enables user information to be persisted across all the pages of a website or app. In this post, you’ll learn the basics of session handling in PHP. We’ll start with an explanation of how sessions work and how they are related to cookies. The...
How-To-Get-Remaining-Days,-Hours,-Minutes-And-Seconds-From-A-Date-Using-PHP

How To Get Remaining Days, Hours, Minutes And Seconds From A Date Using PHP?

Today, we will learn to calculate the time remaining till future dates in days, hours, minutes and seconds. Either you are receiving values in the PHP variable from the MySQL database, or you are calling an AJAX request, this tutorial will help you in both situations. We will also display the hours,...
How-To-User-Get-Location-Details-Using-Pure-PHP

How To User Get Location Details Using Pure PHP?

Detecting the location of your users can be really useful if you want to personalize your user’s experience when they browse through your website. Want to show a uniquely tailored promotion? Want to change the language of your site or design based on where your users are coming from? Lots of websi...

How To Clean Or Sanitize String For File Name With Standards Using PHP?

Are you trying to come up with a function that does a good job of sanitizing certain strings so that they are safe to use in the URL (like a post slug) and also safe to use as file names? For example, when someone uploads a file I want to make sure that I remove […]...
Image-Color-Extract-Using-Simple-PHP-Without-Composer

Image Color Extract Using Simple PHP Without Composer

Have you ever wondered what kind of colours you should get to match your logo for your website? Here’s a very simple script that generates a colour palette for an image using the PHP GD library. This will help you find out which colours you can use to improve the quality of your site. The [&he...
How-To-Import-CSV-Files-Using-PHP-To-MySQL

How To Import CSV Files Using PHP To MySQL?

After knowing How To Export MySQL Database Tables To CSV Format Using PHP? its time to know about How To Import CSV Files Using PHP To MySQL?. The import and export of data to and from databases are a common enough procedure in PHP development. Another important activity is the backup and transfer o...