Developing the MP3 Thief program under ASP.

Source: Internet
Author: User

Developing the MP3 Thief program under ASP.


MP3 resources are on the Internet, sometimes can not hear is normal, but most of the bad use, it is very useful. Careful analysis of its source code, the original is read directory under the 1.xml,2.xml. 4.xml file. I often listen to the song in the Tomato Garden, that is http://www.tomatolei.com, I would like to be able to put the tomato MP3 resources here to put it? Isn't that what everyone often says about the function of MP3 thieves? Do what you say!

1, analysis of the Tomato Garden song Source: pageurl = "http://tomatolei.com/bbs/T_playlist.asx";

2. Target Address: 1.xml

3, using the program conversion format:

Front desk:

<%@ page language= "C #" codebehind= "ReadAndWriteXml.aspx.cs" autoeventwireup= "false" inherits= " Read the mp3.readandwritexml of Tomato Garden "validaterequest=false%>
! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 transitional//en" >
<HTML>
<HEAD>
<title> read the tomato garden MP3 list </title>
<meta content= "Microsoft Visual Studio. NET 7.1" Name= "GENERATOR" >
<meta content= "C #" Name= "Code_language" >
<meta content= "JavaScript" Name= "vs_defaultClientScript" >
<meta content= ">
</HEAD>
<body ms_positioning= "GridLayout" >
<form id= "Form1" method= "POST" runat= "Server" >
<font face= "Song Body" >
<asp:textbox id= "TextBox1" style= "Z-INDEX:101; left:56px; Position:absolute; top:32px "runat=" Server "
Width= "312px" height= "240px" textmode= "MultiLine" > </asp:TextBox>
<asp:button id= "Button1" style= "z-index:102; left:160px; Position:absolute; top:288px "runat=" Server "
Width= "96px" text= "correction ~" > </asp:Button> </FONT> </form>
</body>
</HTML>
Background:

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.IO;
using System.Net;
using System.Text;
using System.Text.RegularExpressions;
Namespace Read the MP3 of the tomato garden
{
//


//WebForm1 Summary description.
//
public class ReadAndWriteXml:System.Web.UI.Page
{
Protected System.Web.UI.WebContro Ls. TextBox TextBox1;
protected System.Web.UI.WebControls.Button Button1;
private String pageurl = "";

private void Page_Load (object sender, System.EventArgs e)
{
Place user code here to initialize page
if (! IsPostBack)
{
First read the Acx file in Tomato Garden (http://tomatolei.com/bbs/T_playlist.asx)
///
Pageurl = "http://tomatolei.com/bbs/T_playlist.asx";
WebClient WC = new WebClient ();
Wc. Credentials = CredentialCache.DefaultCredentials;
byte[] Pagedata = WC. Downloaddata (Pageurl);
String Result = Encoding.Default.GetString (pagedata);
Textbox1.text=result;

}
}

#region the code generated by the Web Forms Designer
Override protected void OnInit (EventArgs e)
{
//
CODEGEN: This call is required for the ASP. NET Web Forms Designer.
//
InitializeComponent ();
Base. OnInit (e);
}


The designer supports the required method-do not use the Code editor to modify
The contents of this method.

private void InitializeComponent ()
{
This. Button1.Click + = new System.EventHandler (this. Button1_Click);
This. Load + = new System.EventHandler (this. Page_Load);
}
#endregion

private void Button1_Click (object sender, System.EventArgs e)
{
String Temp=textbox1.text;
textbox1.text= " ";
Textbox1.text+=temp;

Textbox1.text=textbox1.text.replace (" ", "");
Textbox1.text=textbox1.text.replace (" ", "");
Textbox1.text=textbox1.text.replace (" ", "");

Textbox1.text=textbox1.text.replace ("", "");
Textbox1.text=textbox1.text.replace (" ", "");

Textbox1.text=textbox1.text.replace ("", " Textbox1.text=textbox1.text.replace ("", "\" ");

Textbox1.text=textbox1.text.replace ("

textbox1.text+= "";

//textbox1.text=textbox1.text.replace ("\ r \ n", "");
///below to start generating 1.xml files
/// 
StreamWriter swfromfilestreamutf8buffer=new StreamWriter (Server.MapPath ("./") + "1.xml", false,system.text.encoding.utf8,512);
Swfromfilestreamutf8buffer.write (TextBox1.Text);
Swfromfilestreamutf8buffer.flush ();
Swfromfilestreamutf8buffer.close ();
}
}
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.