automate file upload using perl

Ask a Question related to PERL Miscellaneous, Design and Development.

  1. #1

    Default automate file upload using perl

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

  2. Similar Questions and Discussions

    1. Perl Cgi Upload File Memory Leak
      Hello, perl v5.8.0 CGI.pm-3.00 http-2.0.48 Everytime i upload a file via my perl script, the amount of bytes transfered (size of the...
    2. HELP! Need to write batch file to automate securityupdate process
      Hello: I need to figure out how to write a batch file to automate the security patch process for 40 Coldfusion servers. Some are 4.5 and some...
    3. How to automate file deployer?
      We currently use Contribute Simple file deployer to transfer webpages from a staging site to the live site. Is there a way to set date and time...
    4. Upload Friendly (Multiple File Upload Applet)
      Title : Upload Friendly (Multiple File Upload Applet) Description : UploadFriendly is an easy to use Java Applet that will allow multiple file...
    5. Automate Perl module
      I'm using ActiveState ActivePerl 5.6 as my helper script for Windows 2K/XP deployment. During OS deployment, I install ActivePerl automatically...
  3. #2

    Default Re: automate file upload using perl

    [email]maumul@hotmail.com[/email] ([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 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139