Results 1 to 5 of 5

Thread: http question

  1. #1

    Thread Starter
    Frenzied Member markman's Avatar
    Join Date
    Nov 2000
    Location
    Florida.
    Posts
    1,197

    http question

    Im making a webserver in vb and trying to make it support the <img> tag. When IE reads the <img> tag, it requests the image from the server. I tried sending it the same way I do with text (read the file and send it) but IE displays one of those X boxes. Any idea how to send a picture to IE?
    retired member. Thanks for everything

  2. #2
    Lively Member
    Join Date
    Nov 2001
    Location
    Dallas
    Posts
    73

    location

    I am not completely sure if I am getting what you are saying, but it should not matter where the picture is located as long as in your code you are telling it where the picture is located.

    For example I store all my images in an images folder so I just point it at that folder.

    <IMG src="../images/test.jpg">

    Hope this helps, I might be missing what you are talking about.

    Kenny

  3. #3
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    Make sure your web server sends the right MIME type in the HTTP headers:

    Content-type: image/jpeg
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  4. #4

    Thread Starter
    Frenzied Member markman's Avatar
    Join Date
    Nov 2000
    Location
    Florida.
    Posts
    1,197
    I didnt know there are headers for sending info to the client... Any info on that MIME stuff and image/jpeg?
    retired member. Thanks for everything

  5. #5
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    If you're going to make a web server, then you'll need this:
    http://www.w3.org/Protocols/rfc2616/rfc2616.html

    A web server's an interesting project.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

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