cobra has asked for the wisdom of the Perl Monks concerning the following question:

I am creating a program that takes user input through an HTML form and then sends that information to other Web pages. How do I send the form data I receive to other online forms and then submit that info so that it can be processed by their Web site? I then need to bring the processed results back, so I can organise and display them to the users of my system. Is LWP::UserAgent the way to go?

Replies are listed 'Best First'.
Re: Retrieving Info from other Web pages
by little (Curate) on Apr 01, 2001 at 19:46 UTC
    yep; LWP is the right way for HOW you want to do this.
    But if you do this more often, better think about Information exchange with these other sites using different techniques, e.g. XML- documents sent as a request and also as an answer - so you both have the info you need while the surfer remains at your site also. (Just a thought)

    Have a nice day
    All decision is left to your taste
      Simple example to slurp in Google's home page:

      #!/usr/bin/perl use LWP::Simple; my $page; unless (defined ($page = get 'http://www.google.com')) { die "Can't retrieve page"; }
      Although I think it's worth learning the more complicated LWP::UserAgent module if you're doing something with more depth...

      cLive ;-)

      Thanks alot. The program is for an acedemic project of limited scope, so probably no need for info exchange. I need to retreive online routeplaning information from various sources and then display the results to the user.