yeah, it will use your bandwidth (2x as much when using remote images) because first you will download it from the remote site using file_get_contents, and then serve it to the user.
i was thinking you would mostly use it to show images from the local server, but wanted the ability to use remote images.
you can change it to look like
<?php
$pictures = array(0 => 'http://www.google.com/intl/en/images/logo.gif', 1 => 'http://phpbuilder.com/images/new-logo.gif', 2=> 'http://site.com/pic.jpg');
if (isset($_GET['picture']) && array_key_exists($_GET['picture'], $pictures)) {
header('Location: ' . $pictures[$_GET['picture']]);
} else { /* bad picture specified in url */
//show blank image to prevent broken image
$im = imagecreate(1,1);
$bg = imagecolorallocate($im, 0xff, 0xff, 0xff);
header('Content-Type: image/png');
imagepng($im);
imagedestroy($im);
}
?>
and with that, it will tell their browser to fetch it from the actual url, which they will be able to see if they sniff out the http requests from loading your page, or if they call the url directly (image.php?picture=1) then their browser will most likely show the real url in the location bar after the request.