how to create social media share buttons

In this post we learn how to create social media share buttons with the help of font awesome icons , bootstrap and CSS and learn how to deploy it for any website.


so before start this tutorial we should take an small overview about fontawesome and learn the implementation process of icons.

we are living in the era of digital. we have a lots of digital platform like facebook, twitter, instagram, linkedin, whatsapp, google plus and many more.

Today most of the business and companies are holding their social account. so they can reach to their customers or client base via sharing some important and relatable contents according to their niche, and sharing all the offers and information over there.

most of the developers are uses small images of social media platform or uses favicons of also .fontawesome and glyphicons are the two third party icon providers which have a good library of favicons and easy to implement.

If we want to share this article with different type of social media platforms so this article with reach more readers than i use this .

In the below code we will learn how to add share button to website. so just copy the code and paste it to your website.

now we are adding some CSS to creating our button responsive and attractive. just copy the below CSS part and paste it in the head section of your html code.

this is the customization of social network sharing buttons. if you are trying to add on WordPress website than there are some best plugins that will help you.

WordPress to Buffer
Simple Social Icons
Social Icons Widget by WPZoom
WordPress Social Login
Revive Old Posts
AddtoAny

hope this article will helps you. please share this article with all your developer buddies and help them.

How to extract all URL from website in PHP

Welcome to another PHP tutorial post. in our previous post we learn how to Get Domain Name from URL in PHP
today in this post we will learn how to extract all URL from a website with the help of predefined PHP functions like file_get_contents.

extract all url using php

so before start to fetching all URL of a website or a webpage we will take an short overview of DOMDocument.

What is DOMDocument in PHP

The PHP DOMDocument library allows us to manage HTML and XML pages after uploading our script in new DOMDocument.
so basically it is a best option to reading and changing into a HTML and XML files with the help of DOM library.

file_get_contents for reading

as we all know that file_get_contents is a predefined PHP functions which is helpful for read a content of a file into a string format.
So first of all we are creating a variable with the name of $html which will store all the string values which will converted by file_get_contents functions of PHP.

after putting the values in $html variable we are simple create a new DOM document which will Parse the HTML. The @ is used to suppress any parsing errors, that will be thrown if the $html string isn’t valid HTML.

by using DOMDocument PHP function getElementsByTagName() we will get a new instance of class DOMNodeList which contains all the elements of local tag name.
so we are passing anchor tag in side getElementsByTagName().

so in the below code we are putting our URL to fetch all the links which are inside the anchor (a) tag.

Also Read
How to Install PHP on CentOS.

How to Send Attachment on mail using PHP.

PHP Login Script With Remember me.
Unable to create a directory a wordpress error

How to integrate Razorpay Payment Gateway using PHP.
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.?

How to Generate Firebase Server Key

Welcome back to shortlearenr.com, in our previous post we learn how to implement Razorpay Payment gateway with the help of PHP.
today in this post we will see how to Generate Firebase Server Key.
so before start this tutorial we will take an short overview about firebase and its uses.

FCM push notification for android

What is Firebase

so basically Firebase is a tool which is developed by google, to building app infrastructure and improving app quality for growing your business.

so Firebase server key is used to send push notifications to android devices and this server API key is used to identify Firebase application.
we are generating Firebase server key in the below steps, keep follow the steps

Create a Firebase project and Get your Server Key

Step1 : In the very first step we have to log in into Firebase Developer Console. if you still not created any project simply click on Create project.

firebase server key

Step2 : Enter your project name, accept the Firebase terms and conditions and hit the CREATE PROJECT button.

firebase development

Also Read
How to Install PHP on CentOS.
Unable to create a directory a wordpress error
How to Send Attachment on mail using PHP.
PHP Login Script With Remember me.
Change password using javascript, php and mysqli.
Password and Confirm Password Validation Using JavaScript

How to integrate Razorpay Payment Gateway using PHP.
Check Email is Already Registered in Database using Ajax and JavaScript.
How to hide extension of html and php file.?

Step3 : In the third step we select Not right now option because we will setup our google analytics later and hit create project button.

firebase cloud messaging for android and php

Step4 : After hitting the create project button we will get a message Your new project is ready, press the Continue button to redirect your project dashboard page.

firebase cloud integration using php

Step5 : On the dashboard page click on the Gear icon which is in the top left and select Project settings.

FCM integration in php

Step6 : In the last step we just click on the Cloud Messaging Section and we will have the Server Key.

get FCM server key

thanks for reading, if this article helps you please support us and share with your developer buddies.

How do I Install and enable PHP modules

Welcome back to shortlearner.com, in our previous post we learn how to install Apache Web Server on CentOS.
today in this post we will see How do I Install and enable PHP modules.

so before start this tutorial we should take an small overview about PHP IMAP Module and its advantages.

Enable IMAP extension

What is IMAP.?

so basically IMAP is a mailbox with having a powerful and open source library to connect mailbox with POP3, IMAP and NNTP using the PHP IMAP extension.

in PHP by default the IMAP extension is disabled. so we are writing a PHP script for finding that PHP IMAP is installed or not.
so we are creating a file with the name of info.php . to find the information about PHP.

so after running this info.php file ,we got some out like below image.

PHP IMAP Extension

Enable IMAP in Xampp

just follow the below steps to enable IMAP extension in xampp.
1.go to the file \xampp\php\php.ini and open php.ini in your editor.
2. find ;extension=php_imap.dll
3. Remove semicolon from ;extension=php_imap.dll.
4. Now, now it should looks like extension=php_imap.dll
5. Save your file and restart the xampp server.

Enable IMAP in Linux

so if you are a linux user and want to enable IMAP in your server. so just follow the below steps for enabling it.
1. open your terminal and run the below commands.

2. for enabling IMAP use the follow command.

3.after enable IMAP we should restart our webserver by following command.

Install IMAP on Ubuntu

after installing IMAP on PHP7.1 restart apache by below command.

hope you also install and enable the PHP module by following all the above steps. if you still having any problem ,feel free to contact us.

How to Install phpMyAdmin on CentOS 7 – Google Cloud

Welcome back to shortlearner.com, in our previous post we learn how to install PHP in CentOS.
today in this post we will see how to install phpMyadmin on CentOS with the help of google cloud.

how to install phpmyadmin on centos

so before start this tutorial we should know some basic terms about phpMyadmin, centOS and google cloud.

What is phpMyadmin

so phpMyadmin is an open-source tool, which is used to administrate MySQL over the web interface.

phpMyadmin is one of the best GUI(Graphical User Interface) base database Management platform .

it is also used in MariaDB Database management. phpMyadmin is available in more than 78 languages.

What is CentOS

CentOS is a Community Enterprise Operating System. It is an open-source platform for non-productive developmental work.


For production concern, those works can be migrated to RHEL (Red Hat Enterprise Linux) Linux distribution platform.

What is Google Cloud

Google Cloud Platform offers services for compute, storage, networking, big data, machine learning and the internet of things (IoT),

as well as cloud management, security and developer tools. 

Features of phpMyadmin

provides compatibility to Create , Alter, Add, Drop, Rename , Import tables from CSV and SQL and Export tables from CSV, SQL, XML, PDF, etc. 

we can easily manage database, tables, fields, columns, indexes, relations, permission, etc.

 it can works with different operating systems and makes complex queries easier by using its predefined functions.


You can create PDF graphics of database layout. You can also search globally in a database or subset of it. 
phpMyAdmin can administrate multiple servers.

Also Read :

Also Read :

Password and Confirm Password Validation Using JavaScript
PHP Login Script With Remember me.
Change password using javascript, php and mysqli.
Check Email is Already Registered in Database using Ajax and JavaScript.

Before Installation

Before the installation process of phpmyadmin make sure you have already installed these below stuff.

Apache Web Server  – We need to install Apache! Check out our article Install Apache on CentOS 7.
PHP  – Then we need to install PHP! Check out our article Install PHP on CentOS.
MySQL  – Then we need to install MySQL! Check out our article Install MySQL on CentOS 7.

Step 1: VM Setup
so in the very first step logged in to your google cloud account and select the Compute Engine option from the menu.


follow the below image for better understanding.
Now we can see VM instances in Compute Engine. Click on that as shown in below image.

google cloud VM instance

so we just click on the open in browser window and than we will see terminal there. follow the below commands on the terminal.

Step 2: Adding the EPEL Repository
before adding this repository we should take an small overview of EPEL.
so basically EPEL is Extra Package for Enterprise Linux.

which creates, maintains, and manages a high-quality set of additional packages on CentOS. EPEL has an epel-release package that includes GPG

keys for package signing and repository information.
just follow the below command in the terminal for add this repository

Step3 : Install PhpMyAdmin
we have enable EPEL Repository ,now we have to install phpmyadmin by using followinng command.

Step 4 : Configuration
so for doing configuration first of all we need to have grant remote access.
We are going to make changes in the config file.


For that, we can get into the config file by using the below command.

once the command is executed we will see the below lines which is shown in the below image.

configuration of phpmyadmin in centos

Step 5 : Edit in phpmyadmin.conf file
In the above image, wecan see the line Require ip. The default value will be 127.0.0.1.
we need to replace the IP string with our machine IP.

  • To update the change , press “i”.
  • Replace that “Require ip” with the IP of your machine.
  • Saving the changes made in the config file, enter “:wq“.
  • Then exit from the phpMyAdmin.conf file by pressing ESC Key.

the changes are updated in the phpMyAdmin.conf file.

Step 6 : Restart the Apache Web Server
Now we need restart the apache web server to sync up the updated phpMyAdmin.conf file with Apache Webserver.

Once this is done, we are ready to start using phpMyAdmin.
use the following command to restart the apache web server.

After installation of phpMyAdmin

so we have successfully installed the phpmyadmin in our CentOS.
to check the GUI (Graphics user interface) of phpmyadmin.

go to the browser and type http://127.0.0.1/phpmyadmin . so the default IP is 127.0.0.1 so you must replace it with your machine IP.

Setup Login Credentials
You can set your credentials (Username and Password) in a below-mentioned manner.

First, we need to get into the phpMyAdmin installation directory by using below command.

Here you can find the below mentioned file.

Now we are going to create your credentials in this file. By using below command we can edit the config.inc.php file.

Edit the file with your own credentials. As we did before, for Saving the changes made in the config file, enter :wq. And then exit from the config.inc.php file by pressing ESC key.