- 博客(5)
- 资源 (1)
- 收藏
- 关注
原创 使用libcurl发送post请求
C语言代码如下:#include #include #include int main(int argc, char *argv[]){ CURL *curl; CURLcode res; struct curl_httppost *post=NULL; struct curl_httppost *last=NULL; struct curl_slist *h
2015-02-12 17:49:37 5102
原创 使用shell脚本编写cgi
非常简单示例1:recv脚本接收http post数据#!/bin/shread bufecho "Content-type:text/html;charset=UTF-8"echoecho $buf使用curl命令进行测试:curl --data "name=abc" http://10.236.5.128/cgi-bin/recv抓包得到http消息如下:
2015-02-11 14:47:50 1327
原创 使用curl命令post数据
curl --data "birthyear=1905&press=%20OK%20" http://www.example.com/when.cgi你发送给服务器端的数据必须是已经被准确地编码了。curl不会自动帮你做此事。例如:如果你想使用包含了空格的数据,你需要使用%20来替换空格等。错误的请求将很可能造成你发送的数据错误,并出现混乱。
2015-02-11 10:27:37 7281
原创 Effective C++笔记
Effective C++改善程序与设计的55个具体做法(第三版)条款01:视C++为一个语言联邦View C++ as a federation of languages.四个次语言:C、Object-Oriented C++、Template C++、STL。条款02:尽量以const,enum,inline替换#definePrefer consts, enums
2015-02-03 17:59:59 411
原创 Python web sever 代码
@import http.serverfrom http.server import SimpleHTTPRequestHandlerfrom http.server import HTTPServerPORT = 8000class VisibleHTTPRequestHandler(SimpleHTTPRequestHandler): def log_requ
2015-02-03 11:37:02 643
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人