How can you make a page refer to an image on another machine?

Discussion in 'HTML' started by db, Feb 5, 2004.

  1. db

    db Guest

    My webserver (a Siteplayer) is sitting behind my Linksys router, with a port
    forwarded to it on the router. The problem is this: how can I have the HTML
    code in a siteplayer page, webcam.html, reference an image file video.jpg
    which is located on another machine on my home network? ie, HTML code on the
    siteplayer page webcam.html:

    <img src="//Constor2/shared/video.jpg">
    or
    <img src="//192.168.1.100/shared/video.jpg">


    will both display video.jpg fine as long as webcam.html is called from a
    machine inside the router on the home net. But if I try to get to that same
    Siteplayer page webcam.html from outside the router with a port forward,
    like http://24.56.78.922:2222/webcam.html, the page comes up but there's no
    image, just the box with the red x. How can I make the image display from
    outside the router?

    Is this impossible, or is there a clever way to code it so it'll see the
    file on the other home-net machine? perhaps OBJECT embedding? Any advice
    most appreciated!!

    Thanx DB
    db, Feb 5, 2004
    #1
    1. Advertising

  2. db wrote:

    > My webserver (a Siteplayer) is sitting behind my Linksys router, with a port
    > forwarded to it on the router. The problem is this: how can I have the HTML
    > code in a siteplayer page, webcam.html, reference an image file video.jpg
    > which is located on another machine on my home network?


    The other machine on your network will need an HTTP server (although an
    FTP server would do!) installed and then link to the image in the normal
    way:

    <img src="http://12.34.56.78:80/video.jpg" alt="Picture of my VCR">

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
    Toby A Inkster, Feb 5, 2004
    #2
    1. Advertising

  3. db

    Mitja Guest

    Since you want to make pics on your fileserver available to net users in
    general, the server has obviously got to be _directly_ accessible from
    outside. <object> has nothing to do with it, the problem here is referencing
    the "inner" computer from outside

    One way to do this is opening a port, say 9876 on your primary server and
    then configure it in such a way that it transparently acts as a kind of
    tunnel to the HTTP port (no. 80) of your fileserver. It's some pretty basic
    redirection stuff, but can be a pain in the neck if you've never done
    anything like that before. Search google on routing tutorials.

    There may be simpler solutions, although I can't think of them.

    Mitja


    "db" <> wrote in message
    news:MZtUb.185534$nt4.786644@attbi_s51...
    > My webserver (a Siteplayer) is sitting behind my Linksys router, with a

    port
    > forwarded to it on the router. The problem is this: how can I have the

    HTML
    > code in a siteplayer page, webcam.html, reference an image file video.jpg
    > which is located on another machine on my home network? ie, HTML code on

    the
    > siteplayer page webcam.html:
    >
    > <img src="//Constor2/shared/video.jpg">
    > or
    > <img src="//192.168.1.100/shared/video.jpg">
    >
    >
    > will both display video.jpg fine as long as webcam.html is called from a
    > machine inside the router on the home net. But if I try to get to that

    same
    > Siteplayer page webcam.html from outside the router with a port forward,
    > like http://24.56.78.922:2222/webcam.html, the page comes up but there's

    no
    > image, just the box with the red x. How can I make the image display from
    > outside the router?
    >
    > Is this impossible, or is there a clever way to code it so it'll see the
    > file on the other home-net machine? perhaps OBJECT embedding? Any advice
    > most appreciated!!
    >
    > Thanx DB
    >
    >
    Mitja, Feb 5, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nico Grubert
    Replies:
    1
    Views:
    2,592
    Markus Rosenstihl
    Sep 21, 2005
  2. Steve Holden
    Replies:
    0
    Views:
    404
    Steve Holden
    Sep 21, 2005
  3. Replies:
    21
    Views:
    16,090
    Harlan Messinger
    Dec 14, 2007
  4. mrstevegross

    Can one hash variable refer to another?

    mrstevegross, Mar 5, 2009, in forum: Perl Misc
    Replies:
    4
    Views:
    87
    Dr.Ruud
    Mar 7, 2009
  5. PerlFAQ Server
    Replies:
    0
    Views:
    116
    PerlFAQ Server
    Apr 9, 2011
Loading...

Share This Page