<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, "http://www.samsung.com/sitemap.xml");
$contents = curl_exec($ch);
curl_close($ch);
preg_match_all('%(<loc[^>]*>.*?</loc>)%i', $contents, $matches);
for($i=0 ; $i<=count($matches) ; $i++)
{
echo $matches[0][$i]."<br>";
}
?>
برچسب:
نویسنده: محمد رضا جوادیان