1、Google桌面搜索应用于网站:指(网站)局域网内任一IP均可访问某一Google桌面搜索
2、方案:在安装“Google桌面搜索”的服务器上建置一网站,通过Aspx访问该机的本机Google桌面搜索
     通过增加一些页面, 已实现了目标
3、将Google桌面搜索应用于MSDN--如下图所示
   a.完成上述方案的构想-----------2005年5月份
   b.安装Hxs插件:Copy MSDN到安装Google桌面搜索的服务器上,服务器不要求安装MSDN
   c.增加一些代码:转换“ttgds://1//E:/MSDN/cpref.hxs//0///html/...”为“ms-help://MS.MSDNQTR.2003FEB.2052/...<要求客户端要安装MSDN>”
4、目前已将日常经常的电子书、个人文档等放入该服务器,方便使用Google丰富的查询指令
5、代理访问本机Google桌面搜索的代码
 1
string    html=string.Empty,strQuery; 
2
            HttpWebRequest    wr;
3
            if(cbolIsVersion==false)
4
            {
5
                strQuery=cstrHostName+@"search&s=PSBlY4LJF1ElvSEXmgPwZsl1VQ8?"+cstrquery;
6
            }
7
            else
8
            {
9
                if(cstrquery.IndexOf(cstrHostName)==-1)
10
                    strQuery=cstrHostName+@"versions?"+cstrquery;
11
                else
12
                    strQuery=cstrquery;
13
            }
14
            html="Google桌面搜索未正常启动出错,请稍后再试或请联系应用程序提供商";
15
            try
16
            {
17
                wr=(HttpWebRequest)WebRequest.Create(strQuery);
18
                //            wr=(HttpWebRequest)WebRequest.Create(@"http://127.0.0.1:4664/search&s=PSBlY4LJF1ElvSEXmgPwZsl1VQ8?q="+strq );
19
                wr.UserAgent =    "Mozilla/6.0 (MSIE 6.0; Windows NT 5.1; Natas.Robot)";
20
                HttpWebResponse hr=(HttpWebResponse)(wr.GetResponse());
21
                using(StreamReader sr=new StreamReader(hr.GetResponseStream() ))
22
                {
23
                    html=sr.ReadToEnd();
24
                    sr.Close();
25
                }
26
            }
27
            catch
28
            {}
29
            return html;
string    html=string.Empty,strQuery; 2
            HttpWebRequest    wr;3
            if(cbolIsVersion==false)4
            {5
                strQuery=cstrHostName+@"search&s=PSBlY4LJF1ElvSEXmgPwZsl1VQ8?"+cstrquery;6
            }7
            else8
            {9
                if(cstrquery.IndexOf(cstrHostName)==-1)10
                    strQuery=cstrHostName+@"versions?"+cstrquery;11
                else12
                    strQuery=cstrquery;13
            }14
            html="Google桌面搜索未正常启动出错,请稍后再试或请联系应用程序提供商";15
            try16
            {17
                wr=(HttpWebRequest)WebRequest.Create(strQuery);18
                //            wr=(HttpWebRequest)WebRequest.Create(@"http://127.0.0.1:4664/search&s=PSBlY4LJF1ElvSEXmgPwZsl1VQ8?q="+strq );19
                wr.UserAgent =    "Mozilla/6.0 (MSIE 6.0; Windows NT 5.1; Natas.Robot)";20
                HttpWebResponse hr=(HttpWebResponse)(wr.GetResponse());21
                using(StreamReader sr=new StreamReader(hr.GetResponseStream() ))22
                {23
                    html=sr.ReadToEnd();24
                    sr.Close();25
                }26
            }27
            catch28
            {}29
            return html;
                    
                
            
                
                
            
        
浙公网安备 33010602011771号