use LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->agent("send"); # Create a request my $req = HTTP::Request->new(POST => 'http://signup.website.com/index.pl?action=signup'); $req->content_type('application/x-www-form-urlencoded'); use URI::Escape; my $username = uri_escape($CGI->param('username')); my $email = uri_escape($CGI->param('email')); my $password = uri_escape($CGI->param('password')); my $name = uri_escape($CGI->param('name')); my $recaptcha_response_field = uri_escape($CGI->param('recaptcha_response_field')); my $recaptcha_challenge_field = uri_escape($CGI->param('recaptcha_challenge_field')); my $affiliate_key = uri_escape($CGI->param('affiliate_key')); $req->content("username=$username&email=$email&password=$password&name=$name&recaptcha_response_field=$recaptcha_response_field&recaptcha_challenge_field=$recaptcha_challenge_field&affiliate_key=$affiliate_key&sitetype=clan"); # Pass request to the user agent and get a response back my $res = $ua->request($req); # Check the outcome of the response print $CGI->header(-type => "text/html"); if ($res->is_success) { print $res->content; }else { print $res->status_line, "\n"; }