cURL / Mailing Lists / curl-users / Single Mail

curl-users

login to hotmail

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 31 Mar 2003 23:25:01 +0200 (CEST)

On Mon, 31 Mar 2003, Laurence Spector wrote:

1. Please trim down your quotes!

2. Please do not reply on mails unless you intend to continue the thread or
   conversation, use a fresh new posting for new threads/subjects.

3. Please use a sensible subject line.

> How can I use Curl to login to, say, Hotmail, click inbox, and then print
> out each individual email?

This is not as easily done as you might wish it is. You could start with
getting a copy of 'gotmail' [1] and study its source code to get a grip.

But since I've done this myself the hard way [2], I'll tell you how I've done
it (this goes for basicly anything you want to automate with curl):

- Fire up your browser. Clean away all cookies.
- Fire up ethereal. Capture network traffic.
- Login to hotmail with the browser (and list mails or whatever)
- Stop the ethereal capture

Now, extract all HTTP requests done by your browser and replay them with
curl. One step at a time, fire off a request, watch the data returned, check
with the trace, do the next request etc. Make sure to fake user-agent and set
referer properly in all requests.

I usually write a perl script to call curl and receive the HTML, as you
usually need to track contents or search for links at some stage in the
process.

At times it is far from easy.

[1] http://www.nongnu.org/gotmail/
[2] paid work, if you pay me I'll do it for you

-- 
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
Received on 2003-03-31