没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
/******* http客户端程序 httpclient.c ************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <errno.h>
#include <unistd.h>
#include <netinet/in.h>
#include <limits.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <ctype.h>
//////////////////////////////httpclient.c 开始///////////////////////////////////////////
/********************************************
功能:搜索字符串右边起的第一个匹配字符
********************************************/
char* Rstrchr(char* s, char x)
{
int i = strlen(s);
if(!(*s))
{
return 0;
}
while(s[i-1])
{
if(strchr(s+(i-1), x))
{
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <errno.h>
#include <unistd.h>
#include <netinet/in.h>
#include <limits.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <ctype.h>
//////////////////////////////httpclient.c 开始///////////////////////////////////////////
/********************************************
功能:搜索字符串右边起的第一个匹配字符
********************************************/
char* Rstrchr(char* s, char x)
{
int i = strlen(s);
if(!(*s))
{
return 0;
}
while(s[i-1])
{
if(strchr(s+(i-1), x))
{
return (s+(i-1));
}
else
{
i--;
}
}
return 0;
}
/********************************************
功能:把字符串转换为全小写
********************************************/
void ToLowerCase(char* s)
{
while(*s && *s!='\0' )
{
*s=tolower(*s++);
}
*s = '\0';
}
/**************************************************************
功能:从字符串src中分析出网站地址和端口,并得到用户要下载的文件
***************************************************************/
void GetHost(char* src, char* web, char* file, int* port)
{
char* pA;
char* pB;
memset(web, 0, sizeof(web));
}
else
{
i--;
}
}
return 0;
}
/********************************************
功能:把字符串转换为全小写
********************************************/
void ToLowerCase(char* s)
{
while(*s && *s!='\0' )
{
*s=tolower(*s++);
}
*s = '\0';
}
/**************************************************************
功能:从字符串src中分析出网站地址和端口,并得到用户要下载的文件
***************************************************************/
void GetHost(char* src, char* web, char* file, int* port)
{
char* pA;
char* pB;
memset(web, 0, sizeof(web));
剩余7页未读,继续阅读
lovesky4
- 粉丝: 5
- 资源: 12
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
前往页