<?php
include_once("simple_html_dom.php");
$url= $_GET['txt'];
$html = file_get_contents($url);
$file = file_put_contents("testhtml.txt",$html);
$html = file_get_html("testhtml.txt");
$fileopen=fopen("testhtml.txt",'r');
?>
Hello, I am using this code to extract HTML from a website. I'm getting the HTML that is saved in testhtml.txt. The problem is that I want to analyze the HTML open and close tags, nesting and unsupported tags for HTML? Which PHP function may I use apart from regular expression?? Please help me.