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 …
Tips & Tricks Tutorials
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 …
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 …
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: …
Get Images from your Instagram Account
In this tutorial I will show you how to get images from your Instagram account. To get images from Instagram we need Access Token and Instagram user ID. Please read previous posts Get Instagram Access Token Using Client-Side Authentication and How to get Self Instagram User ID to get Access Token and Instagram user ID. Get images from your Instagram Account Now we will use file_get_contents method to get remote …
How to get YouTube subscribers count in php
In this tutorial I will show you how to get YouTube subscribers count in php using api v3.0. We need just an API KEY to get work. Below I am sharing all the steps to get api key and get subscribers count. How to get YouTube API key Below are the steps to get YouTube API key 1. Go to https://console.developers.google.com/ and login to your google account. 2. Navigate to …
How to get Self Instagram User ID
In previous tutorial I have explained how to Get Instagram Access Token Using Client-Side Authentication. Now In this tutorial I will show you how to get self Instagram user ID. Get self Instagram User ID: Click Here to receive Instagram Access Token. Now using this token, you can get self basic details like username, profile pic, bio, etc by following URL: I have created a function getSelfInstaID() to get self instagram user …
Get Instagram Access Token Using Client-Side Authentication
In this tutorial I will show you how to get Instagram access token using Client-Side Authentication (Implicit) for web apps. Instead of handling a code, we receive the access_token as a fragment (#) in the URL. This method is less secure, but allows applications without any server component to receive an access_token. The access token do not specify an expiration time but as per Instagram do not assume access_token is …