0

Hi,

First of all, i am not trying to hack into anything or anyones e mails.

I am new software engineer and I need to log into company wiki page & download info displayed into a text file or something, so i can search for data i am looking for and make dessions based on what i learned from the wiki page. I do have a user name and password for the wiki page and no need for breaking in.

Issue is, I can not figure out a good way to do this. I am using C++ and operating system is Linux.

Here is what I have so far. This does not issue the uer name and password. Can someone please tell me how to issue usename and password ?

 string line;
 system("wget www.cooperateweb.com/wikipage/productpage/FWversions+date");

 ifstream file ("index.html");

 while (!file.eof())
 {
   getline(file,line);
   cout<<line<<"\n";
 }
 file.close();
4
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by rubberman
0

Also, if you are familiar with Perl you can use the WWW::Mehcanize or the Firefox::WWW::Mechanize library which is specifically suited to working with webpages. If a perl solution is acceptable I could give a few pointers.
-FH

0

Actually, your code should be:

while (file.good() && !file.eof())
{
    char buffer[MAX_LINE_SIZE + 1];
    file.getline(buffer, MAX_LINE_SIZE);
}

The signature for getline is this:

istream& getline (char* s, streamsize n );

There may be other issues, but this stood out.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.