I need to know how to save a webpage using C++ on a Windows and/or Linux.
Step 1) This is my current code that opens the webpage:
ShellExecute(NULL, "open", websiteURL, NULL, NULL, SW_SHOWNORMAL);
Step 2) This is the step where I will save the webpage that is opened as a .txt
Your help here.
Step 3) This is my attempt at closing the webpage after saving it as a .txt; However, it does not work currently.
ShellExecute(NULL, "close", websiteURL, NULL, NULL, SW_SHOWNORMAL);
This is Windows version. Note, the Windows functions are Unicode UTF-16, but the output file could be ANSI or UTF-8.