automate file upload using perl

Discussion in 'Perl Misc' started by [nix], Sep 7, 2003.

  1. [nix]

    [nix] Guest

    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.
     
    [nix], Sep 7, 2003
    #1
    1. Advertising

  2. ([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\\
     
    Brian McCauley, Sep 7, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. [nix]
    Replies:
    1
    Views:
    3,941
    [nix]
    Sep 7, 2003
  2. tester

    automate website login using perl

    tester, Sep 23, 2005, in forum: Perl Misc
    Replies:
    12
    Views:
    435
  3. perlperl

    automate command line script using perl

    perlperl, Jun 15, 2006, in forum: Perl Misc
    Replies:
    6
    Views:
    386
    perlperl
    Jun 16, 2006
  4. king
    Replies:
    2
    Views:
    182
  5. lofenee
    Replies:
    5
    Views:
    234
    lofenee
    Jul 15, 2008
Loading...

Share This Page