I posted a few days ago asking how to load a page from facebook through curl or implode and ended up being shown the following code:

Code:
<?php
function curl_get_contents($url)
{
    $handle = curl_init();
    curl_setopt($handle, CURLOPT_URL            , $url);
    curl_setopt($handle, CURLOPT_RETURNTRANSFER    , true);
    curl_setopt($handle, CURLOPT_MAXREDIRS        , 5);
    curl_setopt($handle, CURLOPT_FOLLOWLOCATION    , true);
    curl_setopt($handle, CURLOPT_USERAGENT        , 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4');
    return curl_exec($handle);
}

$data = curl_get_contents('http://www.facebook.com');

echo $data;

?>
My question now is, what function(s) are used so that I can view portions of facebook logged in to my account? Is there a way to pass a cookie through curl?