posts - 22, comments - 20, trackbacks - 1, articles - 3

置顶随笔

摘要: 情事侦缉档案之:李嘉欣粗口录音分析 只为吃醋破口大骂刘銮雄? 偶当年的梦中情人,大美女李嘉欣一向被评为香港历史上最美丽的港姐,可是近日在网络内流出的一段录音却把她在我心里的最后一点美丽形象破坏殆尽,原来的在她傍上赫赫有名的香港股市“狙击手”刘銮雄这个大款的时候已经损失掉了95%。 网络上这么形容此段录音:“ 在这段49秒的录音内,酷似李嘉欣的女子破口大骂通话中...阅读全文

posted @ 2007-04-05 16:29 cowboy 阅读(468) 评论(2) 编辑

2008年1月31日

在一些有图片的管理系统中,管理站点由于安全等因素,往往不和前台站点在一个服务器上.这时,要实现图片的管理站点上传,并在前台站点等多站点显示,我们一般会采用单独的图片服务器来实现.
    为了使用方便,我们可以使用自定义控件,如一个文件上传控件,通过指定Ftp站点的相关信息,在文件上传时,自动上传到Ftp服务器.
    而在前台显示时,也可以通过一个继承自Image的控件,从一个地址(图片服务器)来取得图片的缩略图.
    在图片服务器, 我们可以写一个HttpHandler来实现生成缩略图的过程.
    按照这个思路.上传文件时,代码举例如下:
 <asp:FtpFileUpload style="display:block;" runat="server" ID="fuPicture" />

   string GetGifImageUrl()
{
            
//上传图片

            if (this.fuPicture.HasFile)
            
{
        
//返回上传到Ftp服务器后的文件名

                return this.fuPicture.Save();

            }


            
return "";
        }



 

web.config配置

    <FtpFileUploadConfig Server="192.168.2.2" Port="21" UserName="scimg" Password="scimg@sina163.com" HomePath="" AllowExt=".jpe|.jpeg|.jpg|.png|.tif|.tiff|.bmp"/>

在显示图片时,代码举例如下:

    <asp:RemoteImage runat="server" ID="imagePicture" ImageUrl='<%# OperData.Picture %>' />

web.config配置如下:

    <RemoteImageConfig RemoteHomeUrl="http://img.xxxxxx.cn/getthumb.aspx" EnableThumb="true"/>

      我们已经看到了使用,下面我们来实现它:
首先是FtpFileUpload控件的实现方法

using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI.WebControls;
using System.Configuration;
using System.Collections;
using System.Net;
using System.IO;
using System.Diagnostics;
using System.Text.RegularExpressions;

namespace Iyond.Web.UI.WebControls
{
    /**//// <summary>
    ///     <section name="FtpFileUploadConfig" type="System.Configuration.SingleTagSectionHandler"/>
    ///   <FtpFileUploadConfig Server="192.168.2.192" Port="21" UserName="happyfen_images" Password="happyfen_images" HomePath="" >
    /// </summary>
    public class FtpFileUpload : FileUpload
    {
        protected FtpFileUploadConfig config = new FtpFileUploadConfig();

        private static Regex regexName = new Regex(@"[^\s]*$", RegexOptions.Compiled);

        /**//// <summary>
        /// 检查文件是否存在
        /// </summary>
        /// <param name="parentPath">父目录</param>
        /// <param name="name">文件名</param>
        /// <returns></returns>
        protected bool CheckFileOrPath(string parentPath, string fileName)
        {
            //检查一下日期目录是否存在
            FtpWebRequest req = (FtpWebRequest)FtpWebRequest.Create(config.GetFtpUri(parentPath));
            req.Credentials = config.Credentials;
            req.Method = WebRequestMethods.Ftp.ListDirectoryDetails;

            Stream stream = req.GetResponse().GetResponseStream();

            using (StreamReader sr = new StreamReader(stream))
            {
                string line = sr.ReadLine();
                while (!string.IsNullOrEmpty(line))
                {
                    GroupCollection gc = regexName.Match(line).Groups;
                    if (gc.Count != 1)
                    {
                        throw new ApplicationException("FTP 返回的字串格式不正确");
                    }

                    string path = gc[0].Value;
                    if (path == fileName)
                    {
                        return true;
                    }

                    line = sr.ReadLine();
                }
            }

            return false;

        }

        protected void CreatePath(string parentPath, string name)
        {
            FtpWebRequest req = (FtpWebRequest)FtpWebRequest.Create(config.GetFtpUri(string.Format("{0}/{1}",parentPath,name)));
            req.Credentials = config.Credentials;
            req.Method = WebRequestMethods.Ftp.MakeDirectory;
            req.GetResponse();
        }

        /**//// <summary>
        /// 在Ftp服务器上保存文件,并返回文件名
        /// </summary>
        /// <returns>保存的文件名以及路径</returns>
        /// <remarks>
        ///     必须在 app.config 中配置
        /// </remarks>
        public string Save()
        {
            if (!this.HasFile)
                return string.Empty;

            if (config.AllowExt.IndexOf(Path.GetExtension(this.FileName)) == -1)
                throw new ApplicationException("不允许的文件类型" + Path.GetExtension(this.FileName));
           
            //检查一下日期目录是否存在
            string dayPath = DateTime.Today.ToString("yyyyMMdd");
            if (!this.CheckFileOrPath("", dayPath))
            {
                this.CreatePath("", dayPath);
            }

            string fileName = string.Format("{0}_{1}{2}",Path.GetFileNameWithoutExtension(this.FileName),
                DateTime.Now.TimeOfDay.TotalMilliseconds,
                Path.GetExtension(this.FileName));

            string filePath = string.Format("{0}/{1}",
                dayPath, fileName
                );

            FtpWebRequest req = (FtpWebRequest)FtpWebRequest.Create(config.GetFtpUri(filePath));
            req.Credentials = config.Credentials;
            req.Method = WebRequestMethods.Ftp.UploadFile;

            Stream upstream = req.GetRequestStream();

            for (int byteData = this.FileContent.ReadByte(); byteData != -1; byteData = this.FileContent.ReadByte())
            {
                upstream.WriteByte((byte)byteData);
            }

            upstream.Close();
            req.GetResponse();

            return filePath;

        }

    }

    public class FtpFileUploadConfig
    {
        private IDictionary config = ConfigurationManager.GetSection("FtpFileUploadConfig") as IDictionary;

        /**//// <summary>
        /// FTP服务器IP
        /// </summary>
        public string Server
        {
            get
            {
                return config["Server"].ToString();
            }
        }

        /**//// <summary>
        /// FTP服务器端口
        /// </summary>
        public string Port
        {
            get
            {
                return config["Port"].ToString();
            }
        }

        /**//// <summary>
        /// FTP服务器登陆用户名
        /// </summary>
        public string UserName
        {
            get
            {
                return config["UserName"].ToString();
            }
        }

        /**//// <summary>
        /// Ftp服务器登陆密码
        /// </summary>
        public string Password
        {
            get
            {
                return config["Password"].ToString();
            }
        }

        /**//// <summary>
        /// 上传的主目录,每个上传的文件建立日期(例:20070203)的目录
        /// </summary>
        public string HomePath
        {
            get
            {
                return config["HomePath"].ToString();
            }
        }

        /**//// <summary>
        /// AllowExt = ".jpe|.jpeg|.jpg|.png|.tif|.tiff|.bmp"
        /// </summary>
        public string AllowExt
        {
            get
            {
                return config["AllowExt"].ToString();
            }
        }

        /**//// <summary>
        /// 依配置,生成FTP的URI
        /// </summary>
        /// <param name="relationFilePath"></param>
        /// <returns></returns>
        public Uri GetFtpUri(string relationFilePath)
        {

            string uriString = string.Empty;
            if (HomePath != "")
            {
                uriString = string.Format("ftp://{0}:{1}/%2f{2}/{3}", Server, Port, HomePath, relationFilePath);
            }
            else
            {
                uriString = string.Format("ftp://{0}:{1}/%2f{2}", Server, Port, relationFilePath);
            }
            Uri uri = new Uri(uriString);

            return uri;

        }

        /**//// <summary>
        /// 依配置,返回ICredentials的实例
        /// </summary>
        public ICredentials Credentials
        {
            get
            {
                return new NetworkCredential(UserName, Password);
            }
        }

 

    }


}

然后是RemoteImage控件的实现

using System;
using System.Collections.Generic;
using System.Collections;
using System.Configuration;
using System.Web;
using System.IO;
using System.Drawing;
using System.Drawing.Imaging;
using System.Web.UI.WebControls;

namespace Iyond.Web.UI.WebControls
{
    public class RemoteImageHandler : IHttpHandler
    {
        protected HttpContext context = null;
        static Hashtable htmimes = new Hashtable();
        internal readonly string AllowExt = ".jpe|.jpeg|.jpg|.png|.tif|.tiff|.bmp";

        IHttpHandler Members#region IHttpHandler Members

        public bool IsReusable
        {
            get { return false; }
        }

        public void ProcessRequest(HttpContext context)
        {
            this.context = context;
            htmimes[".jpeg"] = "image/jpeg";
            htmimes[".jpg"] = "image/jpeg";
            htmimes[".png"] = "image/png";
            htmimes[".tif"] = "image/tiff";
            htmimes[".tiff"] = "image/tiff";
            htmimes[".bmp"] = "image/bmp";

            try
            {

                string image = context.Request.QueryString["img"];
                int width = Convert.ToInt32(context.Request.QueryString["w"]);
                int height = Convert.ToInt32(context.Request.QueryString["h"]);

                string imagePath = context.Request.MapPath(image);
                if (!File.Exists(imagePath))
                {
                    context.Response.End();
                    return;
                }
                else if (width == 0 && height == 0)
                {
                    context.Response.Redirect(image);
                }
                else
                {
                    string imageUrl = GetPicPathUrl(image, width, height);
                    context.Response.Redirect(imageUrl);
                }
            }
            catch
            {
                context.Response.End();
            }

        }

        #endregion

        Helper#region Helper

        /**//// <summary>
        /// 获取图像编码解码器的所有相关信息
        /// </summary>
        /// <param name="mimeType">包含编码解码器的多用途网际邮件扩充协议 (MIME) 类型的字符串</param>
        /// <returns>返回图像编码解码器的所有相关信息</returns>
        static ImageCodecInfo GetCodecInfo(string mimeType)
        {
            ImageCodecInfo[] CodecInfo = ImageCodecInfo.GetImageEncoders();
            foreach (ImageCodecInfo ici in CodecInfo)
            {
                if (ici.MimeType == mimeType) return ici;
            }
            return null;
        }

        /**//// <summary>
        /// 检测扩展名的有效性
        /// </summary>
        /// <param name="sExt">文件名扩展名</param>
        /// <returns>如果扩展名有效,返回true,否则返回false.</returns>
        bool CheckValidExt(string sExt)
        {
            bool flag = false;
            string[] aExt = AllowExt.Split('|');
            foreach (string filetype in aExt)
            {
                if (filetype.ToLower() == sExt)
                {
                    flag = true;
                    break;
                }
            }
            return flag;
        }

        /**//// <summary>
        /// 保存图片
        /// </summary>
        /// <param name="image">Image 对象</param>
        /// <param name="savePath">保存路径</param>
        /// <param name="ici">指定格式的编解码参数</param>
        void SaveImage(System.Drawing.Image image, string savePath, ImageCodecInfo ici)
        {
            string path = new FileInfo(savePath).DirectoryName;
            if (!Directory.Exists(path))
            {
                Directory.CreateDirectory(path);
            }

            //设置 原图片 对象的 EncoderParameters 对象
            EncoderParameters parameters = new EncoderParameters(1);
            parameters.Param[0] = new EncoderParameter(System.Drawing.Imaging.Encoder.Quality, ((long)90));
            image.Save(savePath, ici, parameters);
            parameters.Dispose();
        }
        #endregion

        Methods#region Methods

        /**//// <summary>
        /// 生成缩略图
        /// </summary>
        /// <param name="sourceImagePath">原图片路径(相对路径)</param>
        /// <param name="thumbnailImagePath">生成的缩略图路径,如果为空则保存为原图片路径(相对路径)</param>
        /// <param name="thumbnailImageWidth">缩略图的宽度(高度与按源图片比例自动生成)</param>
        public void ToThumbnailImages(string sourceImagePath, string thumbnailImagePath, int nWidth, int nHeight)
        {
            string sExt = sourceImagePath.Substring(sourceImagePath.LastIndexOf(".")).ToLower();
            if (sourceImagePath.ToString() == System.String.Empty) throw new NullReferenceException("sourceImagePath is null!");
            if (!CheckValidExt(sExt))
            {
                throw new ArgumentException("原图片文件格式不正确,支持的格式有[ " + AllowExt + " ]", "sourceImagePath");
            }
            //从 原图片 创建 Image 对象
            System.Drawing.Image image = System.Drawing.Image.FromFile(sourceImagePath);
            //int num = ((thumbnailImageWidth / 4) * 3);
            int width = image.Width;
            int height = image.Height;
            if (nWidth == 0)
            {
                nWidth = width;
            }
            if (nHeight == 0)
            {
                nHeight = height;
            }

            //计算图片的比例
            double nblh = image.Width * 1.0 / nWidth;
            double nblv = image.Height * 1.0 / nHeight;
            double nBL = Math.Max(nblh, nblv);// nblh > nblv ? nblh:nblv;
            int thumbWidth, thumbHeight;
            if (nBL > 1.0)
            {
                thumbWidth = (int)(image.Width / nBL);
                thumbHeight = (int)(image.Height / nBL);
            }
            else
            {
                thumbWidth = nWidth;
                thumbHeight = nHeight;
            }

           //用指定的大小和格式初始化 Bitmap 类的新实例
            Bitmap bitmap = new Bitmap(thumbWidth, thumbHeight, PixelFormat.Format32bppArgb);
            //从指定的 Image 对象创建新 Graphics 对象
            Graphics graphics = Graphics.FromImage(bitmap);
            //清除整个绘图面并以透明背景色填充
            graphics.Clear(Color.Transparent);
            //在指定位置并且按指定大小绘制 原图片 对象
            graphics.DrawImage(image, new Rectangle(0, 0, thumbWidth, thumbHeight));
            image.Dispose();
            try
            {
                //将此 原图片 以指定格式并用指定的编解码参数保存到指定文件
                string savepath = (thumbnailImagePath == null ? sourceImagePath : thumbnailImagePath);
                SaveImage(bitmap, savepath, GetCodecInfo((string)htmimes[sExt]));
            }
            catch (System.Exception e)
            {
                throw e;
            }
            finally
            {
                bitmap.Dispose();
                graphics.Dispose();
            }
        }
        #endregion


        public string GetPicPathUrl(string image, int nWidth, int nHeight)
        {
            const string pathEnd = "_";
            if (nWidth == 0 || nHeight == 0)
            {
                return image;
            }

            string imageSmallUrl = string.Format("{0}{1}/{2}_{3}{4}", image, pathEnd, nWidth, nHeight, Path.GetExtension(image));
            string imagePath = context.Request.MapPath(image);
            string imageSmallPath = context.Request.MapPath(imageSmallUrl);
            if (!File.Exists(imageSmallPath))
            {
                this.ToThumbnailImages(imagePath, imageSmallPath, nWidth, nHeight);
            }
            return imageSmallUrl;
        }
    }

    public class RemoteImage : System.Web.UI.WebControls.Image
    {
        protected RemoteImageConfig config = new RemoteImageConfig();
        protected Unit width = Unit.Empty;
        protected Unit height = Unit.Empty;
        public override string ImageUrl
        {
            get
            {
                if (this.DesignMode)
                {
                    return base.ImageUrl;
                }
                else if (config.EnableThumb &&
                    this.Width.Type == UnitType.Pixel && this.Height.Type == UnitType.Pixel)
                {
                    return string.Format("{0}?img={1}&w={2}&h={3}", config.RemoteHomeUrl, System.Web.HttpUtility.UrlEncode(base.ImageUrl),
                        this.Width.IsEmpty ? 0 : this.Width.Value, this.Height.IsEmpty ? 0 : this.Height.Value);
                }
                else
                {
                    return string.Format("{0}/{1}", config.RemoteHomeUrl, base.ImageUrl);
                }
            }
            set
            {
                base.ImageUrl = value;
            }
        }

        /**//// <summary>
        /// 宽度,最好指定象素单位,Image服务器会生成相应宽度的缩略图
        /// </summary>
        public override Unit Width
        {
            get
            {
                return width;
            }
            set
            {
                width = value;
            }
        }

        /**//// <summary>
        /// 高度,最好指定象素单位,Image服务器会生成相应高度的缩略图
        /// </summary>
        public override Unit Height
        {
            get
            {
                return height;
            }
            set
            {
                height = value;
            }
        }

       
    }

    public class RemoteImageConfig
    {
        private IDictionary config = ConfigurationManager.GetSection("RemoteImageConfig") as IDictionary;

        /**//// <summary>
        /// 图片服务器HttpHandler地址
        /// </summary>
        public string RemoteHomeUrl
        {
            get
            {
                return config["RemoteHomeUrl"].ToString().TrimEnd('\\','/');
            }
        }

        //是否启用缩略图
        public bool EnableThumb
        {
            get
            {
                return Convert.ToBoolean(config["EnableThumb"]);
            }
        }


    }

}



posted @ 2008-01-31 10:49 cowboy 阅读(1136) 评论(1) 编辑

2007年4月5日

   情事侦缉档案之:李嘉欣粗口录音分析 只为吃醋破口大骂刘銮雄?

   偶当年的梦中情人,大美女李嘉欣一向被评为香港历史上最美丽的港姐,可是近日在网络内流出的一段录音却把她在我心里的最后一点美丽形象破坏殆尽,原来的在她傍上赫赫有名的香港股市“狙击手”刘銮雄这个大款的时候已经损失掉了95%。

     网络上这么形容此段录音:“ 在这段49秒的录音内,酷似李嘉欣的女子破口大骂通话中的另一男子,指责他不该捧洪欣,不该与蔡少芬再联络。用词低俗,频爆粗口,令人错愕。而录音中的男主角则让人不免疑惑,尽管声音进行了处理,但是说话的口吻却象足了富商刘銮雄。”

    不过我最奇怪的是,为什么这个电话会被录音?这个就要从甲乙双方来看:

A:甲方刘銮雄也许因为大刘是个有心人,每个电话都录音,以备生意或者其他的不时之需,他日好做呈堂证供吧!

       那他为什么要泄露出来?我觉得大刘还是很喜欢李嘉欣的,应当不会这么做的把(如果是我就不会)!当然也可能是李嘉欣要嫁入许家的传闻,令到大刘不爽,在此也用上股市的狙击术?让许家感受社会舆论压力而嫌弃嘉欣?还有可能是他手下(或曾经的手下)的管录音的人手头紧,所以出卖了,换点零花钱?【手下泄露这个可能性比较小,我个人觉得】

B:乙方李嘉欣。这个我实在想不出什么理由,嘉欣要保存每一个录音,这个还是很费时费力的。而且就算保存了,她在这个时候泄露出来,对她嫁入许家的计划可是大大的不利。退一步就算我们的嘉欣也是一个有心人,也爱保存每个电话录音。那么在这个时候泄露也不是她自己来泄露的,可能是录音也被人用来江湖救急了【此可能性较小】

当然上述分析也不尽然,还有一个很大的可能性就是某些不良媒体为了吸引眼球而无中生有!对这种行为作为嘉欣曾经的粉丝,偶表示愤慨!

最后还是那句老话:时间可以证明一切!希望嘉欣那5%不要消失

以下为本案卷宗,仅供参考:

  吃醋痛骂大刘热捧蔡少芬洪欣,对话内容详见下边文字:

  李:好像王晶那样,痴心情长剑似的,可以样样事都为了邱淑贞去做,这样做对于你来说是侮辱你的智慧,是憨居(就是很傻的意思) 那你就要去抬一下其他人咯,和其他女人上床咯。
  刘:你以为她是我女朋友?是我老婆啊?打工而已
  李:打工仔?只是打工仔你用对别人那么好啊?
  刘:对谁好啊我?
  李:你对谁好?你对ada(蔡少芬)不好吗?
  刘:我对ada(蔡少芬)还好?
  李:所有人都认准你会开公司,会开戏给她拍。这么多联络的?那不用说话了
  刘:是以前,以前……
  李:我真是恭喜你啊,签了个洪欣这么蠢的x女人回去,恭喜你。快点捧红她啊   
  刘:我没想过捧她
  李:你没想过捧她?那你签她回来把x啊?
  刘:那不好,那……

查看更多精彩图片



查看更多精彩图片

 

 

posted @ 2007-04-05 16:29 cowboy 阅读(468) 评论(2) 编辑

2007年4月3日

 
     公布一下最近的几个重大事件把。
     我找到了这个阶段的目标-我决定爆发我的小宇宙来实现它。
     粉丝堂,终于在编码3个月后可以展示给大家看了,欢迎大家来访问http://www.fanstown.net
      就在今天,我把粉丝堂的博客系统基本调试通过,放到了网上,也欢迎大家来访问我的传媒博客http://blog.fanstown.net/blogs/jerry
      今天就到这里把。请大家密切关注粉丝堂,她会每天给你带来惊喜。    
                                             这里截图一张留有纪念
                                     

posted @ 2007-04-03 21:36 cowboy 阅读(209) 评论(0) 编辑

2007年1月24日

private DotMSN.Messenger messenger = new Messenger();

if (Universal.ConvertNullToEmpty(Request["MsnAccount"]).Equals(""|| Universal.ConvertNullToEmpty(Request["MsnPassword"]).Equals("")) {
    
throw new UserException("您没有输入MSN帐户或密码!");
   }

   messenger 
= new Messenger(); 

try{
    messenger.Connect(Request[
"MsnAccount"], Request["MsnPassword"]);
    
if (!messenger.Connected) {
     
throw new UserException("MSN无法连接!");
    }


    messenger.SynchronizeList();
    
int count = 0;
    
while (!messenger.GetListEnumerator(MSNList.ForwardList).MoveNext() && count < 5{
    
//while (!messenger.Connected && count < 10) {
     System.Threading.Thread.Sleep(2000);
     count
++;
    }

    
if (!messenger.GetListEnumerator(MSNList.ForwardList).MoveNext() && count == 5{
     
throw new UserException("MSN无法连接!");
    }


    messenger.SetStatus(MSNStatus.Online); 
// 设置上线
    System.Threading.Thread.Sleep(1000);

    ArrayList GroupList 
= new ArrayList();
    Hashtable Grouptable 
= new Hashtable();
    
foreach (object o in messenger.ContactGroups.Keys) {
     ContactGroup contactGroup 
= messenger.ContactGroups[o] as ContactGroup;
     GroupList.Add(contactGroup);
     Grouptable.Add(
"Group"+contactGroup.ID, new ArrayList());
    }


    
foreach (Contact contact in messenger.GetListEnumerator(MSNList.ForwardList)) {
     ArrayList contactList 
= Grouptable["Group"+contact.ContactGroup.ID] as ArrayList;
     contactList.Add(contact);
    }


    StringBuilder ListHtml 
= new StringBuilder();
    ListHtml.Append(
"<tr height=20 bgcolor=#BECFDC align=\"left\">");
    ListHtml.Append(
"<td width=6% align=center><b>展开</b></td>");
    ListHtml.Append(
"<td width=34%><b>电子邮件地址</b></td>");
    ListHtml.Append(
"<td width=60%><b>称呼</b></td></tr>");
  
    
bool flag = false;
    
for (int i=0; i<GroupList.Count; i++{
     ContactGroup contactGroup 
= GroupList[i] as ContactGroup;
     ArrayList contactList 
= Grouptable["Group"+contactGroup.ID] as ArrayList;
     ListHtml.Append(
"<tr>");
     ListHtml.Append(
"<td align=center><img src=\"../images/plus.gif\" title=\"合并\" style=\"cursor:hand\" onClick=\"ClickImg(this,'Group"+contactGroup.ID+"')\"></td>");
     ListHtml.Append(
"<td colspan=2  bgcolor=#BEBEDE><input type=\"checkbox\" name=\"Group\" value=\"group"+contactGroup.ID+"\" onClick=\"ClickGroup(this)\" checked>"+(contactGroup.Name.Equals("Individuals")?"未分组":contactGroup.Name)+""+contactList.Count+")</td>");
     ListHtml.Append(
"</tr>");
     ListHtml.Append(
"<tr id=\"Group"+contactGroup.ID+"\" style=\"display:none\"><td></td><td colspan=2>");

     
// 得到分组中的好友列表
     ListHtml.Append("<table width=100%>");
     
for (int j=0; j<contactList.Count; j++{
      Contact contact 
= contactList[j] as Contact;
      ListHtml.Append(
"<tr bgcolor="+(flag?"#E6E6E5":"#FFFFFF")+">");
      ListHtml.Append(
"<td width=36%><input type=\"checkbox\" name=\"FriendEmail\" value=\""+contact.Mail+"\" group=\"group"+contactGroup.ID+"\" onClick=\"ClickContact(this)\" checked>"+contact.Mail+"</td>");
      ListHtml.Append(
"<td width=64%>"+contact.Name+"</td>");
      ListHtml.Append(
"</tr>");
      flag 
= !flag;
     }

     ListHtml.Append(
"</table></td></tr>");
    }


    lbFriendList.Text 
= ListHtml.ToString();

   }

   
catch (MSNException ex) {
    
throw new UserException("连接失败:"+ex.Message);
   }


posted @ 2007-01-24 12:49 cowboy 阅读(994) 评论(1) 编辑

2006年11月21日

我们知道,搜索引擎都有自己的“搜索机器人”(ROBOTS),并通过这些ROBOTS在网络上沿着网页上的链接(一般是http和src链接)不断抓取资料建立自己的数据库。 对于网站管理者和内容提供者来说,有时候会有一些站点内容,不希望被ROBOTS抓取而公开。为了解决这个问题,ROBOTS开发界提供了两个办法:一个是robots.txt,另一个是The Robots META标签。 一、robots.txt 1、什么是robots.txt? robots.txt是一个纯文本文件,通过在这个文件中声明该网站中不想被robots访问的部分,这样,该网站的部分或全部内容就可以不被搜索引擎收录了,或者指定搜索引擎只收录指定的内容。 当一个搜索机器人访问一个站点时,它会首先检查该站点根目录下是否存在robots.txt,如果找到,搜索机器人就会按照该文件中的内容来确定访问的范围,如果该文件不存在,那么搜索机器人就沿着链接抓取。 robots.txt必须放置在一个站点的根目录下,而且文件名必须全部小写。 网站 URL 相应的 robots.txt的 URL http://www.w3.org/ http://www.w3.org/robots.txt http://www.w3.org:80/ http://www.w3.org:80/robots.txt http://www.w3.org:1234/ http://www.w3.org:1234/robots.txt http://w3.org/ http://w3.org/robots.txt 2、robots.txt的语法 "robots.txt"文件包含一条或更多的记录,这些记录通过空行分开(以CR,CR/NL, or NL作为结束符),每一条记录的格式如下所示:     ":"。 在该文件中可以使用#进行注解,具体使用方法和UNIX中的惯例一样。该文件中的记录通常以一行或多行User-agent开始,后面加上若干Disallow行,详细情况如下: User-agent: 该项的值用于描述搜索引擎robot的名字,在"robots.txt"文件中,如果有多条User-agent记录说明有多个robot会受到该协议的限制,对该文件来说,至少要有一条User-agent记录。如果该项的值设为*,则该协议对任何机器人均有效,在"robots.txt"文件中, "User-agent:*"这样的记录只能有一条。 Disallow: 该项的值用于描述不希望被访问到的一个URL,这个URL可以是一条完整的路径,也可以是部分的,任何以Disallow 开头的URL均不会被robot访问到。例如"Disallow: /help"对/help.html 和/help/index.html都不允许搜索引擎访问,而"Disallow: /help/"则允许robot访问/help.html,而不能访问/help/index.html。 任何一条Disallow记录为空,说明该网站的所有部分都允许被访问,在"/robots.txt"文件中,至少要有一条Disallow记录。如果 "/robots.txt"是一个空文件,则对于所有的搜索引擎robot,该网站都是开放的。 下面是一些robots.txt基本的用法: l 禁止所有搜索引擎访问网站的任何部分: User-agent: * Disallow: / l 允许所有的robot访问 User-agent: * Disallow: 或者也可以建一个空文件 "/robots.txt" file l 禁止所有搜索引擎访问网站的几个部分(下例中的cgi-bin、tmp、private目录) User-agent: * Disallow: /cgi-bin/ Disallow: /tmp/ Disallow: /private/ l 禁止某个搜索引擎的访问(下例中的BadBot) User-agent: BadBot Disallow: / l 只允许某个搜索引擎的访问(下例中的WebCrawler) User-agent: WebCrawler Disallow: User-agent: * Disallow: / 3、常见搜索引擎机器人Robots名字 名称 搜索引擎 Baiduspider http://www.baidu.com Scooter http://www.altavista.com ia_archiver http://www.alexa.com Googlebot http://www.google.com FAST-WebCrawler http://www.alltheweb.com Slurp http://www.inktomi.com MSNBOT http://search.msn.com 4、robots.txt举例 下面是一些著名站点的robots.txt: http://www.cnn.com/robots.txt http://www.google.com/robots.txt http://www.ibm.com/robots.txt http://www.sun.com/robots.txt http://www.eachnet.com/robots.txt 5、常见robots.txt错误 l 颠倒了顺序: 错误写成 User-agent: * Disallow: GoogleBot 正确的应该是: User-agent: GoogleBot Disallow: * l 把多个禁止命令放在一行中: 例如,错误地写成 Disallow: /css/ /cgi-bin/ /images/ 正确的应该是 Disallow: /css/ Disallow: /cgi-bin/ Disallow: /images/ l 行前有大量空格 例如写成 Disallow: /cgi-bin/ 尽管在标准没有谈到这个,但是这种方式很容易出问题。 l 404重定向到另外一个页面: 当Robot访问很多没有设置robots.txt文件的站点时,会被自动404重定向到另外一个Html页面。这时Robot常常会以处理robots.txt文件的方式处理这个Html页面文件。虽然一般这样没有什么问题,但是最好能放一个空白的robots.txt文件在站点根目录下。 l 采用大写。例如 USER-AGENT: EXCITE DISALLOW: 虽然标准是没有大小写的,但是目录和文件名应该小写: user-agent:GoogleBot disallow: l 语法中只有Disallow,没有Allow! 错误的写法是: User-agent: Baiduspider Disallow: /john/ allow: /jane/ l 忘记了斜杠/ 错误的写做: User-agent: Baiduspider Disallow: css 正确的应该是 User-agent: Baiduspider Disallow: /css/ 下面一个小工具专门检查robots.txt文件的有效性: http://www.searchengineworld.com/cgi-bin/robotcheck.cgi 二、Robots META标签 1、什么是Robots META标签 Robots.txt文件主要是限制整个站点或者目录的搜索引擎访问情况,而Robots META标签则主要是针对一个个具体的页面。和其他的META标签(如使用的语言、页面的描述、关键词等)一样,Robots META标签也是放在页面的中,专门用来告诉搜索引擎ROBOTS如何抓取该页的内容。具体的形式类似(见黑体部分): 时代营销--网络营销专业门户 … 2、Robots META标签的写法: Robots META标签中没有大小写之分,name=”Robots”表示所有的搜索引擎,可以针对某个具体搜索引擎写为name=”BaiduSpider”。content部分有四个指令选项:index、noindex、follow、nofollow,指令间以“,”分隔。 INDEX 指令告诉搜索机器人抓取该页面; FOLLOW 指令表示搜索机器人可以沿着该页面上的链接继续抓取下去; Robots Meta标签的缺省值是INDEX和FOLLOW,只有inktomi除外,对于它,缺省值是INDEX,NOFOLLOW。 这样,一共有四种组合: 其中 可以写成 可以写成 需要注意的是:上述的robots.txt和Robots META标签限制搜索引擎机器人(ROBOTS)抓取站点内容的办法只是一种规则,需要搜索引擎机器人的配合才行,并不是每个ROBOTS都遵守的。 目前看来,绝大多数的搜索引擎机器人都遵守robots.txt的规则,而对于Robots META标签,目前支持的并不多,但是正在逐渐增加,如著名搜索引擎GOOGLE就完全支持,而且GOOGLE还增加了一个指令“archive”,可以限制GOOGLE是否保留网页快照。例如: 表示抓取该站点中页面并沿着页面中链接抓取,但是不在GOOLGE上保留该页面的网页快照。

posted @ 2006-11-21 11:30 cowboy 阅读(120) 评论(0) 编辑

Google SiteMap Protocol是Google自己推出的一种站点地图协议,此协议文件基于早期的robots.txt文件协议,并有所升级。在Google官方指南中指出加入了Google SiteMap文件的网站将更有利于Google网页爬行机器人的爬行索引,这样将提高索引网站内容的效率和准确度。文件协议应用了简单的XML格式,一共用到6个标签,其中关键标签包括链接地址、更新时间、更新频率和索引优先权。 Google SiteMap文件生成后格式如下: http://duduwolf.winzheng.com 2005-06-03T04:20-08:00 always 1.0 http://duduwolf.winzheng.com/post/140.html 2005-06-02T20:20:36Z daily 0.8 XML标签 changefreq:页面内容更新频率。 lastmod:页面最后修改时间 loc:页面永久链接地址 priority:相对于其他页面的优先权 url:相对于前4个标签的父标签 urlset:相对于前5个标签的父标签 我将一句一句分解讲解这个xml文件的每一个标签: 这一行定义了此xml文件的命名空间,相当于网页文件中的标签一样的作用。 这是具体某一个链接的定义入口,你所希望展示在SiteMap文件中的每一个链接都要用包含在里面,这是必须的。 http://duduwolf.winzheng.com描述出具体的链接地址,这里需要注意的是链接地址中的一些特殊字符必须转换为XML(HTML)定义的转义字符,如下表: 字符转义后的字符 HTML字符字符编码 and(和)&&& 单引号''' 双引号""" 大于号>>> 小于号<<< 2005-06-03T04:20:32-08:00 是用来指定该链接的最后更新时间,这个很重要。Google的机器人会在索引此链接前先和上次索引记录的最后更新时间进行比较,如果时间一样就会跳过不再索引。所以如果你的链接内容基于上次Google索引时的内容有所改变,应该更新该时间,让Google下次索引时会重新对该链接内容进行分析和提取关键字。这里必须用ISO 8601中指定的时间格式进行描述,格式化的时间格式如下: 年:YYYY(2005) 年和月:YYYY-MM(2005-06) 年月日:YYYY-MM-DD(2005-06-04) 年月日小时分钟:YYYY-MM-DDThh:mmTZD(2005-06-04T10:37+08:00) 年月日小时分钟秒:YYYY-MM-DDThh:mmTZD(2005-06-04T10:37:30+08:00) 这里需注意的是TZD,TZD指定就是本地时间区域标记,像中国就是+08:00了 always 用这个标签告诉Google此链接可能会出现的更新频率,比如首页肯定就要用always(经常),而对于很久前的链接或者不再更新内容的链接就可以用yearly(每年)。这里可以用来描述的单词共这几个:"always", "hourly", "daily", "weekly", "monthly", "yearly",具体含义我就不用解释了吧,光看单词的意思就明白了。 1.0 是用来指定此链接相对于其他链接的优先权比值,此值定于0.0 - 1.0之间 还有,这两个就是来关闭xml标签的,这和HTML中的和是一个道理 另外需要注意的是,这个xml文件必须是utf-8的编码格式,不管你是手动生成还是通过代码生成,建议最好检查一下xml文件是否是utf-8编码,最简单的方法就是用记事本打开xml然后另存为时选择编码(或转换器)为UTF-8。 z-blog系统和Wordpress系统的自动生成SiteMap程序及详细生成后代码 z-blog: <%@ CODEPAGE=65001 %> <% Option Explicit %> <% On Error Resume Next %> <% Response.Charset="UTF-8" %> <% Response.Buffer=True %> <!-- #include file="c_option.asp" --> <!-- #include file="c_function.asp" --> <!-- #include file="c_system_lib.asp" --> <!-- #include file="c_system_base.asp" --> <% If Request.ServerVariables("REQUEST_METHOD")="POST" Then Dim str, Conn, Rs, objStream Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &amp;amp;amp;amp;amp;amp;amp;amp; BlogPath &amp;amp;amp;amp;amp;amp;amp;amp; "/" &amp;amp;amp;amp;amp;amp;amp;amp; ZC_DATABASE_PATH str = "" &amp;amp;amp;amp;amp;amp;amp;amp; vbcrlf str = str &amp;amp;amp;amp;amp;amp;amp;amp; "" &amp;amp;amp;amp;amp;amp;amp;amp; vbcrlf str = str &amp;amp;amp;amp;amp;amp;amp;amp; "" &amp;amp;amp;amp;amp;amp;amp;amp; vbcrlf str = str &amp;amp;amp;amp;amp;amp;amp;amp; "" &amp;amp;amp;amp;amp;amp;amp; ZC_BLOG_HOST &amp;amp;amp;amp;amp;amp;amp; "" &amp;amp;amp;amp;amp;amp;amp;amp; vbcrlf str = str &amp;amp;amp;amp;amp;amp;amp;amp; "" &amp;amp;amp;amp;amp;amp;amp;amp; FormatDate("YYYY-MM-DD",Date()) &amp;amp;amp;amp;amp;amp;amp;amp; "" &amp;amp;amp;amp;amp;amp;amp;amp; vbcrlf str = str &amp;amp;amp;amp;amp;amp;amp;amp; "always" &amp;amp;amp;amp;amp;amp;amp;amp; vbcrlf str = str &amp;amp;amp;amp;amp;amp;amp;amp; "0.9" &amp;amp;amp;amp;amp;amp;amp;amp; vbcrlf str = str &amp;amp;amp;amp;amp;amp;amp;amp; "" &amp;amp;amp;amp;amp;amp;amp;amp; vbcrlf Set Rs = Conn.Execute("select * from blog_Article where log_Level=4 order by log_PostTime desc") Do While Not Rs.Eof str = str &amp;amp;amp;amp;amp;amp;amp;amp; "" &amp;amp;amp;amp;amp;amp;amp;amp; vbcrlf str = str &amp;amp;amp;amp;amp;amp;amp;amp; "" &amp;amp;amp;amp;amp;amp;amp;amp; ZC_BLOG_HOST &amp;amp;amp;amp;amp;amp;amp;amp; "post/" &amp;amp;amp;amp;amp;amp;amp;amp; Rs("log_ID") &amp;amp;amp;amp;amp;amp;amp;amp; "." &amp;amp;amp;amp;amp;amp;amp;amp; ZC_STATIC_TYPE &amp;amp;amp;amp;amp;amp;amp;amp; "" &amp;amp;amp;amp;amp;amp;amp;amp; vbcrlf str = str &amp;amp;amp;amp;amp;amp;amp;amp; "" &amp;amp;amp;amp;amp;amp;amp;amp; FormatDate("YYYY-MM-DD", Rs("log_PostTime")) &amp;amp;amp;amp;amp;amp;amp;amp; "" &amp;amp;amp;amp;amp;amp;amp;amp; vbcrlf str = str &amp;amp;amp;amp;amp;amp;amp;amp; "daily" &amp;amp;amp;amp;amp;amp;amp;amp; vbcrlf str = str &amp;amp;amp;amp;amp;amp;amp;amp; "0.8" &amp;amp;amp;amp;amp;amp;amp;amp; vbcrlf str = str &amp;amp;amp;amp;amp;amp;amp;amp; "" &amp;amp;amp;amp;amp;amp;amp;amp; vbcrlf Rs.MoveNext Loop Rs.Close Set Rs = Nothing Set Conn = Nothing str = str &amp;amp;amp;amp;amp;amp;amp;amp; "" Set objStream = Server.CreateObject("ADODB.Stream") With objStream .Type = adTypeText .Mode = adModeReadWrite .Open .Charset = "utf-8" .Position = objStream.Size .WriteText=str .SaveToFile BlogPath &amp;amp;amp;amp;amp;amp;amp;amp; "/googlesitemap.xml",adSaveCreateOverWrite .Close End With Set objStream = Nothing If Not Err Then Response.Write("") Response.End End If End If Function FormatDate(FormatStr, CurDateTime) Dim sTemp,YYYY,YY,MM,DD,HH,mmm,SS sTemp = FormatStr If IsDate(CurDateTime) Then YYYY = Year(CurDateTime) YY = Mid(Year(CurDateTime),3,2) MM = Month(CurDateTime) If CInt(MM) <10 Then MM = "0"&amp;amp;amp;amp;amp;amp;amp;amp;MM DD = Day(CurDateTime) If CInt(DD) <10 Then DD = "0"&amp;amp;amp;amp;amp;amp;amp;amp;DD HH = Hour(CurDateTime) If CInt(HH) <10 Then HH = "0"&amp;amp;amp;amp;amp;amp;amp;amp;DD mmm = Minute(CurDateTime)+1 If CInt(mmm) <10 Then mmm = "0"&amp;amp;amp;amp;amp;amp;amp;amp;mmm SS = Second(CurDateTime) If CInt(SS) <10 Then SS = "0"&amp;amp;amp;amp;amp;amp;amp;amp;SS sTemp = Replace(Replace(Replace(Replace(Replace(Replace(Replace(sTemp, "YYYY", YYYY), "YY", YY), "MM", MM), "DD", DD), "HH", HH), "mm", mmm), "SS", SS) End If If IsDate(sTemp) Then FormatDate = sTemp Else FormatDate = CurDateTime End If End Function %>
Wordpress: '; ?> " target="_blank">http://www.google.com/schemas/sitemap/0.84/sitemap.xsd"> always 1.0 get_results("SELECT * FROM $wpdb->posts WHERE post_status = 'publish' ORDER by post_modified DESC"); ?> ID); ?> post_modified, false); ?> daily 0.8 我的站点地图文件(http://duduwolf.winzheng.com/googlesitemap.xml): " target="_blank">http://www.google.com/schemas/sitemap/0.84/sitemap.xsd"> http://duduwolf.winzheng.com/ 2005-06-04 always 0.9 http://duduwolf.winzheng.com/post/150.html 2005-06-04 daily 0.8 http://duduwolf.winzheng.com/post/149.html 2005-06-03 daily 0.8 http://duduwolf.winzheng.com/post/143.html 2005-06-03 daily 0.8 http://duduwolf.winzheng.com/post/142.html 2005-06-02 daily 0.8 http://duduwolf.winzheng.com/post/139.html 2005-06-01 daily 0.8 http://duduwolf.winzheng.com/post/138.html 2005-06-01 daily 0.8 http://duduwolf.winzheng.com/post/137.html 2005-05-31 daily 0.8 http://duduwolf.winzheng.com/post/136.html 2005-05-30 daily 0.8 http://duduwolf.winzheng.com/post/135.html 2005-05-30 daily 0.8 http://duduwolf.winzheng.com/post/134.html 2005-05-28 daily 0.8 http://duduwolf.winzheng.com/post/133.html 2005-05-28 daily 0.8 http://duduwolf.winzheng.com/post/132.html 2005-05-28 daily 0.8 http://duduwolf.winzheng.com/post/131.html 2005-05-27 daily 0.8 http://duduwolf.winzheng.com/post/130.html 2005-05-27 daily 0.8 http://duduwolf.winzheng.com/post/129.html 2005-05-26 daily 0.8 http://duduwolf.winzheng.com/post/128.html 2005-05-25 daily 0.8 http://duduwolf.winzheng.com/post/127.html 2005-05-24 daily 0.8 http://duduwolf.winzheng.com/post/126.html 2005-05-24 daily 0.8 http://duduwolf.winzheng.com/post/125.html 2005-05-23 daily 0.8 http://duduwolf.winzheng.com/post/124.html 2005-05-23 daily 0.8 http://duduwolf.winzheng.com/post/123.html 2005-05-23 daily 0.8 http://duduwolf.winzheng.com/post/122.html 2005-05-22 daily 0.8 http://duduwolf.winzheng.com/post/121.html 2005-05-21 daily 0.8 http://duduwolf.winzheng.com/post/120.html 2005-05-20 daily 0.8 http://duduwolf.winzheng.com/post/119.html 2005-05-18 daily 0.8 http://duduwolf.winzheng.com/post/118.html 2005-05-18 daily 0.8 http://duduwolf.winzheng.com/post/117.html 2005-05-18 daily 0.8 http://duduwolf.winzheng.com/post/116.html 2005-05-18 daily 0.8 http://duduwolf.winzheng.com/post/115.html 2005-05-17 daily 0.8 http://duduwolf.winzheng.com/post/114.html 2005-05-17 daily 0.8 http://duduwolf.winzheng.com/post/113.html 2005-05-17 daily 0.8 http://duduwolf.winzheng.com/post/112.html 2005-05-14 daily 0.8 http://duduwolf.winzheng.com/post/111.html 2005-05-13 daily 0.8 http://duduwolf.winzheng.com/post/110.html 2005-05-12 daily 0.8 http://duduwolf.winzheng.com/post/109.html 2005-05-12 daily 0.8 http://duduwolf.winzheng.com/post/108.html 2005-05-11 daily 0.8 http://duduwolf.winzheng.com/post/107.html 2005-05-10 daily 0.8 http://duduwolf.winzheng.com/post/103.html 2005-05-10 daily 0.8 http://duduwolf.winzheng.com/post/102.html 2005-05-10 daily 0.8 http://duduwolf.winzheng.com/post/100.html 2005-05-08 daily 0.8 http://duduwolf.winzheng.com/post/99.html 2005-05-07 daily 0.8 http://duduwolf.winzheng.com/post/98.html 2005-05-07 daily 0.8 http://duduwolf.winzheng.com/post/97.html 2005-05-05 daily 0.8 http://duduwolf.winzheng.com/post/96.html 2005-05-05 daily 0.8 http://duduwolf.winzheng.com/post/95.html 2005-04-30 daily 0.8 http://duduwolf.winzheng.com/post/94.html 2005-04-28 daily 0.8 http://duduwolf.winzheng.com/post/93.html 2005-04-27 daily 0.8 http://duduwolf.winzheng.com/post/92.html 2005-04-27 daily 0.8 http://duduwolf.winzheng.com/post/91.html 2005-04-26 daily 0.8 http://duduwolf.winzheng.com/post/90.html 2005-04-26 daily 0.8 http://duduwolf.winzheng.com/post/89.html 2005-04-26 daily 0.8 http://duduwolf.winzheng.com/post/88.html 2005-04-26 daily 0.8 http://duduwolf.winzheng.com/post/87.html 2005-04-21 daily 0.8 http://duduwolf.winzheng.com/post/86.html 2005-04-21 daily 0.8 http://duduwolf.winzheng.com/post/85.html 2005-04-19 daily 0.8 http://duduwolf.winzheng.com/post/84.html 2005-04-18 daily 0.8 http://duduwolf.winzheng.com/post/83.html 2005-04-18 daily 0.8 http://duduwolf.winzheng.com/post/82.html 2005-04-18 daily 0.8 http://duduwolf.winzheng.com/post/81.html 2005-04-17 daily 0.8 http://duduwolf.winzheng.com/post/80.html 2005-04-15 daily 0.8 http://duduwolf.winzheng.com/post/79.html 2005-04-15 daily 0.8 http://duduwolf.winzheng.com/post/78.html 2005-04-13 daily 0.8 http://duduwolf.winzheng.com/post/77.html 2005-04-13 daily 0.8 http://duduwolf.winzheng.com/post/76.html 2005-04-13 daily 0.8 http://duduwolf.winzheng.com/post/75.html 2005-04-12 daily 0.8 http://duduwolf.winzheng.com/post/74.html 2005-04-11 daily 0.8 http://duduwolf.winzheng.com/post/73.html 2005-04-10 daily 0.8 http://duduwolf.winzheng.com/post/71.html 2005-04-08 daily 0.8 http://duduwolf.winzheng.com/post/72.html 2005-04-07 daily 0.8 http://duduwolf.winzheng.com/post/70.html 2005-04-07 daily 0.8 http://duduwolf.winzheng.com/post/69.html 2005-04-07 daily 0.8 http://duduwolf.winzheng.com/post/68.html 2005-04-04 daily 0.8 http://duduwolf.winzheng.com/post/67.html 2005-04-03 daily 0.8 http://duduwolf.winzheng.com/post/61.html 2005-04-03 daily 0.8 http://duduwolf.winzheng.com/post/60.html 2005-04-01 daily 0.8 http://duduwolf.winzheng.com/post/59.html 2005-04-01 daily 0.8 http://duduwolf.winzheng.com/post/58.html 2005-03-30 daily 0.8 http://duduwolf.winzheng.com/post/57.html 2005-03-30 daily 0.8 http://duduwolf.winzheng.com/post/55.html 2005-03-29 daily 0.8 http://duduwolf.winzheng.com/post/53.html 2005-03-26 daily 0.8 http://duduwolf.winzheng.com/post/52.html 2005-03-23 daily 0.8 http://duduwolf.winzheng.com/post/51.html 2005-03-23 daily 0.8 http://duduwolf.winzheng.com/post/50.html 2005-03-21 daily 0.8 http://duduwolf.winzheng.com/post/49.html 2005-03-21 daily 0.8 http://duduwolf.winzheng.com/post/48.html 2005-03-21 daily 0.8 http://duduwolf.winzheng.com/post/47.html 2005-03-21 daily 0.8 http://duduwolf.winzheng.com/post/45.html 2005-03-19 daily 0.8 http://duduwolf.winzheng.com/post/43.html 2005-03-18 daily 0.8 http://duduwolf.winzheng.com/post/38.html 2005-03-17 daily 0.8 http://duduwolf.winzheng.com/post/42.html 2005-03-17 daily 0.8 http://duduwolf.winzheng.com/post/41.html 2005-03-16 daily 0.8 http://duduwolf.winzheng.com/post/40.html 2005-03-16 daily 0.8 http://duduwolf.winzheng.com/post/39.html 2005-03-16 daily 0.8 http://duduwolf.winzheng.com/post/37.html 2005-03-13 daily 0.8 http://duduwolf.winzheng.com/post/36.html 2005-03-12 daily 0.8 http://duduwolf.winzheng.com/post/35.html 2005-03-12 daily 0.8 http://duduwolf.winzheng.com/post/34.html 2005-03-10 daily 0.8 http://duduwolf.winzheng.com/post/33.html 2005-03-09 daily 0.8 http://duduwolf.winzheng.com/post/32.html 2005-03-07 daily 0.8 http://duduwolf.winzheng.com/post/31.html 2005-03-07 daily 0.8 http://duduwolf.winzheng.com/post/30.html 2005-03-07 daily 0.8 http://duduwolf.winzheng.com/post/29.html 2005-03-07 daily 0.8 http://duduwolf.winzheng.com/post/28.html 2005-03-07 daily 0.8 http://duduwolf.winzheng.com/post/27.html 2005-03-07 daily 0.8 http://duduwolf.winzheng.com/post/26.html 2005-03-07 daily 0.8 http://duduwolf.winzheng.com/post/25.html 2005-03-07 daily 0.8 http://duduwolf.winzheng.com/post/24.html 2005-03-07 daily 0.8 http://duduwolf.winzheng.com/post/23.html 2005-03-07 daily 0.8 http://duduwolf.winzheng.com/post/22.html 2005-03-07 daily 0.8 http://duduwolf.winzheng.com/post/21.html 2005-03-07 daily 0.8 http://duduwolf.winzheng.com/post/19.html 2005-03-03 daily 0.8 http://duduwolf.winzheng.com/post/16.html 2005-02-25 daily 0.8 http://duduwolf.winzheng.com/post/15.html 2005-02-24 daily 0.8 http://duduwolf.winzheng.com/post/14.html 2005-02-24 daily 0.8 http://duduwolf.winzheng.com/post/13.html 2005-02-24 daily 0.8 http://duduwolf.winzheng.com/post/12.html 2005-02-24 daily 0.8 http://duduwolf.winzheng.com/post/11.html 2005-02-23 daily 0.8 http://duduwolf.winzheng.com/post/10.html 2005-02-23 daily 0.8 http://duduwolf.winzheng.com/post/9.html 2005-02-23 daily 0.8 http://duduwolf.winzheng.com/post/8.html 2005-02-23 daily 0.8 http://duduwolf.winzheng.com/post/7.html 2005-02-23 daily 0.8 http://duduwolf.winzheng.com/post/6.html 2005-02-23 daily 0.8 http://duduwolf.winzheng.com/post/5.html 2005-02-22 daily 0.8 http://duduwolf.winzheng.com/post/4.html 2005-02-22 daily 0.8 http://duduwolf.winzheng.com/post/3.html 2005-02-22 daily 0.8 http://duduwolf.winzheng.com/post/2.html 2005-02-21 daily 0.8 http://duduwolf.winzheng.com/post/1.html 2005-02-21 daily 0.8 登陆Google提交你的SiteMap文件,让Google开始爬行吧 打开https://www.google.com/webmasters/sitemaps/链接,如果还没有注册或者登陆Google,就先用自己的帐号登陆Google,登陆后转到Your Sitemaps状态页面,可以点击那个Add a Sitemap + 跳转到提交页面进行Sitemap文件的提交。建议文件放在你的站点根目录下。给Google提交你的Sitemap URL后可以看见在列表里已存在,不过这时候还没有生效,必须过几个小时后Status栏变成OK表示正式生效,如果不是OK,可以查看Google给出的状态标示解释看看是什么原因。 UPDATE:打包下载z-blog和Wordpress系统的Sitemap生成小工具 build_google_sitemap_tools.zip UPDATE II:从webleon得到最新消息,Google也支持普通的Rss Feed,所以你也可以直接把你的Rss Url提交给Google也能达到同样效果

posted @ 2006-11-21 11:23 cowboy 阅读(256) 评论(0) 编辑

2006年9月2日

摘要: 今天发现了一个2.0框架的BUG发现当ASPX页面中出现了<img src=#>这样的标签的时候(关键是SRC=#这个#),CS 文件中的PAGE_LOAD事件就会执行2次。 找这个问题我找的郁闷死了,几乎花掉了一天事件。切记,切记。 大家路过的时候看看,注意一下,也许大家以后也会遇到这样的问题,模不着头脑的。 今天的终于可以休息一下了。奖励自己一个苹果。阅读全文

posted @ 2006-09-02 22:21 cowboy 阅读(355) 评论(1) 编辑

2006年8月28日

摘要: /b匹配一个单词边界,也就是指单词和空格间的位置。例如,'er/b'可以匹配"never"中的'er',但不能匹配"verb"中的'er'。/B匹配非单词边界。'er/B'能匹配"verb"中的'er',但不能匹配"never"中的'er'。/cx匹配由x指明的控制字符。例如,/cM匹配一个Control-M或回车符。x的值必须为A-Z或a-z之一。否则,将c视为一个原义的'c'字符。/d匹配一个...阅读全文

posted @ 2006-08-28 15:59 cowboy 阅读(611) 评论(0) 编辑

2006年8月10日

摘要: 一、简介二、匹配操作符三、模式中的特殊字符1、字符+2、字符[]和[^]3、字符*和?4、转义字符5、匹配任意字母或数字6、锚模式7、模式中的变量替换8、字符范围转义前缀9、匹配任意字符10、匹配指定数目的字符11、指定选项12、模式的部分重用13、转义和特定字符的执行次序14、指定模式定界符15、模式次序变量四、模式匹配选项1、匹配所有可能的模式(g选项)2、忽略大小写(i选项)例3、将字符串看...阅读全文

posted @ 2006-08-10 15:23 cowboy 阅读(140) 评论(0) 编辑

2006年7月20日

摘要: windows server2003是目前最为成熟的网络服务器平台,安全性相对于windows 2000有大大的提高,但是2003默认的安全配置不一定适合我们的需要,所以,我们要根据实际情况来对win2003进行全面安全配置。说实话,安全配置是一项比较有难度的网络技术,权限配置的太严格,好多程序又运行不起,权限配置的太松,又很容易被黑客入侵,做为网络管理员,真的很头痛,因此,我结合这几年的网络安全...阅读全文

posted @ 2006-07-20 20:52 cowboy 阅读(161) 评论(0) 编辑