automate file upload using perl

N

[nix]

Hi,

I'm trying to automate a process to upload a file to hotmail, but
having a strange error and I don't know what I'm doing wrong with the
script.

below is the code:

use HTTP::Request::Common;
use LWP;

-- snipped --

$ua = new LWP::UserAgent;
$ua->agent('Mozilla/5.0 (compatible; MSIE 5.5; Windows 98; Win 9x;
Windows 2000)');

$response = $ua->request(POST
'http://by7fd.bay7.hotmail.msn.com/cgi-bin/doattach',
Content_Type => 'form-data',
Content => [ curmbox => 'F000000001',
HrsTest => '',
attachmentfilename => '',
attachorcancel => '',
userfilename => '',
contentType => '',
smsg => 'jaja.saved',
attfiles => '',
stationery => '',
originalstationery => '',
ref => '',
RTEbgcolor => '',
from => 'compose',
oldattfile => '',
_HMAction => '',
attfile => ['./text.txt'],
]
);

print ($response->is_success) ? $response->content :
$response->status_line;


The error message returned:
<!-- counter(177) >= nLines(177)! -->
<!-- H: bay7-f64.bay7.hotmail.com -->
<!-- V: WIN2K 09.07.50.0039 i -->
<!-- D: Sep 3 2003 18:03:53-->
<!-- S: 0-->


I'd appreciate very much if somebody could enlight me with some
inputs.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top