Fetching data from a Page (data between Tags) using PHP
You can fetch data from a webpage by using this script. It is useful when you need to fetch data like Stock Rates on your site. Like if you want to fetch data between span tags. <?php // retrieve htmltagcontent tag contents function get_htmltagcontent($file){ $h1tags = preg_match_all(‘/(<span>)(.*)(</span>)/ismU’,$file,$patterns); $res = array(); array_push($res,$patterns[2]); array_push($res,count($patterns[2])); return $res; } … Read more