How to extract all links of web page using PHP

Welcome back to shorltearner.com, in our previous post we learn how to Convert words to numbers with the help of PHP.

extract all url of website

Also Read :
PHP Login Script With Remember me.
Unable to create a directory a wordpress error
Change password using javascript, php and mysqli.
Password and Confirm Password Validation Using JavaScript
Check Email is Already Registered in Database using Ajax and JavaScript.
How to hide extension of html and php file.?

so in this post today we will learn how to extract all links of any web page with the help of PHP and will store all the links into MySQL database.
also make a URL extractor platform which will help us to analysis the website.

if some one is using WordPress website we can extract the URLs and check which kind of themes and plugins that website developers are used.
so just follow the below code an develop your own URL extractor.

so in the above code we are just creating a PHP function that takes website URL as a parameter and fetch /extract all the links.
so in the below code we are just passing website URL as a parameter to our function.

How to Convert 1000 to 1k |using PHP

Welcome back to shorltearner.com, in our previous post we learn how to Convert words to numbers with the help of PHP. so in this post today we will learn how to convert number into sort number format in PHP.
so before start this tutorial we take an overview on number_format which is also a predefined PHP function that are used to The number_format() function formats a number with grouped thousands.

how to convert number into sort form in php

Also Read :
PHP Login Script With Remember me.
Unable to create a directory a wordpress error
Change password using javascript, php and mysqli.
Password and Confirm Password Validation Using JavaScript
Check Email is Already Registered in Database using Ajax and JavaScript.
How to hide extension of html and php file.?

for example if i take the below code as an example

than the number_format function returns an output like

so If we want to convert number into sort form in thousand, million, billion then we used another predefined PHP function number_format_short that will help to convert any number to it’s sort form like (Eg: 1.4K, 14.32M, 40B ) etc.
so in the below code we take an example which converts a number 1,43,20000 into 14.32M.

Upload a file to the Server using|PHP

welcome back to shortlearner.com , in our previous post we learn how to Convert words to numbers in PHP. in this post we will see how to Upload a file to the Server with the help of PHP.
Let’s go through the overview of this program before starting the tutorial. So we will first create a file with the name index.php, in this file we are creating a responsive form by using bootstrap classes and taking a file from user and after submitting the form we will upload it on the server.

Upload a file to the Server

Index.php

Also Read :
PHP Login Script With Remember me.
Unable to create a directory a wordpress error
Change password using javascript, php and mysqli.
Password and Confirm Password Validation Using JavaScript
Check Email is Already Registered in Database using Ajax and JavaScript.
How to hide extension of html and php file.?

after submitting the form we will upload this file on the server using below code.

generate an array with a range using PHP

Welcome back to shorltearner.com, we are starting a new series of PHP interview questions for beginners and experienced,so in previous post we learn, Converting words to numbers in PHP
In this post we see how to generate an array with a range taken from a string.

How to generate an array of strings numbers with a specific range

Also Read
Unable to create a directory a wordpress error
PHP program that multiplies corresponding elements of two given lists
PHP program to print out the multiplication table up to 6*6
Write a PHP program to check if the bits of the two given positions of a number are same or not

Output

another way to find range between to given numbers with the help of php predefined function range(), see the below example

Output

Converting words to numbers in PHP

Welcome back to shorltearner.com, we are starting a new series of PHP interview questions for beginners and experienced,so in previous post we learn, Write a PHP program to check if the bits of the two given positions of a number are same or not
In this post we see how to Converting words to numbers in PHP.
Also Read
Unable to create a directory a wordpress error
PHP program that multiplies corresponding elements of two given lists
PHP program to print out the multiplication table up to 6*6

convert number to words in php