Upload a file to Drupal server from an outside URL
Here is a solution I've used recently for a Facebook module. Set the image path to $path variable (ie. http://graph.facebook.com/username/picture). Then do the following to store it via Drupal's managed file system:

$image = file_get_contents($path); // this is a PHP function to get a string representation of the image file

$destination = 'public://path/to/store/this/image/name.jpg'; // a stream wrapper path where you want this image to reside on your file system including the desired filename

$file = file_save_data($image, $destination, FILE_EXISTS_REPLACE);

if (is_object($file)) { // if you get back a Drupal $file object, everything went as expected so make the status permenant
   $file-&gt;status = 1;
   $file = file_save($file);
}