Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > automate file upload using perl

Reply
Thread Tools

automate file upload using perl

 
 
[nix]
Guest
Posts: n/a
 
      09-07-2003
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.
 
Reply With Quote
 
 
 
 
Brian McCauley
Guest
Posts: n/a
 
      09-07-2003
http://www.velocityreviews.com/forums/(E-Mail Removed) ([nix]) writes:

> I'm trying to automate a process to upload a file to hotmail, but
> having a strange error


> 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-->


What made you conclude that that was an error message?

Looks like some sort of debugging aid to me.

I suggest you take a look at the response headers.

BTW: I don't think your question has anything to do with Perl but I'm
not aware of any newsgroup that deals with the language-neutral
aspects of writing automated web clients.

--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Zip, Name, Trigger File, Automate FTP Upload Willy Paycheck Computer Support 0 05-07-2009 09:17 PM
how to automate installation of a MSI file using perl king Perl Misc 2 11-16-2006 09:20 AM
automate command line script using perl perlperl Perl Misc 6 06-16-2006 03:38 PM
automate website login using perl tester Perl Misc 12 09-25-2005 02:37 AM
automate file upload using perl [nix] Perl 1 09-07-2003 06:33 PM



Advertisments