This guide assumes that you have already compiled libwww and are ready to use it building an application. Libwww is divided into a set of packages containing various part of functionality. They all have a name starting with WWW - two of them are required to use in all libwww applications, the rest is optional:
The application must explicitly initialize libwww before it can start using it so that the internal file descriptors, and variables can be set to their respective values. This only has to be done once while the application is running and is typically done when the application is started. The application also should close down libwww when it has stopped using it - typically when the application is closing down. Libwww will then return resources like file descriptors and dynamic memory to the operating system.
Note: If you are on Unix and you have installed libwww then you can use the libwww-config script to make linking against libwww easier. In Windows MSVC you have to include the DLLs in your application project.
The sample app above doesn't do anything whatsoever. There are now two ways you can go for intializing the features you need in libwww:
Which method is right for you depends on your application and how much you want to get your feet wet. If you are in doubt then I would recommend using profiles.
Sometimes, profiles are not enough - you may need a combination of features that is not supported by a default profile. In this case, you may be able to take one of the profiles and then edit it to suit your needs. You can also have a look at the sample applications to get a better idea about which profiles can be used for what purposes.
Some operations that are often used is to get or save a document on the Web. There are already several sample applications that do this kind of thing - I recommend that you have a look at the libwww applications and see whether you can not start from there.