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

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

更新时间:2006年09月28日 00:00:00   作者:

软件下载:

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

{

///

/// Form1 的摘要说明。

///

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;

///

/// 必需的设计器变量。

///

private System.ComponentModel.Container components = null;

public Form1()

{

//

// Windows 窗体设计器支持所必需的

//

InitializeComponent();

//

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

//

}

///

/// 清理所有正在使用的资源。

///

protected override void Dispose( bool disposing )

{

if( disposing )

{

if (components != null)

{

components.Dispose();

}

}

base.Dispose( disposing );

}

#region Windows 窗体设计器生成的代码

///

/// 设计器支持所需的方法 - 不要使用代码编辑器修改

/// 此方法的内容。

///

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

//

this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));

this.label3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;

this.label3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));

this.label3.Location = new System.Drawing.Point(24, 56);

this.label3.Name = "label3";

this.label3.Size = new System.Drawing.Size(128, 17);

this.label3.TabIndex = 7;

this.label3.Text = "伪装来路:";

//

// formreferer

//

this.formreferer.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;

this.formreferer.Location = new System.Drawing.Point(24, 72);

this.formreferer.Name = "formreferer";

this.formreferer.Size = new System.Drawing.Size(288, 21);

this.formreferer.TabIndex = 6;

this.formreferer.Text = "http://";

//

// panel1

//

this.panel1.BackColor = System.Drawing.Color.LightGray;

this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;

this.panel1.Location = new System.Drawing.Point(18, 13);

this.panel1.Name = "panel1";

this.panel1.Size = new System.Drawing.Size(364, 130);

this.panel1.TabIndex = 8;

//

// Form1

//

this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);

this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));

this.ClientSize = new System.Drawing.Size(392, 165);

this.Controls.Add(this.label3);

this.Controls.Add(this.formreferer);

this.Controls.Add(this.label1);

this.Controls.Add(this.realurl);

this.Controls.Add(this.button1);

this.Controls.Add(this.label2);

this.Controls.Add(this.formurl);

this.Controls.Add(this.panel1);

this.Name = "Form1";

this.Text = "取得真实URL -- 落伍的caixi www.im286.com";

this.Load += new System.EventHandler(this.Form1_Load);

this.ResumeLayout(false);

}

#endregion

///

/// 应用程序的主入口点。

///

[STAThread]

static void Main()

{

Application.Run(new Form1());

}

private void Form1_Load(object sender, System.EventArgs e)

{

}

private void label2_Click(object sender, System.EventArgs e)

{

}

private void button1_Click(object sender, System.EventArgs e)

{

string Theurl=formurl.Text;

string Referurl=formreferer.Text;

if (Theurl.Length<10)

{

MessageBox.Show("兄弟,URL不正确吧","URL不正确");

formurl.Focus();

}

else

{

HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create(Theurl);

myReq.Referer=Referurl;

HttpWebResponse myres=(HttpWebResponse)myReq.GetResponse();

bool hasChanged = (myReq.RequestUri != myReq.Address);

string geturl;

if (hasChanged){

geturl=myReq.Address.ToString();

}

else{

geturl=myReq.RequestUri.ToString();

}

realurl.Text=geturl;

realurl.Focus();

}

}

private void label1_Click(object sender, System.EventArgs e)

{

}

private void formurl_TextChanged(object sender, System.EventArgs e)

{

}

}

}

相关文章

1a1b05c64693fbf380aa1344a7812747.png

本篇文章主要介绍了微信公众平台开发教程(八)Session处理 ,小编觉得挺不错的,现在分享给大家,也给大家做个参考。2016-12-12

4f55910a645b073bc4fc65dc10dc14bd.png

这篇文章主要介绍了微信JS-SDK分享功能的.Net实现代码的相关资料,需要的朋友可以参考下2017-09-09

0ea3c7666119d5615e582f823fb3fad6.png

前两天看了一个自定义分页控件,和AspNetPager一样是实现IPostBackEventHandler接口,不过简洁许多,就想能不能实现ICallbackEventHandler接口做到无刷新分页呢?想到了就马上去做,终于,设想变成了现实!!2010-03-03

4f96a78db829b1556ff16de21e013c7a.png

下面小编就为大家带来一篇基于localStorge开发登录模块的记住密码与自动登录实例。小编觉得挺不错的,现在就分享给大家,也给大家做个参考。一起跟随小编过来看看吧2017-08-08

8cc1031babc6aff2319f1c6af8544aa0.png

分块编码 ( chunked encoding )就是让 response 分块编码进行传输。response 分块编码,可以先传输一部分不需要处理的 html 代码到客户端,等其他耗时代码执行完毕后再传输另外的 html 代码。2010-06-06

0c932a99bb7b6f23c937db507070cc7b.png

这篇文章主要介绍了.net自定义事件示例,代码实现了热水器加热,报警器监控,当热水温度达到80度的时候报警器报警这样一个简单的事件处理程序,需要的朋友可以参考下2014-03-03

cca732bf65a93ed2ec0ac80c638460fe.png

这篇文章主要给大家介绍了关于.NET Core控制台应用程序如何使用异步(Async)Main方法的相关资料,文中通过图文介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧2018-07-07

2d9f31f2af7b675a3d153d2b7f1035a7.png

这篇文章主要介绍了Asp.net Core 3.1基于AspectCore实现AOP实现事务、缓存拦截器功能,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下2020-12-12

b452cee8ec5cd9e58ab98eba17281e59.png

这篇文章主要介绍了ASP.NET连接数据库并获取数据方法,结合实例分析总结了ASP.NET连接数据库及获取数据的相关实现技巧,并附带了web.config配置文件的使用方法与相关注意事项,需要的朋友可以参考下2015-11-11

f4838ec7e2d4da28e0b57d4e852dadd4.png

这篇文章主要给大家介绍了关于ASP.NET MVC如何使用Unity实现Ioc的相关资料,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧2018-07-07

最新评论

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
提供的源码资源涵盖了安卓应用、小程序、Python应用和Java应用等多个领域,每个领域都包含了丰富的实例和项目。这些源码都是基于各自平台的最新技术和标准编写,确保了在对应环境下能够无缝运行。同时,源码中配备了详细的注释和文档,帮助用户快速理解代码结构和实现逻辑。 适用人群: 这些源码资源特别适合大学生群体。无论你是计算机相关专业的学生,还是对其他领域编程感兴趣的学生,这些资源都能为你提供宝贵的学习和实践机会。通过学习和运行这些源码,你可以掌握各平台开发的基础知识,提升编程能力和项目实战经验。 使用场景及目标: 在学习阶段,你可以利用这些源码资源进行课程实践、课外项目或毕业设计。通过分析和运行源码,你将深入了解各平台开发的技术细节和最佳实践,逐步培养起自己的项目开发和问题解决能力。此外,在求职或创业过程中,具备跨平台开发能力的大学生将更具竞争力。 其他说明: 为了确保源码资源的可运行性和易用性,特别注意了以下几点:首先,每份源码都提供了详细的运行环境和依赖说明,确保用户能够轻松搭建起开发环境;其次,源码中的注释和文档都非常完善,方便用户快速上手和理解代码;最后,我会定期更新这些源码资源,以适应各平台技术的最新发展和市场需求。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值