Acá te dejo la solucion de lo que buscás! :D Mucha suerte! Si querés saber como copiar esa imagen avisame! ;)
Código PHP:
Ver original<?php
$url = 'http://graph.facebook.com/iduser/picture';
$timeout = 0;
// Getting binary data
foreach( $fields as $field ) {
if( preg_match('/([^:]+): (.+)/m', $field, $match) ) { if( isset($retVal[$match[1]]) ) { $retVal[$match[1]] = array($retVal[$match[1]], $match[2]); } else {
$retVal[$match[1]] = trim($match[2]); }
}
}
//here is the redirect
if (isset($retVal['Location'])){ $imagen = $retVal['Location'];
} else {
//keep in mind that if it is a direct link to the image the location header will be missing
$imagen = $_GET[$urlKey];
}
?>
SALUDOS!