A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: calling formmail.pl with load variables from a remote server

  1. #1
    Registered User
    Join Date
    Jun 2000
    Posts
    3
    Hi, I have made a form in flash that sends an email based on the info you type in and i am using formmail.pl to do it.. it works fine, BUT...

    problem 1) My form.swf file has to be in cgi-bin in the same folder as the formmail.pl for it to work.. even if in my flash movie, in the load variables section,I specify the exact URL to the perl file "http://www.mydomain.com/cgi-bin/formmail.pl"

    problem 2) My flash movies are on a different server, so in order to solve problem 1, I kept the form part a separate movie (form.swf) and left in cgi-bin. And inside my flash movie running on another server, i do a load movie to get the form.swf to come up on the stage (load movie: "http://www.mydomain.com/cgi-bin/form.swf") but for some reason, when doing this, form.swf is not talking to my formmail.pl file

    I thought this would work, because both the form.swf and formmail.swf are in the same folder, but it doesn't work..

    I know the form works cause if i go directly to http://www.mydomain.com/cgi-bin/form.swf it works fine.

    Any ideas?


  2. #2
    jscott
    Guest

    formmail.pl

    Hi Flashhed,

    I am trying to get formmail up and running on my site as well. This is the first time i have dealt with a pl script and you seem to have a pretty good handle on it. If you have time i would greatly appreciate if you would forward and solutions (or other tips) in my direction.
    Thanks In Advance
    Jeff Scott
    [email protected]

  3. #3
    Member
    Join Date
    Jun 2000
    Posts
    45

    Lightbulb see mm site




    These problems sounds like they're arising from a http_referer conflict. Formmail utilizes a referer filter to prevent unauthorized domains from accessing the script - it defaults to the local directory.
    You might try acknowledging the url of the primary movies in formmail's configuration "referer" setting (in the beginning or formmail.pl). I'm assuming their url is being posted as the referer regardless of the origin of form.swf.

  4. #4
    Registered User
    Join Date
    Jun 2000
    Posts
    3
    DLB,

    No, it's not the refferer type.. I took care of that already and verified that everthing works ok from the other server and domain using an HTML form.. Things only go wrong in the flash version..

    It's behaving as if Fash will not allow a path to it as in

    "HTTP://www.mydomain.com/cgi-bin/formmail.pl"

    it is like it's only accepting the "formmail.pl" part of it

    my flash movie has to be in the cgi-bin folder or it won't work.

    Any other ideas?
    [Edited by flashhed on 06-17-2000 at 09:17 PM]

  5. #5
    Member
    Join Date
    Jun 2000
    Posts
    45

    Lightbulb idea #2

    hmmm ?

    I've set up a flash interface to formmail before, but not via a remote movie. Are you trying to retrieve the "respond" variable from the cgi script ? If so flash may be throwing up a security error.

    I remember reading that flash "compiles" vars and routines at the frame position of their first instance, after which any calls reference this location. If this is true is form.swf being relaying from its new relative position (ie. as a local instance of Movie) ? This may be tripping a security breach by indicating that the respond text is outside of the local directory (now MOVIE) - which is a no no in flash.

    this is a guess

    what do the errors read ?

  6. #6
    Registered User
    Join Date
    Jun 2000
    Posts
    3

    I figured it out

    For anyone who runs into this problem, It is because the MAIN flash movie has to be loaded on the same domain as the perl script... If you have a movie on another domain and does a load movie on the one containing the perl variables it still will not work.. the parent movie must be in the same domain as the perl script.

    check out this technote http://www.macromedia.com/support/fl...s_security.htm
    [Edited by flashhed on 06-21-2000 at 06:09 AM]

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