well what I am trying to achieve, is to develope a program that can
log into my eBay account.
I was sure that they would use some weird ways to pass the login names and so on, but I didn't think it would be this hard to realize or to figure out.
Well what I have done so far is to connect to ebay send them a POST with the login data and some more stuff they require and then download the html source of the page I get redirected to. But I don't get further than the part before the redirection.
I have used this code on different pages and it works there but I just can't figure this out.
I'm using cUrl for internet code (e.g. downloading source to memory, send POSTs, etc.)
Have any of you tried/done anything like this?
FILE *file = fopen("test.txt", "w");
struct MemoryStruct chunk;
chunk.memory=NULL; /* we expect realloc(NULL, size) to work */
chunk.size = 0; /* no data at this point */
curl = curl_easy_init();
curl2 = curl_easy_init();
/* First set the URL that is about to receive our POST. This URL can
just as well be a https:// URL if that is what should receive the
curl_easy_setopt(curl, CURLOPT_URL, "http://www.ebay.de");
/* Now specify additional HTTP Header data */
/* Now specify the POST data */
/* some servers don't like requests that are made without a user-agent
field, so we provide one */
curl_easy_setopt(curl, CURLOPT_USERAGENT, "libcurl-agent/1.0");
/* send all data to this function */
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
/* we pass our 'chunk' struct to the callback function */
curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&chunk);
/* get it! */
/* always cleanup */
fprintf(file, "%s", chunk.memory);
Any information or tips are appreciated.