Category Archives: PHP

How to take a screenshot of a web page through a php script

In this article i will let you how to take a screenshot of a web page through a php script. in this example i am using google api to get page information. We will pass website url in the query string parameter of google page speed api.  And the full script looks like below – <?php   //website… Read More »

How to make asynchronous requests in php with example

As we know php serves requests synchronously, means each line of code executes in the synchronous manner of a script after getting the result from one line it moves to execute next line or wait for the result before jumping to execution of next  line of code. There is a scenario where we need to make requests to… Read More »

PHP multi dimensional array sorting by a column with example

While working on an application we generally need to sort a multi dimensional array  by a column and sometimes we get frustrate to sort. Because there is no inbuilt function is available to do this operation. In that case we will need to implement some logic to achieve the desired output. So here, with this example you can… Read More »

Create secure password protected web pages and files through htaccess

Hello friends, Today we will learn to create secure password protected web pages and files through .htaccess in easy steps. Sometimes in our project we need to protect web pages and files from an unauthorized person. You will also have seen many websites where their some pages have password protected or by username and password. So anybody who… Read More »

Laravel 5- Google reCaptcha integration and validation example

Hi guys, In this article i am going to tell you about laravel5- google reCaptcha integration and validation example. If you want to secure you application’s form then captcha is a good choice to secure a form submission in your application. And google reCaptcha is best for that. If you do not secure you form through captcha then… Read More »

Laravel5 barcode generator example with milon/barcode package

Hello guys, In this article i will let you know about the laravel5 barcode generator. When you are developing an application sometimes you need to create a module to generate barcode. So here you will know how to generate barcode in your application. Laravel has many packages to implement many features. Here we will use milon/barcode package and… Read More »

Multi Dimensional Array Sorting in Php

There are some inbuilt php functions are available to sort an array in which order you want like sort(), ksort(), rsort(), usort() etc. But these methods sort only one dimensional array. If you want multi dimensional array sorting you will have to write some code to handle it. Here, in this article i will tell you a simple… Read More »

Random number generator in php

Some times we need to random number generator in php for an application. Generally if write code for an application we need a number such as authentication code or one time password (OTP) to validate user. Here i am going to tell you about different methods for random number generator in php. Method1 : rand(1000, 9999), mt_rand() or mt_rand(10,10000)… Read More »