Getting started with Elasticsearch

What is Elasticsearch? Elasticsearch is a search server based on Lucene. It provides a distributed, multitenant-capable full-text search engine with a RESTful web interface and schema-free JSON documents. Elasticsearch is developed in Java and is released as open source under the terms of the Apache License What is Apache Lucene…
More..

Getting Started with Ansible

What is Ansible? Ansible is Simple IT automation tools that managing your server infrastructure, Including Code Deploys, Handling services on your remote server, Installations and configurations server. Here are some more key properties of Ansible: Dead simple setup Super fast & parallel by default No server or client daemons; use…
More..

Count matching occurrences in php array

You can Count matching occurrences in php array using php array function array_count_values() Syntax: array array_count_values ( array $array ) array_count_values() returns an array using the values of array as keys and their frequency in array as values.  Example:-   <?php       $array = array(1,"roopendra",1,"php","roopendra");       print_r(array_count_values($array));   ?> Above code will…
More..

Validate URL in PHP

You can validate URL in PHP using regular expression or using validate filters Validate URL using regular expression: Example:- <?php // Write you regular expression patttern to match URL $pattern = "/\b(?:(?:https?|ftp):\/\/|www\.)*/i"; // Assign URL to $URL variable $URL = ';name=roop'; // Check url using preg_match if ( preg_match($pattern, $URL)…
More..

Post JSON data via PHP cURL

Post JSON data via PHP cURL We can Post JSON data via PHP curl by using header Content-Type: application/json in CURLOPT_HTTPHEADER. Below is working code demonstration of PHP curl with post json field. <?php $url = ''; $jsonString = json_encode(array("key" => "value")); // You can directly replace your JSON string with…
More..
TechieRoopSolution for DevOps & Open Source Technology2017