> Is there a way for a PHP script to display / show a picture, while hiding
> the URL of the actual picture ?

You can use something like:

showpicture.php?id=1231

<?php // filename: showpicture.php
  include('myfunctions.php');
  $file=get_url_for_image_to_this_id($_REQUEST['id']);
  $ext=end(split("\.",$file));
  header('content-type: image/'.$ext);
  header('content-length: '.filesize($file));
  $fh=fopen($file,'r);
  fpassthru($fh);
  fclose($fh);
  exit();
?>

Should work in general, but i haven't tested exactly this piece of code. ;)

But what you you want it for? A user can always use "save as ..." or use a
spider... ;)

I've think I've seen some technique to write the image-data directly into
the HTML-code. So the thing has no "filename" because it is part of the
"page" itself... But I think it was #CDATA for XML or such a thing...



Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list




YAHOO! GROUPS LINKS




Reply via email to