phpmysql网站开发全程实例个人做民宿需要建立网站吗
news/
2025/9/23 8:47:09/
文章来源:
phpmysql网站开发全程实例,个人做民宿需要建立网站吗,seo关键词排名优化怎么做,烟台网站制作计划Windows系统下源代码下载编译、安装方式如下#xff1a; https://blog.csdn.net/fxbjye/article/details/89152849 编译后得到库文件#xff0c;把这两个文件复制到项目文件中#xff0c; 修改项目文件的属性#xff0c; 修改附加依赖项#xff1a; 输入代码#xff1…Windows系统下源代码下载编译、安装方式如下 https://blog.csdn.net/fxbjye/article/details/89152849 编译后得到库文件把这两个文件复制到项目文件中 修改项目文件的属性 修改附加依赖项 输入代码
#include stdio.h
#include string.h
#include curl.h #define MAX_BUF 65536 char wr_buf[MAX_BUF 1];
int wr_index;/*
* Write data callback function (called within the context of
* curl_easy_perform.
*/
size_t write_data(void *buffer, size_t size, size_t nmemb, void *userp)
{int segsize size * nmemb;/* Check to see if this data exceeds the size of our buffer. If so,* set the user-defined context value and return 0 to indicate a* problem to curl.*/if (wr_index segsize MAX_BUF) {*(int *)userp 1;return 0;}/* Copy the data from the curl buffer into our buffer */memcpy((void *)wr_buf[wr_index], buffer, (size_t)segsize);/* Update the write index */wr_index segsize;/* Null terminate the buffer */wr_buf[wr_index] 0;/* Return the number of bytes received, indicating to curl that all is okay */return segsize;
}/*
* Simple curl application to read the index.html file from a Web site.
*/
int main(void)
{CURL *curl;CURLcode ret;int wr_error;wr_error 0;wr_index 0;/* First step, init curl */curl curl_easy_init();if (!curl) {printf(couldnt init curl\n);return 0;}/* Tell curl the URL of the file were going to retrieve */curl_easy_setopt(curl, CURLOPT_URL, www.baidu.com);/* Tell curl that well receive data to the function write_data, and* also provide it with a context pointer for our error return.*/curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)wr_error);curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data);/* Allow curl to perform the action */ret curl_easy_perform(curl);printf(ret %d (write_error %d)\n, ret, wr_error);/* Emit the page if curl indicates that no errors occurred */if (ret 0) printf(%s\n, wr_buf);curl_easy_cleanup(curl);return 0;
}输出结果为
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/911945.shtml
如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!