Archived Forum Post

Index of archived forum posts

Question:

Does Chilkat Spider codes works on Windows XP? C++

Mar 24 '13 at 22:31
#include <CkSpider.h>

void ChilkatSample(void) { // The Chilkat Spider component/library is free. CkSpider spider;

//  The spider object crawls a single web site at a time.  As you'll see
//  in later examples, you can collect outbound links and use them to
//  crawl the web.  For now, we'll simply spider 10 pages of chilkatsoft.com
spider.Initialize("www.chilkatsoft.com");

//  Add the 1st URL:
spider.AddUnspidered("http://www.chilkatsoft.com/");

//  Begin crawling the site by calling CrawlNext repeatedly.
long i;
for (i = 0; i <= 9; i++) {
    bool success;
    success = spider.CrawlNext();
    if (success == true) {
        //  Show the URL of the page just spidered.
        printf("%s\n",spider.lastUrl());
        //  The HTML is available in the LastHtml property
    }
    else {
        //  Did we get an error or are there no more URLs to crawl?
        if (spider.get_NumUnspidered() == 0) {
            printf("No more URLs to spider\n");
        }
        else {
            printf("%s\n",spider.lastErrorText());
        }

    }

    //  Sleep 1 second before spidering the next URL.
    spider.SleepMs(1000);
}

}

Need help ~ can somebody confirm this codes works on Windows XP. If it doesn't, is there a way to make it? If you could provide a working code that would be excellent.


Answer

Do you get a compile error? What is the output when you run the program?


Answer

Well gonna say that it works on linux with minor correction. On windows (tried on windows XP) seems to be a bit hard to get it working (still not working for me), so I'll put a pause on it.

Anyone that can help, just post a working (on windows plaform) codes here ^^