libcurl example
本专栏主要是亲手测试libcurl最新版本example代码在ubuntu2020.04系统gcc9.2版本下验证,IDE为Qt Creator
楼兰公子
这个作者很懒,什么都没留下…
展开
-
libcurl_debug
#ifndef LIBCURL_DEBUG_HPP#define LIBCURL_DEBUG_HPP#include <stdio.h>#include <curl/curl.h>struct data { char trace_ascii; /* 1 or 0 */};staticvoid dump(const char *text, FILE *stream, unsigned char *ptr, size_t size, .原创 2020-06-10 20:35:37 · 719 阅读 · 0 评论 -
libcurl_authzid-example
#ifndef LIBCURL_AUTHZID_HPP#define LIBCURL_AUTHZID_HPP/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * .原创 2020-06-10 20:32:15 · 217 阅读 · 0 评论 -
Nginx服务器HTTP2的搭建
1.下载NGINX源码,下载并编译./configure --with-http_ssl_module --prefix=/home/damon/dev/3rd/sdk/x86/local_server/nginx --with-http_ssl_module --with-http_v2_module --with-debugmake install配置https server server { listen [::]:443 ssl http2 ipv6o...原创 2020-06-10 19:45:14 · 308 阅读 · 2 评论 -
libcurl_example-curlx
#ifndef LIBCURL_CURLX_HPP#define LIBCURL_CURLX_HPP#include<stdlib.h>#include<stdio.h>#include<string.h>#include"curl/curl.h"#include"openssl/x509v3.h"#include"openssl/x509_vfy.h"#include"openssl/crypto.h"#include"openssl/lhash..原创 2020-06-08 20:06:49 · 386 阅读 · 0 评论 -
libcurl-crawer
#ifndef LIBCURL_CRAWLER_HPP#define LIBCURL_CRAWLER_HPPint max_con = 200;int max_total = 20000;int max_requests = 500;int max_link_per_page = 5;int follow_relative_links = 0;char *start_page = "https://www.reuters.com";#include"libxml/HTMLparser..原创 2020-06-08 15:46:08 · 211 阅读 · 0 评论 -
libcurl-cookie_interface
#ifndef LIBCURL_COOKIE_INTERFACE_HPP#define LIBCURL_COOKIE_INTERFACE_HPP#include <stdio.h>#include <stdlib.h>#include <string.h>#include <time.h>#include <curl/curl.h>static void print_cookie(CURL* pCurl){ CURLco.原创 2020-06-08 14:25:12 · 2175 阅读 · 0 评论 -
libcurl_certinfo
#ifndef LIBCURL_CERTIINFO_HPP#define LIBCURL_CERTIINFO_HPP#include<stdio.h>#include<curl/curl.h>static size_t wrfun(void *ptr,size_t size,size_t nmemb,void *stream){ (void)stream; (void)ptr; return size*nmemb;}int test_cert.原创 2020-06-05 20:43:41 · 675 阅读 · 0 评论 -
libcurl_cacertinmem.hpp
#ifndef LIBCURL_CACERTINMEM_HPP#define LIBCURL_CACERTINMEM_HPP#include<openssl/err.h>#include<openssl/ssl.h>#include<curl/curl.h>#include<stdio.h>static size_t writefunction(void* ptr,size_t size,size_t nmemb,void *stream).原创 2020-06-05 20:21:43 · 820 阅读 · 0 评论 -
libcurl_anyauthput
#ifndef LIBCURL_ANYAUTHPUT_HPP#define LIBCURL_ANYAUTHPUT_HPP#include<stdio.h>#include<stdlib.h>#include<curl/curl.h>#include<fcntl.h>#include<sys/types.h>#include<sys/stat.h>#include<unistd.h>#define REA.原创 2020-06-05 17:50:58 · 179 阅读 · 0 评论 -
libcurl_altsvc
#ifndef LIBCURL_ALTSVC_HPP#define LIBCURL_ALTSVC_HPP#include<stdio.h>#include<curl/curl.h>int test_altsvc(){ CURL *pCurl; CURLcode res ; pCurl = curl_easy_init(); if(pCurl){ curl_easy_setopt(pCurl,CURLOPT_URL,"htt.原创 2020-11-03 12:28:49 · 267 阅读 · 0 评论 -
libcurl-rtsp-example
#include <iostream>#include<stdio.h>#include<stdlib.h>#include<string.h>#include<termio.h>#include<termios.h>#include<unistd.h>#include<curl/curl.h>using namespace std;static int _get_char(void.原创 2020-06-01 21:01:59 · 883 阅读 · 0 评论 -
libcurl-example---10 at a time
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * ...原创 2020-04-15 13:36:30 · 261 阅读 · 0 评论