A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: HTTP with Flash???

  1. #1
    Senior Member
    Join Date
    Apr 2002
    Posts
    153
    Can I send the HTTP HEAD command from Flash to a server and then check for the 200 or 304 response to determine if the file on the server has been modified since it was last checked?

  2. #2
    Registered User
    Join Date
    Feb 2001
    Posts
    13,041
    Hi,

    NO - flash does not allow to create your own requests. Depending on the browser the requests sent will be GET or GET with an If-modified-since
    If you need to know the status of a particular file, you will have to use some script

    Musicman

  3. #3
    Junior Member
    Join Date
    Apr 2002
    Posts
    2
    Hey,

    you can do it by using the socket component.

    1. Simply create a Socket. [mysocket = new XMLSocket();]

    2. Connect to the WebServer on port 80 [mysocket.connect("myserver.com",80);].

    3. Send your request [ mysocket.send("GET / HTTP/1.1\nHost: myserver.com\n\n"); ]

    4. Data is received, you can process it by [ mysocket.onData(src) {
    trace("answer is ".src);
    }

    Cabra

  4. #4
    Senior Member
    Join Date
    Apr 2002
    Posts
    153
    Originally posted by cabra
    Hey,

    you can do it by using the socket component.

    1. Simply create a Socket. [mysocket = new XMLSocket();]

    2. Connect to the WebServer on port 80 [mysocket.connect("myserver.com",80);].

    3. Send your request [ mysocket.send("GET / HTTP/1.1\nHost: myserver.com\n\n"); ]

    4. Data is received, you can process it by [ mysocket.onData(src) {
    trace("answer is ".src);
    }

    Cabra
    We are trying to put a Flash app on 500 users desktops and while we want the Flash apps to check in with the server as often as possible to find new info we do not want to overload the server.

    Do you think the method you mentioned would be less server intensive than using LoadVariables to grab a small text file every time we want to check for new info on the web site?

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

HTML5 Development Center