Tips & Tricks Tutorials

How to improve web page speed in Mobile

There are several benefits of website page speed optimization. Fast sites rank better in search engines. Google has specifically stated that one of their ranking factors is site performance, especially for mobile users. Speed optimization reduces server load. A fast website increases conversions. Fast page loads make happy customers, and happy customers buy more. To improve page speed in mobile, please follow below very easy steps before make website live. …

Continue reading

How to Get the Length of an Object in JavaScript

Everything in JavaScript is an Object. You can simply use the Object constructor in JavaScript to create an object or you can define a string object, an array object and add properties and values to it. Sometimes we require to know the length of an object for any specific reason, there is a simplest and quickest way to get the length of a given object in JavaScript is by using …

Continue reading

How to get the Widget ID in WordPress

If you are customizing the WordPress theme or working on your own theme, you might need a widget ID to make everything work like you want. For example, if you want to hide the widget on a specific page, you will need to provide a widget ID to make the code work. In this tutorial, we will show you how to get the widget ID in WordPress. Get the widget …

Continue reading

How to Remove Special Character from String in PHP

In this tutorial I will show you how to remove special character from string in PHP. Sometimes we need to remove all special characters by using preg_replace from input string. There are two option available to remove special character from string using php. Option 1: Using preg_replace PHP Function We can remove special character from sting using preg_replace, it’s using regular expression to special character from string. Syntax of preg_replace …

Continue reading

How to Remove Duplicates from Multidimensional Array

In this tutorial I will show you how to remove duplicates from multidimensional array in PHP. array_unique() function works on single dimensional array not on multidimensional arrays. After googling I have found a way to get unique multidimensional array using serialization of array. Serialization is used to storing or passing PHP values around without losing their type and structure. Steps to remove duplicates from multidimensional array 1. We will use …

Continue reading

How to protect your WordPress from XML-RPC attack

WordPress is the most popular Content Management System. This popularity makes WordPress a perfect target for hackers. The most common attack faced by a WordPress site is XML-RPC attack. The WordPress XML-RPC is a specification that aims to standardize communications between different systems. It uses HTTP as the transport mechanism and XML as encoding mechanism which allows for a wide range of data to be transmitted. Today in this tutorial …

Continue reading

How to check if my info was shared with Cambridge Analytica?

After the Cambridge Analytica Scandal, every person on Facebook is worried that his personal information has not been sold anywhere. According to the information, out of billions of Facebook users, 8.7 million people have been injured in personal information. You are not even one of them! You can find this as follows. Facebook is informing every user that his personal data is safe or not. If you have not received …

Continue reading

How to Convert XML into Associative Array in PHP

In this tutorial I will show you how to convert XML into associative array in php. I have found several methods and library to convert XML into array and following is a simple script to convert xml into array. I am using file_get_contents() php method to read xml file data into string. Steps to Convert XML into Associative Array Step 1: Following is a sample XML file books.xml Step 2: …

Continue reading