in reply to Submit form to multiple servers

I assume what you are asking is this: "can I have a Web form submit its data to the same script on different servers?"

While you might be able to pull something off with JavaScript, you couldn't guarantee that all browsers would handle that properly. Just a straight HTML form will only submit its data to the resource listed in the forms action attribute.

What I would do is submit the form to a server side process that acts as a user agent and resubmits the data to the other servers. See LWP and LWP::UserAgent.

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

Replies are listed 'Best First'.
Re: Re: Please help!
by Kanji (Parson) on Mar 25, 2002 at 03:13 UTC

    If you only need to work with GETable forms, you can forego the LWP suite entirely by dynamically generating frames with appropriately crafted src attributes for each of the target forms.

    The added bonus to going this way is you don't have to worry about authentication or people using your script to DoS others, since the actual GETing is done by the user's browser. :)

        --k.


Re: (Ovid) Re: Please help!
by Janusz (Initiate) on Mar 24, 2002 at 23:42 UTC
    I assume what you are asking is this: "can I have a Web form submit its data to the same script on different servers?" Yes, exactly. Thank you for your answer. I have something like "clasifieds.pl" placed at 6 different servers and I like to have admin possibility for adding the same clasified to all of them from one form. I'm afraid, I can run scripts and have some experience but cannot coding, still. I realize I need a script which duplicate data but I cant do it by myself. Sorry for my english. Regards Janusz