Andrei0427
Andrei0427

Reputation: 573

Programming with wget and saving file into memory

I am programming in C and require that I downloaded a webpage. I am currently using wget to download, although I wish to save the file in memory and allocate a pointer to it in order to read the file downloaded.

In it's current state my application uses popen(/usr/bin/wget http://www.website.com, "w");
I then allocate a FILE *file = fopen("index.html", "rt");

Is this possible with wget? and if not, are they are alternatives?

Upvotes: 1

Views: 1025

Answers (1)

kmkaplan
kmkaplan

Reputation: 18960

As an API you will be better served by libcurl. Start with the easy interface to begin with.

Upvotes: 3

Related Questions