Sending leads from a site powered by Perl

To send leads in from a lead form's backend code, you would generate a list POST fields and post them to the desired POST URL.

For Example:

use LWP::UserAgent;

my $ua = new LWP::UserAgent;
my $response = $ua->post('',
    FirstName => 'John', 
    LastName => 'Doe', 
    Email => ''

my $content = $response->content;
In the example above, the example POST fields are collected and added to an array that is then posted to the POST URL. The response is then received and would then be processed to determined the desired action depending on the sending page's requirements and method sent to.

Copyright ©2012