From DOMDocument to CURL?
<p>im using DOMDocuments to download an RSS feed into my PHP script, simple by:</p>

<pre><code>$doc = new DOMDocument();
$doc-&gt;load($source);
</code></pre>

<p>I want to use instead of DOMDocument, CURL. How can change those 2 lines of code to make all my script compatible?. This is my complete script by the way:</p>

<pre><code>&lt;?php
//PUBLIC VARS
$arrFeeds = array();
$downItems = 0;
$time_taken = 0;
//*PUBLIC VARS
function getRSS($source) {
    $start = microtime(true);
    ini_set('default_socket_timeout', 1);
    global $arrFeeds, $downItems, $time_taken;
    $arrFeeds = array();
    $doc = new DOMDocument();
    $doc-&gt;load($source);
    foreach ($doc-&gt;getElementsByTagName('item') as $node) {
        $itemRSS = array ( 
            'title' =&gt; $node-&gt;getElementsByTagName('title')-&gt;item(0)-&gt;nodeValue,
            'desc' =&gt; $node-&gt;getElementsByTagName('description')-&gt;item(0)-&gt;nodeValue,
            'link' =&gt; $node-&gt;getElementsByTagName('link')-&gt;item(0)-&gt;nodeValue
        );
        array_push($arrFeeds, $itemRSS);
        $downItems+=1;
    }
    $time_taken = microtime(true) - $start;
}
//getRSS("http://www.atm-mi.it/_layouts/atm/apps/PublishingRSS.aspx?web=388a6572-890f-4e0f-a3c7-a3dd463f7252&amp;c=News%20Infomobilita");
//echo(strip_tags($arrFeeds[0]['title'])."&lt;br&gt;&lt;br&gt;".$time_taken);
?&gt;
</code></pre>

<p>Thanks for the help!</p>
