<?php
$url='http://imageshack.us/index.php';
$postData = array();
$postData[ 'fileupload' ] = "@".$fichier;
$postData[ 'submit' ] = "upload";
$postData[ 'type' ] = "blank";
$postData[ 'aff' ] = "";
$postData[ 'MAX_FILE_SIZE' ] = "1048576";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url );
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_POST, 1 );
curl_setopt($ch, CURLOPT_INFILESIZE, filesize($fichier) );
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData );
$response = curl_exec( $ch );
//echo curl_error($ch);
curl_close($ch);
echo $response;
?>