Created
September 18, 2012 07:58
-
-
Save azat/3741897 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // url | |
| fwrite(currentThread->task.url, strlen(currentThread->task.url), 1, f); | |
| fwrite("\n", 1, 1, f); | |
| // IP | |
| curl_easy_getinfo(curlPage.pcHandle, CURLINFO_PRIMARY_IP, &buffer); | |
| if (!buffer) { | |
| vFprintf("Thread %i: '%s' malformed IP\n", currentThread->thread.internalId, currentThread->task.url); | |
| } else { | |
| fwrite(buffer, strlen(buffer), 1, f); | |
| fwrite("\n", 1, 1, f); | |
| } | |
| // timestamp (TODO: we don't need this, if we crawl only, because we have mtime) | |
| ull2str(strULL, time(NULL)); | |
| fwrite(strULL, strlen(strULL), 1, f); | |
| fwrite("\n\n", 2, 1, f); | |
| fwrite(curlPage.pcContainer, strlen(curlPage.pcContainer), 1, f); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment