I could not get it to work either.
I've not done much with remote files, but here's a stab at it:
<?php
$fin = fopen( 'http://www.cgrcinemas.fr/ImagesCinefil/AffichePetitFormat/$ref.jpeg', 'r' );
$image = fread( $fin, 1024000);
$fout = fopen( 'testimage.gif', 'w+' );
fwrite( $fout, $image );
fclose( $fout );
?>
fread() is a binary safe file reading function. You must specify a limit to read, in this case I used 1MB (1024000 bytes). There is probably a more elegant way of determining the remote file size. I tried filesize(), but it wouldn't do it.
Hope this helps!
-Rich