当前位置: 技术问答>linux和unix
通过socket和asp打交道
来源: 互联网 发布时间:2015-11-26
本文导语: 我想写一个client程序,通过socket向一个asp页面myresponse.asp发送一个字符串asbddddsss,再由myresponse.asp向client反射回asbddddsss。 我的client在与服务器建立连接后发送这样一个字符串POST /myresponse.asp HTTP/1.0rn User-Agent: myselfHttp...
我想写一个client程序,通过socket向一个asp页面myresponse.asp发送一个字符串asbddddsss,再由myresponse.asp向client反射回asbddddsss。
我的client在与服务器建立连接后发送这样一个字符串POST /myresponse.asp HTTP/1.0rn User-Agent: myselfHttp/1.0rnAccept: www/source;text/html;image/gif;*/*rn Content-type: application/x-www-form-urlencodedrn Content-length:1224rn asbddddsss rnrn
myresponse.asp里应该如何写从而实现我要的功能
我的client在与服务器建立连接后发送这样一个字符串POST /myresponse.asp HTTP/1.0rn User-Agent: myselfHttp/1.0rnAccept: www/source;text/html;image/gif;*/*rn Content-type: application/x-www-form-urlencodedrn Content-length:1224rn asbddddsss rnrn
myresponse.asp里应该如何写从而实现我要的功能
|
myresponse.asp就跟普通asp程序一样返回数据,就是简单的write一下,也就是返回一个正常的HTML页面,关键是你的client要去通过http协议解析这个结果。
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。