I'm trying to use cURL in PHP to retrieve the HTML of https://www.facebook.com/video.php?v=720617444660843
, but it's not printing nothing and curl_error
is returning nothing.
This is the code I'm using:
$defaults = array(
CURLOPT_URL => "https://www.facebook.com/video.php?v=720617444660843",
CURLOPT_HEADER => 0,
CURLOPT_RETURNTRANSFER => TRUE,
CURLOPT_TIMEOUT => 4
);
$ch = curl_init();
curl_setopt_array($ch, $defaults);
if( ! ($result = curl_exec($ch)))
{
trigger_error(curl_error($ch));
}
curl_close($ch);
echo $result;