Free JSON API for News and Blog Articles
In this article, we are going to implement a Free News API provided by NewsAPI.org. Please provide credit to https://newsapi.org/ while using the API for non commercial use. In case you are using for commercial purpose, check their pricing. Source Code :…
Calculate Distance between two location with Latitude Longitude using PHP
In this article, we will be writing a simple PHP function to calculate distance between two points with Latitude and Longitude. The distance is then converted into various units including miles, feet, yards, kilometers and meters. <h2…
Generate Random String using PHP
In this post, we will be writing a simple PHP function that will generate random string of desired length. We can generate a random string with fixed set of characters using simple string functions like substr, str_shuffle and str_repeat.…
Generate QR Code using PHP Library
This library helps us to generate QR codes very easily. The library makes use of bacon/bacon-qr-code to generate the matrix and khanamiryan/qrcode-detector-decoder for validating generated QR codes. Further extended with Twig extensions, generation…
Format Numbers in PHP ( like 1.2K, 3.1M, 2.5B )
We normally see huge number in formats like 1.2K, 3.1M and 2.5B. Its not practicable to write large numbers in full numbers like 1200000 or 2200000000. In this post, we will be writing a PHP function to format a number in the short form. <?php…
How to download YouTube Thumbnail using PHP ?
YouTube has now become an integral part of our internet browsing habit. YouTube has provided easy access to the various sizes of video thumbnails. The various resolutions of YouTube video thumbnails are provided below : Thumbnail Links Max Resolution :…
How to download Youtube Video using PHP ?
In this post, we will be writing a PHP script to download a YouTube video using PHP. We have a Youtube Downloader Class provided by CodexWorld. We will be using the same class to download YouTube video. There are two php files for this. index.php and…
PHP Script to Create Your Own Captcha
What is Captcha ? Captcha is a type of challenge–response test used in computing to determine whether or not the user is human. CAPTCHA is mainly used as a security check to ensure only human users can pass through. Generally, computers or bots are not…
Complete Web Push Notification using OneSignal in 10 steps
A push notification is a message that is “pushed” from backend server or application to user interface. Push Notifications can be beneficial in many ways. Users can be provided with latest sports scores, some breaking or flash news or let a user know…
PHP Source Code : Complete Facebook Chat Bot using PHP
Facebook Page has now become a vital part for any business. With increasing dependency on Facebook for promoting products or services, Facebook Messenger Chat Bot can prove to be a new tool to enhance your business to the targeted audience. Source Code…
Website Performance Optimization : Page Caching
A web cache is an approach for the temporary storage (caching) of web documents, such as HTML pages and images, to reduce bandwidth usage and server load. The content of a webpage can be stored in a file temporarily so that every time server receives a…
How to execute PHP code from HTML File ???
The following post shows a cool way to execute PHP code from files with HTML extension with the help of .htaccess file. We can write PHP code in a file with HTML extension and run that HTML file on server side thus executing the PHP code written on it.…
How to get MAC Address of all Devices in my Network using PHP ?
MAC Address According to Wikipedia, a media access control address (MAC address) of a device is a unique identifier assigned to a network interface controller (NIC). For communications within a network segment, it is used as a network address for most…
Convert JPG/PNG Image to WEBP Using PHP
In this post, we are going to learn how to convert JPG/PNG images to WEBP images. WebP is a modern image format that provides superior lossless and lossy compression for images on the web. Using WebP, webmasters and web developers can create smaller,…
Cryptocurrency : Get Current Bitcoin Price using PHP API
According to Wikipedia, Bitcoin is a cryptocurrency, a form of electronic cash. Cryptocurrency is basically a digital currency in which encryption techniques are used to regulate the generation of units of currency and verify the transfer of funds,…