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();

Recommended Answers

All 3 Replies

Look into pipes in *nix systems.

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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.