On Tue, Nov 16, 2010 at 3:43 PM, Mambo Knave wrote:

> // Not necessary, but it does not hurt:
> curl_easy_setopt(sessionA, CURLOPT_USERAGENT, UserAgent.c_str());

> ...

> // These are NOT necessary at all!
> // All works 100% fine without them. Any reason why I should keep this?
> curl_easy_setopt(sessionA, CURLOPT_AUTOREFERER, 1);
> curl_easy_setopt(sessionA, CURLOPT_REFERER, LoginPage.c_str());


These are just some tricks that various websites use to determine
whether or not a request looks legitimate. That's why I suggested
them as "some things to TRY" rather than "some things you MUST do"

A few reasons I can see for keeping them:
 1) It more closely represents what a browser would do.
 2) In case etrade someday decides to start checking this info.
 3) If you ever use this code as a "template" for some other site.

Thanks for sharing your results with us, it's always good to have
it documented on this list what worked for a certain situation.

 - Jeff
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to