Results 1 to 3 of 3

Thread: view image without true url

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2002
    Posts
    259

    view image without true url

    How can I view image using code like

    Echo "<img src='image.php?image=12'>";

    what is the code of image.php to do that ?

  2. #2
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    There is no code to do that.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  3. #3
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099
    PHP Code:
    if(isset($_REQUEST['Image'])){
    switch(
    $_REQUEST['Image']){
        case 
    "1":
            
    header("Content-type: image/gif");
            
    $filename "images/one.gif";
            
    $fp fopen($filename,"r")or die("Something went wrong :S");
            while(!
    feof($fp)){
            
    $chunckfread($fp,16);
            print 
    $chunck;
            }
        break;
        case 
    "2":
            
    header("Content-type: image/gif");
            
    $filename "images/two.gif";
            
    $fp fopen($filename,"r")or die("Something went wrong :S");
            while(!
    feof($fp)){
            
    $chunckfread($fp,16);
            print 
    $chunck;
            }
        break;
    }

    you could kinda do the same if you were reading the data from a database.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width