当前位置:编程学习 > C#/ASP.NET >>

获取转向地址的URL的源文件(可自定义REFER)

答案:软件下载:
http://test.fzclx.com/caixi/geturl.rar



程式源文件:

CS打包:http://test.fzclx.com/caixi/geturl.cs.rar


c#写的,可能要先安装framework.
http://www.microsoft.com/downloads/info.aspx?na=0&p=4&SrcDisplayLang=zh-cn&SrcCategoryId=&SrcFamilyId=&genscs=&u=%2fdownloads%2fdetails.aspx%3fFamilyID%3d262d25e3-f589-4842-8157-034d1e7cf3a3%26displaylang%3dzh-cn


下面是代码:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Net;
using System.IO;

namespace WindowsApplication4
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox realurl;
private System.Windows.Forms.TextBox formurl;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox formreferer;
private System.Windows.Forms.Panel panel1;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;

public Form1()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();

//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}

/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
this.formurl = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.realurl = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.formreferer = new System.Windows.Forms.TextBox();
this.panel1 = new System.Windows.Forms.Panel();
this.SuspendLayout();
//
// formurl
//
this.formurl.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.formurl.ForeColor = System.Drawing.SystemColors.WindowText;
this.formurl.Location = new System.Drawing.Point(24, 32);
this.formurl.Name = "formurl";
this.formurl.Size = new System.Drawing.Size(288, 21);
this.formurl.TabIndex = 0;
this.formurl.Text = "http://";
this.formurl.TextChanged += new System.EventHandler(this.formurl_TextChanged);
//
// label2
//
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.label2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.label2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label2.Location = new System.Drawing.Point(24, 16);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(128, 17);
this.label2.TabIndex = 2;
this.label2.Text = "输入你要获取的网址:";
this.label2.Click += new System.EventHandler(this.label2_Click);
//
// button1
//
this.button1.ForeColor = System.Drawing.Color.FromArgb(((System.Byte)(64)), ((System.Byte)(64)), ((System.Byte)(64)));
this.button1.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.button1.Location = new System.Drawing.Point(320, 32);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(56, 64);
this.button1.TabIndex = 3;
this.button1.Text = "获取…";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.label1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label1.Location = new System.Drawing.Point(24, 104);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(128, 17);
this.label1.TabIndex = 5;
this.label1.Text = "真实的网址:";
this.label1.Click += new System.EventHandler(this.label1_Click);
//
// realurl
//
this.realurl.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.realurl.ForeColor = System.Drawing.Color.OrangeRed;
this.realurl.Location = new System.Drawing.Point(24, 120);
this.realurl.Name = "realurl";
this.realurl.Size = new System.Drawing.Size(352, 21);
this.realurl.TabIndex = 4;
this.realurl.Text = "";
//
// label3
//

上一个:在asp.net中操作sql server数据库的一些小技巧
下一个:让你的.NET程序兼容不同版本的Dll文件

CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,