I want to parse an XHTML content using CURL. How to scrap transaction number, weight, height, Width between index.php This code gets whole html content from transactions.php . How to get data between tags. How to scrap only the contents from this HTML document and get it as array using CURL?
transactions.php
Transaction Number::
24752734576547IN
Weight:
0.85 kg
Length:
543 mm.
Height:
156 mm.
Width:
61 mm.
$url = "http://localhost/htmlparse/transactions.php";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
$output = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);
//print_r($output);
echo $output;
?> as an array value ?
Wednesday 19 October 2016
php - how to parse contents from a html file using CURL?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment