|
Open a file from website
Hello,
I'm trying to convert VB code to C++ code.
The VB code accesses a web site and opens the file in memory as follows :-
...
myFile = "https://...<filename>.txt"
Workbooks.Open filename:=myFile
...
My C++ code is as follows :-
...
fstream output;
output.open("https://...<filename.txt>", ios::in);
string temp;
while(getline(output,temp))
{
cout<< "Line: [" << temp << "]\n";
}
output.close();
...
The code works ok with a test file I created.
Can you please advise why I cannot open the file for reading in C++ ?
The file does not have specific permissions on it. In fact, when I enter the full https://... into my IE URL, I can see the file.
I tried putting \ before each / but this didn't help.
I managed to do: -
ShellExecute(NULL, "open", "https://...<filename.txt>",
NULL, NULL, SW_SHOWNORMAL);
But how can I iterate over the file, or even better copy it to my C: drive ?
Many thanks.
<Added>
http://www.webproworld.com/domain-discussion-forum/65469-good-registrar-asia-domain-name-registration-limited.html
http://hi.baidu.com/msdes
|
|
|
|
|
|
|
// |