📄 proxy源代码分析 谈linux网络编程技术(1)_梦里香巴拉的空间.htm
字号:
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = '/sys/search?type=8&word=%5B%D7%AA%5DProxy%D4%B4%B4%FA%C2%EB%B7%D6%CE%F6%20%CC%B8Linux%CD%F8%C2%E7%B1%E0%B3%CC%BC%BC%CA%F5%281%29&item=6441782c84d571ed8a1399fb&t=' + new Date().getTime();
document.getElementsByTagName('HEAD')[0].appendChild(script);
}else if(RelatedDocData == null){
GetAndEval = true;
}else{
eval(RelatedDocData);
}
/*]]>*/
</SCRIPT>
<DIV id=in_reader>
<DIV class=tit>最近读者:</DIV>
<SCRIPT>
var g_spAnnony=true;
var g_read=[
{}
];
g_read.length=g_read.length-1;
var _rh1="";
var _rh2="";
function wrreader(){
_rh1 += '<table width="100%" ><tr>';
_rh2+='<tr>';
if(g_spAnnony){
_rh1+='<td align="center" width="10%" ><img border="0" width="55" height="55" src="http://img.baidu.com/hi/img/portraitn.jpg"></td>';
_rh2+='<td> </td>';
if(g_read.length>0){
_rh1+='<td align="left" width="12%">';
}else{
_rh1+='<td align="left" width="100%">';
}
_rh1+='<a href="https://passport.baidu.com/?login&tpl=sp&tpl_reg=sp&u='+myref+'" target="_self">登录</a>后,您就出现在这里。</td>';
_rh2+='<td> </td>'
}
if(g_read.length==0){
if(!g_spAnnony){
_rh1+='<td align=left width="100%">最近还没有登录用户看过这篇文章……</td>';
_rh2+='<td> </td>';
}
}else{
for(i=0,len=g_read.length;i<len;i++){
_rh1+='<td align="center" valign="bottom" width="10%" class="user"><a href="/'+g_read[i][0]+'" target="_blank"><img border="0" src="http://himg.baidu.com/sys/portraitn/item/'+g_read[i][1]+'.jpg"></a></td>';
_rh2+='<td align="center" valign="top" class="user"><a href="/'+g_read[i][0]+'" target="_blank">'+g_read[i][2]+'</a></td>';
}
}
_rh1+='<td width="100%"></td></tr>';
_rh2+='<td></td></tr></table>';
document.write(_rh1+_rh2);
}
wrreader();
</SCRIPT>
</DIV>
<DIV class=line></DIV>
<SCRIPT language=JavaScript>
allkey=allkey+"2e9c54ecc27519d12e2e2141_6441782c84d571ed8a1399fb_";
</SCRIPT>
<DIV id=in_comment><A name=comment></A>
<DIV class=tit>网友评论:</DIV>
<SCRIPT>
function writecmt(type,id,cmtname,cmturl,portraitId){
var html1="";
cmturl=cmturl.replace("https://","http://");
if(type==1){
html1="<a href='"+cmturl+"' target='_blank' title='"+cmturl+"'><img border='0' src='http://himg.baidu.com/sys/portraitn/item/"+portraitId+".jpg'><br>"+cmtname+"</a>";
}else{
if(cmtname=="" || cmtname=="匿名网友"){
if(cmturl==""){
html1="<a>匿名网友</a>";
}else{
html1="<a href='"+cmturl+"' target='_blank' title='"+cmturl+"'>"+cmtname+"</a>";
}
}else{
if(cmturl==""){
html1="<div class='f14' style='display:inline'>网友:<a>"+cmtname+"</a></div>";
}else{
html1="<div class='f14' style='display:inline'>网友:<a href='"+cmturl+"' target='_blank' title='"+cmturl+"'>"+cmtname+"</a></div>";
}
}
}
document.write(html1);
}
function filterCmtContent(n){
if(!BdBrowser.isIE){
var defaultfilter1='<span style="filter:glow(color=#000000,strength=2);height:0px;color:#000000">';
var defaultfilter2='<span style="height: 0px; color: rgb(0, 0, 0);">';
var commentDiv=document.getElementById(n);
var divs=commentDiv.getElementsByTagName('div');
var d,tmp;
for( var i=0,len=divs.length;i<len;i++){
d=divs[i];
if(d.getAttribute('name')=='cmtcontent'){
tmp=d.innerHTML;
tmp=tmp.replace(/<span style="filter:glow\(color=#([0-9a-z]{3,6}),strength=2\);height:0px;color:#([0-9a-z]{3,6})">/ig,defaultfilter1);
tmp=tmp.replace('<span style="height: 0px; color: rgb(255, 255, 255);">',defaultfilter2);
d.innerHTML=tmp;
}
}
}
}
</SCRIPT>
<DIV id=page></DIV></DIV>
<SCRIPT>filterCmtContent('in_comment');</SCRIPT>
<DIV id=in_send><A name=send></A>
<FORM id=popFormSubmit name=form1 onsubmit="return checkcmtform()"
action=/%C3%CE%C0%EF%CF%E3%B0%CD%C0%AD/commit method=post><INPUT type=hidden
value=8 name=ct> <INPUT type=hidden value=1 name=cm> <INPUT type=hidden
value=6441782c84d571ed8a1399fb name=spBlogID> <INPUT id=spRefURL type=hidden
name=spRefURL>
<SCRIPT>
document.getElementById("spRefURL").value = window.location.href;
</SCRIPT>
<DIV class=tit>发表评论:</DIV>
<TABLE cellSpacing=5 cellPadding=0 width=620 border=0>
<TBODY>
<TR>
<TD class=f14>姓 名:</TD>
<TD><INPUT id=spBlogCmtor style="WIDTH: 220px" onfocus=hidErr(1);
maxLength=49 onchange="checkname('spBlogCmtor')" name=spBlogCmtor>
<SCRIPT>
document.write(" <a href='http://hi.baidu.com/st/reg.html' target='_blank'>注册</a>");
document.write(' | <a href="https://passport.baidu.com/?login&tpl=sp&tpl_reg=sp&u='+myref+'">登录</a>');
</SCRIPT>
<DIV id=nmerror style="DISPLAY: none">*姓名最长为50字节</DIV></TD></TR>
<TR id=1_err style="DISPLAY: none">
<TD> </TD>
<TD>
<DIV class=error id=1_err_con></DIV></TD></TR>
<TR>
<TD class=f14>网址或邮箱:</TD>
<TD><INPUT id=spBlogCmtURL style="WIDTH: 360px" onfocus=hidErr(2);
maxLength=128 onchange="checkeandu('spBlogCmtURL')" name=spBlogCmtURL>
(选填)</TD>
<SCRIPT>
G("spBlogCmtor").value="";
G("spBlogCmtURL").value="";
</SCRIPT>
</TR>
<TR id=2_err style="DISPLAY: none">
<TD> </TD>
<TD>
<DIV class=error id=2_err_con></DIV></TD></TR>
<TR>
<TD class=f14 id=reTitle vAlign=top>内 容:</TD>
<TD><TEXTAREA id=spBlogCmtText style="WIDTH: 520px; HEIGHT: 155px" onfocus=hidErr(3); name=spBlogCmtText></TEXTAREA>
<SCRIPT>
var editor=null;
try{
editor=new BdEditor("spBlogCmtText",{width:"100%",height:"155px"});
editor.onfocus = function(){hidErr(3);}
editor.render();
}catch(e){
var spBlogCmtText = document.getElementById("spBlogCmtText");
var p = spBlogCmtText.previousSibling;
while(p && p.nodeType != 1) p = p.previousSibling;
if(p && /bdeditor_container/.test(p.id)){
p.parentNode.removeChild(p);
}
spBlogCmtText.style.display = '';
editor=null;
}
</SCRIPT>
<SCRIPT>
G("spBlogCmtor").value=G("spBlogCmtor").defaultValue;
G("spBlogCmtText").value="";
</SCRIPT>
</TD></TR>
<TR id=3_err style="DISPLAY: none">
<TD> </TD>
<TD>
<DIV class=error id=3_err_con></DIV></TD></TR>
<TR id=vercode>
<TD class=f14 vAlign=top>验证码:</TD>
<TD vAlign=top><INPUT type=hidden name=spVcode> <INPUT id=spVerifyKey
onfocus=f_focus() tabIndex=4 maxLength=4 size=6 name=spVerifyKey
autocomplete="off"> 请点击后输入四位验证码,字母不区分大小写<BR>
<SCRIPT type=text/javascript>
/*<![CDATA[*/
function f_focus(){ getVcode();}function getVcode(){ var url="http://hi.baidu.com/sys/file/getvcode?echoback=getVcodeDone&t="+(new Date().getTime()); BdAjax.loadJS(url)}function getVcodeDone(vcode){ document.form1.spVcode.value=vcode; var imgsrc="http://hiup.baidu.com/cgi-bin/genimg?"+vcode; G('verifypic').src=imgsrc; G('yanzheng').style.display="block";}function newverifypic(){ getVcode(); return false;}
/*]]>*/
</SCRIPT>
<DIV id=yanzheng style="DISPLAY: none"><IMG id=verifypic height=40
width=120><WBR><A title=看不清左边的字符 onfocus=this.blur();
onclick="return newverifypic();"
href="http://hi.baidu.com/&Atil
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -