<?php
function get_url($url)
{a
$curl = curl_init();
curl_setopt($curl, CURLOPT_HEADER, 0);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_URL, $url);
$data = curl_exec($curl);
curl_close($curl);
return $data;
}
function get_url_data()
{
$xml_content = get_url("http://wordpress.org/development/feed/");
$dom = new DOMDocument();
@$dom->loadXML($xml_content);
$xpath = new DomXPath($dom);
$content_title = $xpath->query('//channel//title/text()');
return $content_title;
}
function print_url_data()
{
$content = get_url_data();
foreach ($content as $value)
{
$output .= $value->nodeValue . "<br />";
}
return $output;
}
echo print_url_data();
?>
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.
Our community of experts have been thoroughly vetted for their expertise and industry experience.