Hi am using simple_html_dom to parse some website. Is any way to extract the doctype?
Thanx, Granit
Hi am using simple_html_dom to parse some website. Is any way to extract the doctype?
Thanx, Granit
You can use file_get_contents
function to get all HTML data from website.
For example
<?php
$html = file_get_contents("http://google.com");
$html = str_replace("\n","",$html);
$get_doctype = preg_match_all("/(<!DOCTYPE.+\">)<html/i",$html,$matches);
$doctype = $matches[1][0];
?>