How to use Download Manager in ubuntu

For linux you have aria2, uget, and steadyflow just to name a few. If you like the command-line, I really recommend aria2, it’s awesome fast. To install, open a terminal and type the following commands: sudo apt-get updatesudo apt-get install aria2 To run aria2 from the terminal use the commands like this example similar to […]

Read More

How to extract img url from any html

This code will help you to extract img src url from any html document $url=”http://example.com”;$html = file_get_contents($url);$doc = new DOMDocument();@$doc->loadHTML($html);$tags = $doc->getElementsByTagName(‘img’);foreach ($tags as $tag) { echo $tag->getAttribute(‘src’);}

Read More

How to remove text between the tags in PHP

if you need to chop out the text portion from the url, turning, <a href=”link.html”>text</a> into <a href=”link.html”></a> you can do it simply by using  $str = preg_replace(‘#(<a.*?>).*?(</a>)#’, ‘$1$2’, $str);

Read More

Simple HTML Dom tutorial part-3 -extracting text from a URL

In the previous tutorial we have seen that how can we extract links images from a URL . now in this tutorial we will learn how to extract the plain text from a URL or div or any other tag <!DOCTYPE html><html lang=”en-US” prefix=”og: http://ogp.me/ns#”><head><meta charset=”UTF-8″></head><body><?php include “simple_html_dom.php”;$url = “http://www.fabulouspost.com/2017/06/kaise-pata-lagaye-koi-aappar-fida-hai.html”;$html = file_get_html($url);echo $html->plaintext; ?></body></html> After […]

Read More

Simple HTML Dom tutorial part 2 -extracting link and image from a website

In the previous tutorial we learn about the simple HTML Dom we have successfully installed the term PHP file in our server now we want to extract data from any website is we want to extract any image or links then we should follow the following code <!DOCTYPE html><html lang=”en-US” prefix=”og: http://ogp.me/ns#”><head><meta charset=”UTF-8″></head><body><?php include “simple_html_dom.php”;$url […]

Read More

Simple HTML Dom tutorial – part -1 -Introduction

Hello friends today I am going to tell you about simple HTML Dom tutorial. if you want to parse any website then this tutorial will help you. I will create a series of post that contain a simple HTML Dom tutorial so in this article we will discuss about how HTML Dom . Download the […]

Read More

how to detect back button click in browser

if you want to  detect if a user has clicked back button or not. For this you can simply use this code  window.onbeforeunload = function (e) {} It works if a user clicks back button. But this event is also fired if a user click F5 or reload button of browser. How do I fix […]

Read More