A Flash Developer Resource Site

Results 1 to 17 of 17

Thread: load asp page from another server

  1. #1
    Hi,
    I'm trying to load asp page from another server with no success.
    in the swf I wrote this:
    ----------------------------------------------------
    loadVariables ("redirect.asp?page=http://www.copia.co.il/postman/try1.asp", "", "POST")
    ----------------------------------------------------

    in the file redirect.asp this:
    ----------------------------------------------------
    <%response.redirect(Request.QueryString("page")) %>
    ----------------------------------------------------

    and in another server (copia.co.il/postman) I wrote this:
    ----------------------------------------------------
    dim b, place

    b="moshe"
    place="12"

    Response.Write ("total="+Server.URLEncode(b)+"&place="+Server.URL Encode(place)+"&go=0")
    ----------------------------------------------------
    what is the problem?

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

    actually I am not too sure what the proper behaviour should be if a POST is redirected. Can you try whether GET behaves differently.
    If it is the same, could you post url to your movie (and perhaps some instructions in case it is in hebrew)

    Musicman

  3. #3
    It's not that.
    still jave problem.
    why?

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

    please tell me url to your movie....

    Musicman

  5. #5

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

    some clever people at MM obviously wanted to prevent that trick...
    so if your request reads ?page=http://somewhere it does not get sent at all. It does work, however, if your request reads ?page=http%3a%2f%2fsomewhere

    Musicman

  7. #7
    OK, so i wrote this but I still have a problem:
    ------------------------------------

    redirect.asp?page=http%3a%2f%fwww.copia.co.il/postman/try1.asp
    ------------------------------------

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

    the swf file on the server did not change....

    Musicman

  9. #9
    So what should I do?
    I found this page about this subjet:
    http://www.macromedia.com/support/fl...s_security.htm

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

    if it is still file 1.swf with the movie - this has not been changed since Monday, 19:17 GMT. So if you are now testing 2.swf, please tell so - otherwise make sure to reload the file on the server
    To make sure that data in the url cannot be interpreted as a url, it might also be an idea to strip the http part here and add it in the redirection script

    Musicman

  11. #11
    Hi there,
    Well t has been change...
    but I still have this problem.
    Can someone give me his own working example?

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

    well that's what I get when I download the swf straight from your freaking server:
    wget -S http://www.frido.co.il/love8/1.swf
    --09:12:19-- http://www.frido.co.il:80/love8/1.swf
    => `1.swf.4'
    Connecting to http://www.frido.co.il:80... connected!
    HTTP request sent, awaiting response... 200 OK
    2 Server: Microsoft-IIS/5.0
    3 Date: Sun, 18 Nov 2001 08:07:43 GMT
    4 Content-Type: application/x-shockwave-flash
    5 Accept-Ranges: bytes
    6 Last-Modified: Mon, 12 Nov 2001 19:17:58 GMT
    7 ETag: "c262e6bcae6bc11:371c"
    8 Content-Length: 742

    Musicman


  13. #13
    ok,
    u can check it also here:
    http://oniyah.co.il/ido2/1.html
    still have problem...

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

    there is different behaviour of the servers - the one at the oniyah site is sending a html redirect (which is buried inside a html response and thus does not mean anything to flash), while the frido site is sending a true location which causes the browser to go to the new address on behalf of the plugin. You should try to put the revised 1.swf (747 rather than 742 bytes) on the frido site.
    In fact the html response does not even contain a redirect address
    Compare the two traces below

    Musicman

    POST http://www.frido.co.il/love8/redirec...stman/try1.asp HTTP/1.0
    socket ok
    connect ok
    > POST /love8/redirect.asp?page=http%3a%2f%fwww.copia.co.il/postman/try1.asp
    Host: http://www.firdo.co.il
    > Content-type: application/x-www-form-urlencoded
    > Content-length: 24

    24> total=dhsgghs&go=dhsgghs>
    < HTTP/1.1 302 Object moved
    < Server: Microsoft-IIS/5.0
    < Date: Sun, 18 Nov 2001 14:16:57 GMT
    < Location: http://www.copia.co.il/postman/try1.asp
    < Connection: Keep-Alive
    < Content-Length: 160
    < Content-Type: text/html
    < Set-Cookie: ASPSESSIONIDQGQQHCFK=IIKLEMLCBJMHOAFLELKCGHGK; path=/
    < Cache-control: private
    <
    < <head><title>Object moved</title></head>
    < <BODY BGCOLOR="#ffffff" TEXT="#000000" marginheight=0 marginwidth=0 topmargin=0 leftmargin=0 rightmargin=0 id=all><h1>Object Moved</h1>This object may be found <a HREF="http://www.copia.co.il/postman/try1.asp">here</a>.</body>
    --------------
    POST http://oniyah.co.il/ido2/redirect.as...stman/try1.asp HTTP/1.0
    socket ok
    connect ok
    > POST /ido2/redirect.asp?page=http%3a%2f%fwww.copia.co.il/postman/try1.asp HTTP/1.0
    Host: oniyah.co.il
    > Content-type: application/x-www-form-urlencoded
    > Content-length: 24
    >
    24> total=dhsgghs&go=dhsgghs>
    < HTTP/1.1 200 OK
    < Server: Microsoft-IIS/5.0
    < Content-Type: text/html
    < Cache-control: private
    << Connection: Close
    <
    < <HEAD><META HTTP-EQUIV="REFRESH"CONTENT="0"></HEAD>

  15. #15
    OK.
    Now I'm confused...
    Maybe we can start from the beginnig.
    Can some1 show me an exmp. of such a thing?
    Can u help me doing it?
    thanks alot
    ido

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

    for some reason the two redirect.asp scripts work in different way. When I first got the url (1.swf at the frido site), I downloaded the swf and changed it to call up a redirect.php on my server with this simple code
    <?
    header("Location: $page");
    ?>
    This is how frido site implements the redirect.
    It did not work, so I changed it by urlencoding a few characters (and shortening the name of my php). This really worked and delivered "moshe" to the text box

    Musicman

  17. #17
    First,
    Thank u so much for your help.
    Second,
    Can u give me a brief working exmp.
    I don't know what to do...
    I'm still confused...

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