php55w-common conflicts with php-common-5.* | Php issues while installing libraries
I was trying to install mongo extension with pecl. It gave me error: Then, I…
August 20, 2017
I wanted to fetch all image tags from a big html, and wanted to perform some check on the ’src’ value of img tag. This blog is about how I did that.
See the code below:
$doc = new DOMDocument();
$doc->loadHTML($body);
$tags = $doc->getElementsByTagName('img');
$imgArr = array();
//iterate over all image tags
foreach ($tags as $tag) {
//get src attribute of an img tag
$imgSrc = $tag->getAttribute('src');
//Do your processing with any attribute of img tag
}
https://st.hzcdn.com/simgs/08611ef0050cb085_8-4061/contemporary-bathroom.jpg https://st.hzcdn.com/simgs/f5c19084044862df_8-4100/modern-bathroom.jpg https://st.hzcdn.com/simgs/db21d41901d3cc2d_8-7242/contemporary-bathroom.jpg https://st.hzcdn.com/simgs/dbf10837069daa21_8-1951/contemporary-bathroom.jpg https://st.hzcdn.com/simgs/e8e1de0e0231e294_8-8943/contemporary-bathroom.jpg https://st.hzcdn.com/simgs/8c71b1fe0535cbe3_8-8313/contemporary-bathroom.jpg https://st.hzcdn.com/simgs/e961a3e003fd7b05_8-4430/contemporary-bathroom.jpg https://st.hzcdn.com/simgs/1ef1a9660cda6923_8-3728/contemporary-bathroom.jpg
I was trying to install mongo extension with pecl. It gave me error: Then, I…
Introduction I have my main website, which I run on Lets say: . Now, there is my…
Introduction In this tutorial we will see: How to instantiate different classes…
Introduction In your backend and frontend projects, you always need to deal with…
Pre-requisite Assuming you have a mongodb database, and you want to take backup…
Introduction In this post, we will explore some useful command line options for…
Introduction In this post we will see following: How to schedule a job on cron…
Introduction There are some cases, where I need another git repository while…
Introduction In this post, we will see how to fetch multiple credentials and…
Introduction I have an automation script, that I want to run on different…
Introduction I had to write a CICD system for one of our project. I had to…
Introduction Java log4j has many ways to initialize and append the desired…