- 博客(0)
- 资源 (13)
- 收藏
- 关注
LinuxC https请求 源码 一个函数搞定
一个函数搞定 直接调用
用法如下:
int main()
{
char rsp_buf[2048]={0};
//只发请求 不需要等待回复
https_get_request("ipx.xxx.xxx.xx",NULL,80,"xxxx/xxx.req?aa=21"); //替换成自己需要的HTTP请求
//发请求 不需要等待回复
https_get_request_wait_rsp("ipx.xxx.xxx.xx",NULL,80,"xxxx/xxx.req?aa=21",rsp_buf,sizeof(rsp_buf));
//用域名
https_get_request_wait_rsp(NULL,"www.baidu.com",8080,"xxxx/xxx.req?aa=21",rsp_buf,sizeof(rsp_buf));
https_get_request(NULL,"www.baidu.com",8080,"xxxx/xxx.req?aa=21");
printf("=============>\n");
return 0;
}
2017-03-21
linux下C语言实现FTP上传文件源码200行代码
linux下C语言实现FTP上传文件源码
一个函数搞定FTP上传 直接编译可用
int main()
{
ftp_upload("ipx.xxx.xxx.xxx",21,"username","password","./main.c","upload_name");
return 0;
}
2017-02-24
linux下C语言实现MD5计算源码100行代码
linux下C语言实现MD5计算源码100行代码
int main()
{
char md5_str[40]={0};
get_md5("./main.c",md5_str);
printf("=============>%s\n",md5_str);
return 0;
}
2017-02-24
linux下HTTP的get方法实现源码
//只发请求 不需要等待回复
http_get_request("ipx.xxx.xxx.xx",NULL,80,"xxxx/xxx.req?aa=21"); //替换成自己需要的HTTP请求
//发请求 不需要等待回复
http_get_request_wait_rsp("ipx.xxx.xxx.xx",NULL,80,"xxxx/xxx.req?aa=21",rsp_buf,sizeof(rsp_buf));
//用域名
http_get_request_wait_rsp(NULL,"www.baidu.com",8080,"xxxx/xxx.req?aa=21",rsp_buf,sizeof(rsp_buf));
http_get_request(NULL,"www.baidu.com",8080,"xxxx/xxx.req?aa=21");
2017-02-24
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人