Hi all, Does anyone know of any desktop application or online website that allows us to put in a URL/webpage and scan for presence of any <H1> or any other header tags in their HTML? Thanks much!
here is a simple example maybe help you <?php if(isset($_POST['url'])) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$_POST['url']); curl_setopt($ch, CURLOPT_TIMEOUT, 20); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); $result=curl_exec ($ch); curl_close ($ch); preg_match_all("#<".$_POST['tag']."(.*?)>(.*?)</".$_POST['tag'].">#s",$result,$titles); foreach($titles[2] as $value) { echo strip_tags($value)."<br />"; } } ?> <form action="" method="post" > Tag <select name="tag"> <option value="h1">h1</option> <option value="h2">h2</option> <option value="h3">h3</option> <option value="h4">h4</option> <option value="h5">h5</option> </select> URL <input type="text" name="url" /> </form> PHP: best
Hi Estevan, Brilliant! Thanks for your contribution. I'll integrate this into my site tools as and when I'm ready. Cheers!