Results 1 to 7 of 7

Thread: Do js files execute server side?

  1. #1
    Join Date
    Jun 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Do js files execute server side?

    I am working with an activex control for video.

    I would like to be able to use a "local" ip address from my web server instead of a public one.... then have it execute server side...

    because i am using apache to forward to local ip to the real public ip...

    anyway, anyone know if js files execute server side? would a local ip work or would it have to be public ip?

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    What's the IP actually being used for? Just with javascript/activeX?

    I believe the browser will usually work with the real IP because that's just how it's configured. If you are accessing a local page, I'm not sure how that is treated.
    If it's a page that is on the network, that might use the local IP.

    Why?

    As for the big question, no, Javascript is totally client side. Not sure if that does mean it will use the local IP, though.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Jun 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks... the ip is a public ip of a video server...

    thats what i was afraid of... i dont think it will work with anything but a public ip because when the users views the page in the browser it is basically running from their computer.... not the web server....

    i was hoping that the javascript would execute on the web server...
    then i could use an ip local to the server...

    then have apache forward that local ip out to the real video serv. ip.

    so all the user would be able to browse to is a local address.

    thanks for the quick reply and your help.

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    You could use a serverside code, but that isn't live... it's only accessible when a page loads.

    .jsp is a java server page... like php, but a bit more like javascript (though don't get java and javascript confused.)


    Not really sure how to fix the problem.

    Let's take a step back, though... what exactly is the "problem"? and is this the only solution?
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    Jun 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    oh boy... well i wont get into the whole long thing...

    the activex control has the ip of a video server in it.
    would like to stop web users from being able to save source and run video from anywhere.... unless the page is on our web server....

    so say... they could not save the source as a html page and run it from the desktop...

    have work with proxypass, iptables etc to do this...
    gotten close but no luck...

    i was shooting in the dark that maybe js files would execute server side...
    so i could actually include a local ip in the activex object...

    then have the server forward that local to the real public ip in the background.

    if it does not execute server side then i could never use a local ip in there... because it is executing from the users pc....

    thanks again

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Well... yeah. If you can use a serverside language, go for it.

    However, it will always be possible to get around the file protection. It usually does nothing. Sounds like you've got some advanced stuff, but by using activeX, you're already limiting it to IE 6 on PCs. Ouch.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  7. #7
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I see what you're saying. You have a streaming video server, and you want to periodically save clips of it then only allow the user access to those clips. That's the only way I can think of that you'll achieve this.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

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