summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/examples/cacertinmem.c2
-rw-r--r--docs/examples/certinfo.c2
-rw-r--r--docs/examples/cookie_interface.c2
-rw-r--r--docs/examples/debug.c2
-rw-r--r--docs/examples/ftp-wildcard.c3
-rw-r--r--docs/examples/ftpget.c6
-rw-r--r--docs/examples/ftpgetinfo.c3
-rw-r--r--docs/examples/ftpgetresp.c2
-rw-r--r--docs/examples/ftpupload.c2
-rw-r--r--docs/examples/ftpuploadresume.c11
-rw-r--r--docs/examples/getinfo.c2
-rw-r--r--docs/examples/getinmemory.c2
-rw-r--r--docs/examples/https.c2
-rw-r--r--docs/examples/multi-app.c4
-rw-r--r--docs/examples/multi-debugcallback.c2
-rw-r--r--docs/examples/multi-double.c2
-rw-r--r--docs/examples/multi-post.c3
-rw-r--r--docs/examples/multi-single.c2
-rw-r--r--docs/examples/persistant.c4
-rw-r--r--docs/examples/post-callback.c4
-rw-r--r--docs/examples/postit2.c2
-rw-r--r--docs/examples/sampleconv.c2
-rw-r--r--docs/examples/sendrecv.c4
-rw-r--r--docs/examples/sepheaders.c2
-rw-r--r--docs/examples/simple.c2
-rw-r--r--docs/examples/simplepost.c2
-rw-r--r--docs/examples/threaded-ssl.c8
27 files changed, 41 insertions, 43 deletions
diff --git a/docs/examples/cacertinmem.c b/docs/examples/cacertinmem.c
index fc3c9b110..387029501 100644
--- a/docs/examples/cacertinmem.c
+++ b/docs/examples/cacertinmem.c
@@ -111,7 +111,7 @@ int main(void)
rv=curl_easy_setopt(ch,CURLOPT_WRITEHEADER, stderr);
rv=curl_easy_setopt(ch,CURLOPT_SSLCERTTYPE,"PEM");
rv=curl_easy_setopt(ch,CURLOPT_SSL_VERIFYPEER,1L);
- rv=curl_easy_setopt(ch, CURLOPT_URL, "https://www.cacert.org/");
+ rv=curl_easy_setopt(ch, CURLOPT_URL, "https://www.example.com/");
/* first try: retrieve page without cacerts' certificate -> will fail
*/
diff --git a/docs/examples/certinfo.c b/docs/examples/certinfo.c
index b0e9759f4..ceb0ac2b0 100644
--- a/docs/examples/certinfo.c
+++ b/docs/examples/certinfo.c
@@ -20,7 +20,7 @@ int main(int argc, char **argv)
curl = curl_easy_init();
if(curl) {
- curl_easy_setopt(curl, CURLOPT_URL, "https://www.networking4all.com/");
+ curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/");
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, wrfu);
diff --git a/docs/examples/cookie_interface.c b/docs/examples/cookie_interface.c
index 27bfa3932..9f1e629e1 100644
--- a/docs/examples/cookie_interface.c
+++ b/docs/examples/cookie_interface.c
@@ -53,7 +53,7 @@ main(void)
if (curl) {
char nline[256];
- curl_easy_setopt(curl, CURLOPT_URL, "http://www.google.com/"); /* google.com sets "PREF" cookie */
+ curl_easy_setopt(curl, CURLOPT_URL, "http://www.example.com/");
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(curl, CURLOPT_COOKIEFILE, ""); /* just to start the cookie engine */
res = curl_easy_perform(curl);
diff --git a/docs/examples/debug.c b/docs/examples/debug.c
index d5bf75028..cc6848178 100644
--- a/docs/examples/debug.c
+++ b/docs/examples/debug.c
@@ -118,7 +118,7 @@ int main(void)
/* the DEBUGFUNCTION has no effect until we enable VERBOSE */
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
- curl_easy_setopt(curl, CURLOPT_URL, "curl.haxx.se");
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/");
res = curl_easy_perform(curl);
/* always cleanup */
diff --git a/docs/examples/ftp-wildcard.c b/docs/examples/ftp-wildcard.c
index 732515c7a..0186a38af 100644
--- a/docs/examples/ftp-wildcard.c
+++ b/docs/examples/ftp-wildcard.c
@@ -67,8 +67,7 @@ int main(int argc, char **argv)
if(argc == 2)
curl_easy_setopt(handle, CURLOPT_URL, argv[1]);
else
- curl_easy_setopt(handle, CURLOPT_URL,
- "ftp://curltest.howto.cz:123456@curltest.howto.cz/test/*");
+ curl_easy_setopt(handle, CURLOPT_URL, "ftp://example.com/test/*");
/* and start transfer! */
rc = curl_easy_perform(handle);
diff --git a/docs/examples/ftpget.c b/docs/examples/ftpget.c
index 78727e7ef..3c3888a20 100644
--- a/docs/examples/ftpget.c
+++ b/docs/examples/ftpget.c
@@ -52,12 +52,10 @@ int main(void)
curl = curl_easy_init();
if(curl) {
/*
- * Get curl 7.9.2 from sunet.se's FTP site. curl 7.9.2 is most likely not
- * present there by the time you read this, so you'd better replace the
- * URL with one that works!
+ * You better replace the URL with one that works!
*/
curl_easy_setopt(curl, CURLOPT_URL,
- "ftp://ftp.sunet.se/pub/www/utilities/curl/curl-7.9.2.tar.gz");
+ "ftp://ftp.example.com/pub/www/utilities/curl/curl-7.9.2.tar.gz");
/* Define our callback to get called when there's data to be written */
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_fwrite);
/* Set a pointer to our struct to pass to the callback */
diff --git a/docs/examples/ftpgetinfo.c b/docs/examples/ftpgetinfo.c
index f30974bd1..c4e234f18 100644
--- a/docs/examples/ftpgetinfo.c
+++ b/docs/examples/ftpgetinfo.c
@@ -28,8 +28,7 @@ static size_t throw_away(void *ptr, size_t size, size_t nmemb, void *data)
int main(void)
{
- /* Check for binutils 2.19.1 from ftp.gnu.org's FTP site. */
- char ftpurl[] = "ftp://ftp.gnu.org/gnu/binutils/binutils-2.19.1.tar.bz2";
+ char ftpurl[] = "ftp://ftp.example.com/gnu/binutils/binutils-2.19.1.tar.bz2";
CURL *curl;
CURLcode res;
const time_t filetime;
diff --git a/docs/examples/ftpgetresp.c b/docs/examples/ftpgetresp.c
index 8d837f36f..2122c4f68 100644
--- a/docs/examples/ftpgetresp.c
+++ b/docs/examples/ftpgetresp.c
@@ -43,7 +43,7 @@ int main(int argc, char **argv)
curl = curl_easy_init();
if(curl) {
/* Get a file listing from sunet */
- curl_easy_setopt(curl, CURLOPT_URL, "ftp://ftp.sunet.se/");
+ curl_easy_setopt(curl, CURLOPT_URL, "ftp://ftp.example.com/");
curl_easy_setopt(curl, CURLOPT_WRITEDATA, ftpfile);
/* If you intend to use this on windows with a libcurl DLL, you must use
CURLOPT_WRITEFUNCTION as well */
diff --git a/docs/examples/ftpupload.c b/docs/examples/ftpupload.c
index d553850f0..f1f66c0a1 100644
--- a/docs/examples/ftpupload.c
+++ b/docs/examples/ftpupload.c
@@ -30,7 +30,7 @@
#define LOCAL_FILE "/tmp/uploadthis.txt"
#define UPLOAD_FILE_AS "while-uploading.txt"
-#define REMOTE_URL "ftp://localhost/" UPLOAD_FILE_AS
+#define REMOTE_URL "ftp://example.com/" UPLOAD_FILE_AS
#define RENAME_FILE_TO "renamed-and-fine.txt"
/* NOTE: if you want this example to work on Windows with libcurl as a
diff --git a/docs/examples/ftpuploadresume.c b/docs/examples/ftpuploadresume.c
index 3dda06781..81a790a11 100644
--- a/docs/examples/ftpuploadresume.c
+++ b/docs/examples/ftpuploadresume.c
@@ -32,7 +32,8 @@ int __cdecl _snscanf(const char * input, size_t length, const char * format, ...
/* parse headers for Content-Length */
-size_t getcontentlengthfunc(void *ptr, size_t size, size_t nmemb, void *stream) {
+size_t getcontentlengthfunc(void *ptr, size_t size, size_t nmemb, void *stream)
+{
int r;
long len = 0;
@@ -46,7 +47,8 @@ size_t getcontentlengthfunc(void *ptr, size_t size, size_t nmemb, void *stream)
}
/* discard downloaded data */
-size_t discardfunc(void *ptr, size_t size, size_t nmemb, void *stream) {
+size_t discardfunc(void *ptr, size_t size, size_t nmemb, void *stream)
+{
return size * nmemb;
}
@@ -143,13 +145,14 @@ int upload(CURL *curlhandle, const char * remotepath, const char * localpath,
}
}
-int main(int c, char **argv) {
+int main(int c, char **argv)
+{
CURL *curlhandle = NULL;
curl_global_init(CURL_GLOBAL_ALL);
curlhandle = curl_easy_init();
- upload(curlhandle, "ftp://user:pass@host/path/file", "C:\\file", 0, 3);
+ upload(curlhandle, "ftp://user:pass@example.com/path/file", "C:\\file", 0, 3);
curl_easy_cleanup(curlhandle);
curl_global_cleanup();
diff --git a/docs/examples/getinfo.c b/docs/examples/getinfo.c
index a9630191f..0d8f1f2e9 100644
--- a/docs/examples/getinfo.c
+++ b/docs/examples/getinfo.c
@@ -19,7 +19,7 @@ int main(void)
curl = curl_easy_init();
if(curl) {
/* http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTURL */
- curl_easy_setopt(curl, CURLOPT_URL, "curl.haxx.se");
+ curl_easy_setopt(curl, CURLOPT_URL, "http://www.example.com/");
/* http://curl.haxx.se/libcurl/c/curl_easy_perform.html */
res = curl_easy_perform(curl);
diff --git a/docs/examples/getinmemory.c b/docs/examples/getinmemory.c
index 2e34f1787..635a936ba 100644
--- a/docs/examples/getinmemory.c
+++ b/docs/examples/getinmemory.c
@@ -58,7 +58,7 @@ int main(int argc, char **argv)
curl_handle = curl_easy_init();
/* specify URL to get */
- curl_easy_setopt(curl_handle, CURLOPT_URL, "http://cool.haxx.se/");
+ curl_easy_setopt(curl_handle, CURLOPT_URL, "http://www.example.com/");
/* send all data to this function */
curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
diff --git a/docs/examples/https.c b/docs/examples/https.c
index 29b50be3b..10b5c657f 100644
--- a/docs/examples/https.c
+++ b/docs/examples/https.c
@@ -17,7 +17,7 @@ int main(void)
curl = curl_easy_init();
if(curl) {
- curl_easy_setopt(curl, CURLOPT_URL, "https://sourceforge.net/");
+ curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
#ifdef SKIP_PEER_VERIFICATION
/*
diff --git a/docs/examples/multi-app.c b/docs/examples/multi-app.c
index a5e85c42f..09b91b720 100644
--- a/docs/examples/multi-app.c
+++ b/docs/examples/multi-app.c
@@ -43,9 +43,9 @@ int main(int argc, char **argv)
handles[i] = curl_easy_init();
/* set the options (I left out a few, you'll get the point anyway) */
- curl_easy_setopt(handles[HTTP_HANDLE], CURLOPT_URL, "http://website.com");
+ curl_easy_setopt(handles[HTTP_HANDLE], CURLOPT_URL, "http://example.com");
- curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_URL, "ftp://ftpsite.com");
+ curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_URL, "ftp://example.com");
curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_UPLOAD, 1L);
/* init a multi stack */
diff --git a/docs/examples/multi-debugcallback.c b/docs/examples/multi-debugcallback.c
index 6d647e66e..529c3d9bb 100644
--- a/docs/examples/multi-debugcallback.c
+++ b/docs/examples/multi-debugcallback.c
@@ -118,7 +118,7 @@ int main(int argc, char **argv)
http_handle = curl_easy_init();
/* set the options (I left out a few, you'll get the point anyway) */
- curl_easy_setopt(http_handle, CURLOPT_URL, "http://www.haxx.se/");
+ curl_easy_setopt(http_handle, CURLOPT_URL, "http://www.example.com/");
curl_easy_setopt(http_handle, CURLOPT_DEBUGFUNCTION, my_trace);
curl_easy_setopt(http_handle, CURLOPT_VERBOSE, 1L);
diff --git a/docs/examples/multi-double.c b/docs/examples/multi-double.c
index 702f9ae3d..3ea106bf7 100644
--- a/docs/examples/multi-double.c
+++ b/docs/examples/multi-double.c
@@ -34,7 +34,7 @@ int main(int argc, char **argv)
http_handle2 = curl_easy_init();
/* set options */
- curl_easy_setopt(http_handle, CURLOPT_URL, "http://www.haxx.se/");
+ curl_easy_setopt(http_handle, CURLOPT_URL, "http://www.example.com/");
/* set options */
curl_easy_setopt(http_handle2, CURLOPT_URL, "http://localhost/");
diff --git a/docs/examples/multi-post.c b/docs/examples/multi-post.c
index 8ab4bb904..d2daf70a6 100644
--- a/docs/examples/multi-post.c
+++ b/docs/examples/multi-post.c
@@ -58,8 +58,7 @@ int main(int argc, char *argv[])
if(curl && multi_handle) {
/* what URL that receives this POST */
- curl_easy_setopt(curl, CURLOPT_URL,
- "http://www.fillinyoururl.com/upload.cgi");
+ curl_easy_setopt(curl, CURLOPT_URL, "http://www.example.com/upload.cgi");
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
diff --git a/docs/examples/multi-single.c b/docs/examples/multi-single.c
index fdcb5d8a8..f248afe76 100644
--- a/docs/examples/multi-single.c
+++ b/docs/examples/multi-single.c
@@ -32,7 +32,7 @@ int main(int argc, char **argv)
http_handle = curl_easy_init();
/* set the options (I left out a few, you'll get the point anyway) */
- curl_easy_setopt(http_handle, CURLOPT_URL, "http://www.haxx.se/");
+ curl_easy_setopt(http_handle, CURLOPT_URL, "http://www.example.com/");
/* init a multi stack */
multi_handle = curl_multi_init();
diff --git a/docs/examples/persistant.c b/docs/examples/persistant.c
index 0e65dd8fb..177ada359 100644
--- a/docs/examples/persistant.c
+++ b/docs/examples/persistant.c
@@ -24,12 +24,12 @@ int main(int argc, char **argv)
curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
/* get the first document */
- curl_easy_setopt(curl, CURLOPT_URL, "http://curl.haxx.se/");
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/");
res = curl_easy_perform(curl);
/* get another document from the same server using the same
connection */
- curl_easy_setopt(curl, CURLOPT_URL, "http://curl.haxx.se/docs/");
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/docs/");
res = curl_easy_perform(curl);
/* always cleanup */
diff --git a/docs/examples/post-callback.c b/docs/examples/post-callback.c
index 1e688a1c8..ae4f4db98 100644
--- a/docs/examples/post-callback.c
+++ b/docs/examples/post-callback.c
@@ -51,8 +51,8 @@ int main(void)
curl = curl_easy_init();
if(curl) {
/* First set the URL that is about to receive our POST. */
- curl_easy_setopt(curl, CURLOPT_URL,
- "http://receivingsite.com.pooh/index.cgi");
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/index.cgi");
+
/* Now specify we want to POST data */
curl_easy_setopt(curl, CURLOPT_POST, 1L);
diff --git a/docs/examples/postit2.c b/docs/examples/postit2.c
index 7268fcbbc..a6292c5f1 100644
--- a/docs/examples/postit2.c
+++ b/docs/examples/postit2.c
@@ -67,7 +67,7 @@ int main(int argc, char *argv[])
headerlist = curl_slist_append(headerlist, buf);
if(curl) {
/* what URL that receives this POST */
- curl_easy_setopt(curl, CURLOPT_URL, "http://curl.haxx.se/examplepost.cgi");
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/examplepost.cgi");
if ( (argc == 2) && (!strcmp(argv[1], "noexpectheader")) )
/* only disable 100-continue header if explicitly requested */
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
diff --git a/docs/examples/sampleconv.c b/docs/examples/sampleconv.c
index 3a31a60b4..ed458516d 100644
--- a/docs/examples/sampleconv.c
+++ b/docs/examples/sampleconv.c
@@ -75,7 +75,7 @@ int main(void)
curl = curl_easy_init();
if(curl) {
- curl_easy_setopt(curl, CURLOPT_URL, "curl.haxx.se");
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
/* use platform-specific functions for codeset conversions */
curl_easy_setopt(curl, CURLOPT_CONV_FROM_NETWORK_FUNCTION,
diff --git a/docs/examples/sendrecv.c b/docs/examples/sendrecv.c
index 6cba1dbcf..ad5ddd115 100644
--- a/docs/examples/sendrecv.c
+++ b/docs/examples/sendrecv.c
@@ -48,13 +48,13 @@ int main(void)
CURL *curl;
CURLcode res;
/* Minimalistic http request */
- const char *request = "GET / HTTP/1.0\r\nHost: curl.haxx.se\r\n\r\n";
+ const char *request = "GET / HTTP/1.0\r\nHost: example.com\r\n\r\n";
int sockfd; /* socket */
size_t iolen;
curl = curl_easy_init();
if(curl) {
- curl_easy_setopt(curl, CURLOPT_URL, "curl.haxx.se");
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
/* Do not do the transfer - only connect to host */
curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L);
res = curl_easy_perform(curl);
diff --git a/docs/examples/sepheaders.c b/docs/examples/sepheaders.c
index f2a659d1d..e0c4cbbb7 100644
--- a/docs/examples/sepheaders.c
+++ b/docs/examples/sepheaders.c
@@ -35,7 +35,7 @@ int main(int argc, char **argv)
curl_handle = curl_easy_init();
/* set URL to get */
- curl_easy_setopt(curl_handle, CURLOPT_URL, "http://curl.haxx.se");
+ curl_easy_setopt(curl_handle, CURLOPT_URL, "http://example.com");
/* no progress meter please */
curl_easy_setopt(curl_handle, CURLOPT_NOPROGRESS, 1L);
diff --git a/docs/examples/simple.c b/docs/examples/simple.c
index 582c62426..351cf729b 100644
--- a/docs/examples/simple.c
+++ b/docs/examples/simple.c
@@ -17,7 +17,7 @@ int main(void)
curl = curl_easy_init();
if(curl) {
- curl_easy_setopt(curl, CURLOPT_URL, "curl.haxx.se");
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
res = curl_easy_perform(curl);
/* always cleanup */
diff --git a/docs/examples/simplepost.c b/docs/examples/simplepost.c
index d68435baf..b8e61e07d 100644
--- a/docs/examples/simplepost.c
+++ b/docs/examples/simplepost.c
@@ -20,7 +20,7 @@ int main(void)
curl = curl_easy_init();
if(curl) {
- curl_easy_setopt(curl, CURLOPT_URL, "http://posthere.com");
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postthis);
/* if we don't provide POSTFIELDSIZE, libcurl will strlen() by
diff --git a/docs/examples/threaded-ssl.c b/docs/examples/threaded-ssl.c
index 438ddaa03..284edc419 100644
--- a/docs/examples/threaded-ssl.c
+++ b/docs/examples/threaded-ssl.c
@@ -91,10 +91,10 @@ void init_locks(void)
/* List of URLs to fetch.*/
const char * const urls[]= {
- "https://www.sf.net/",
- "https://www.openssl.org/",
- "https://www.sf.net/",
- "https://www.openssl.org/",
+ "https://www.example.com/",
+ "https://www2.example.com/",
+ "https://www3.example.com/",
+ "https://www4.example.com/",
};
static void *pull_one_url(void *url)