$_FILES è una variabile superglobale utilizzata di norma nell'upload di file dal computer dell'utente al server.. essa contiene i dati del file durante l'upload (dimensione, formato, nome, nome temporaneo, ecc), quindi usare $_FILES in quel modo non serve assolutamente a niente, anche perchè utilizzi un url al posto dell'indice...
Codice PHP:
<?php
$immagine = "http://www.repubblica.it/images/2011/03/03/162225740-191299b9-bfd5-4831-b945-1375c43ac90c.jpg";
preg_match("/\.(gif|bmp|png|jpg|jpeg){1}$/i", $immagine, $ext);
$imagem_nome = md5(uniqid(time())) . "." . $ext[1];
$cartella = "/tmp/".$imagem_nome;
file_put_contents($cartella, file_get_contents($immagine));
$postData = array();
$postData['fileupload'] = $cartella;
$postData['submit'] = "Submit";
$postData['key'] = "48FOPUVW3dfcb3dd7f5bf93120a456040cb2b51d";
$postData['rembar'] = "yes";
$postData['xml'] = "yes";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.imageshack.us/index.php");
curl_setopt($ch, CURLOPT_POST, true );
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_TIMEOUT, 240);curl_setopt($ch, CURLOPT_POSTFIELDS, $postData );
$response = curl_exec( $ch );
curl_close($ch );
echo $response;
?>