A simple PHP HTML DOM parser written in PHP5+, supports invalid HTML, and provides a very easy way to find, extract and modify the HTML elements of the DOM. jQuery like syntax allow sophisticated finding methods for locating the elements... Read more
The following source code demonstrates a simple PHP API to get random quote. We simply need to make a GET request to the API endpoint : https://api.quotable.io/random and we will get a random quote in response. Full Source Code :... Read more
In this article, we are going through a PHP library to detect and decode QR-codes. Installing QR Code Reader/Decoder PHP Library The recommended method of installing this library is via Composer. We need to run the following command from the... Read more
In this article, we are going to learn to convert number into words using PHP. We have a PHP function which simply returns the word for the corresponding numeric value passed to it. PHP Function to convert number into words... Read more
In certain scenarios, we might need to make sure that a client is not allowed to request a page for multiple number of times within a period of time. The following sample PHP code exits the execution when a client... Read more
The following is a simple PHP script to extract all links from a webpage : <h1 style="text-align:center;">Extract All Links from a Webpage using PHP</h1> <hr> <?php function getAllLinks($url){ $urlData = file_get_contents($url); $dom = new DOMDocument(); @$dom->loadHTML($urlData); $xpath = new DOMXPath($dom);... Read more
In computing, an avatar (also known as a profile picture or userpic) is a graphical representation of a user or the user’s character or persona. It may take either a two-dimensional form as an icon in Internet forums and other... Read more
Social Medias today are one of the major source of traffic to web applications and websites. URL sharing in social media platforms like Facebook, Twitter, Instagram, Viber and others are used extensively to drive traffic to websites or other applications.... Read more
Email has become one of the integral part of our daily process in recent years. Especially to business or corporate houses, emails are widely used for communication and marketing purposes. In this article, we are going to learn to send... Read more
The simplest way to get the IP address of client with PHP is using the $_SERVER[‘REMOTE_ADDR’] or $_SERVER[‘REMOTE_HOST’] variables. However, sometimes this does not return the correct IP address of the visitor, so we can use some other server variables... Read more
A Calendar is a chart or series of pages showing the days, weeks, and months of a particular year, or giving particular seasonal information. In this article, we will be learning to design and develop a Calendar for a webpage... Read more
Often, we need users to upload files via a webpage. There’s not much challenge if the file is a simple text file or a small image file. The real challenge arises when there’s a big files (zip or videos or... Read more
Compressing files while transferring from one location to other is always a good option. In case of web experience, compressing files means reducing the file size by nice margin resulting in low bandwidth consumption as well as faster download and... Read more
Hangman is a paper and pencil guessing game for two or more players. One player thinks of a word, phrase or sentence and the other(s) tries to guess it by suggesting letters within a certain number of guesses. Complete Source... Read more
Running a command in the background can be useful when the command will run for a long time and does not need supervision. It leaves the screen free so you can use it for other work. In addition, it doesn’t... Read more
