uniprosper
12-17-1998, 03:18 PM
Hi,
I wondered if anyone could give me any help as to how I use the POST method in Perl.
What I'm trying to do is open a socket connection with another server, and post information to a file on their server using the POST method. I know how to do this in HTML, but I don't want to do that because I want the Perl script to be able to do it automatically.
I also know how to use the GET method in Perl, even when opening a socket connection to another server, but I just can't figure out how to post form contents to a another server using Perl.
Any ideas? Please let me know. All helpful information will receive a FREE website promotional package for their site, so now you have a reason to post a response!
This is the GET method I'm using at the minute in my Perl script:
openconnection("http://serverhere.com","80");
$add"$/path/to/file/here";
$submit = "GET $add HTTP/1.0\n\n";
send(SOCK,$submit,0);
close(SOCK);
Any ways to convert this to a POST method and mail form contents to this file?
Like I said, all helpful responses will receive a REWARD, worth $29.95
(submission to over 5,000 search engines and FFA site, plus a FREE advert in my E-Zine which is sent to 3000+ people!)
And Merry Christmas!
Lee.
lee.benson@diamond.co.uk
I wondered if anyone could give me any help as to how I use the POST method in Perl.
What I'm trying to do is open a socket connection with another server, and post information to a file on their server using the POST method. I know how to do this in HTML, but I don't want to do that because I want the Perl script to be able to do it automatically.
I also know how to use the GET method in Perl, even when opening a socket connection to another server, but I just can't figure out how to post form contents to a another server using Perl.
Any ideas? Please let me know. All helpful information will receive a FREE website promotional package for their site, so now you have a reason to post a response!
This is the GET method I'm using at the minute in my Perl script:
openconnection("http://serverhere.com","80");
$add"$/path/to/file/here";
$submit = "GET $add HTTP/1.0\n\n";
send(SOCK,$submit,0);
close(SOCK);
Any ways to convert this to a POST method and mail form contents to this file?
Like I said, all helpful responses will receive a REWARD, worth $29.95
(submission to over 5,000 search engines and FFA site, plus a FREE advert in my E-Zine which is sent to 3000+ people!)
And Merry Christmas!
Lee.
lee.benson@diamond.co.uk