Principles and simple sample code of the PHP collection program

Source: Internet
Author: User

<Entry SKIPIFREF = "YES">
<Title> I Believe In Love </title>
<Author> Bluetooth Music Network-8391.com</author>
<Copyright> Bluetooth Music Network-8391.com</copyright>
<Ref href = "http: // 218.78.213.183: 880/daolianmtvfuc __________________ kkkkkkkkk // shela_believe.wmv"/>
<Param name = "Artist" value = ""/>
<Param name = "Album" value = "Bluetooth Music Network-8391.com"/>
<Param name = "Title" value = "I Believe In Love"/>
</ENTRY>

</ASX>

Confirm useful data:
Song name: I Believe In Love
Artist: Karla
Song path: http: // 218.78.213.183: 880/daolianmtvfuc ______________ kkkkkkkkkk // shela_believe.wmv
We only need to get the above data in the thief program.
3. PHP code writing
PHP: <?
/********
Note: The program is simple and the whole program does not use regular expressions.
(I am also very bad at this aspect. Oh, don't scold me)
****/
// Define a function to simply filter characters

Function str ($ txt ){
$ Txt = str_replace ("'", "'", $ txt );
$ Txt = str_replace ("\" "," \ "", $ txt );
Return $ txt;
}
// Initialize the program
$ Magic_quotes_gpc = get_magic_quotes_gpc ();
$ Register_globals = @ ini_get ('register _ globals ');
If (! $ Register_globals │! $ Magic_quotes_gpc ){
@ Extract (daddslashes ($ HTTP_POST_VARS ));
@ Extract (daddslashes ($ HTTP_GET_VARS ));
If (! $ Register_globals ){
Foreach ($ HTTP_POST_FILES as $ key => $ val ){
$ Key = $ val ['tmp _ name'];
$ {$ Key. '_ name'} = $ val ['name'];
$ {$ Key. '_ size'} = $ val ['SIZE'];
$ {$ Key. '_ type'} = $ val ['type'];
}
}
}
If (function_exists ('set _ time_limit ') = 1 & @ ini_get ('safe _ mode') = 0 ){
@ Set_time_limit (1000 );
}
// End
// To prevent the recipient from modifying the address in the future, extract the same address from the front.
$ Host = "http: // 218.78.213.183: 880/daolianmtvfuc ______________ kkkkkkkkkk /";
If (! $ Action ){
Echo "<a href = \" t. php? Action = start \ "> click here to start </a> ";
Die ();
} Else {
$ End = 3488; // end ID
If (! $ Id │ $ id <1) $ id = 1; // default ID
$ Url = "http://mtv.8391.com/Yxwen.asp? Id = ". $ id;
$ Str = @ file_get_contents ($ url); // read the Page code
If ($ str ){
// Use key characters to separate code
$ A1 = explode ("value = \" ", $ str); // value = \" to separate characters
// Name the singer
$ N1 = explode ("\" ", $ a1 [1]);
$ Ges = str (trim ($ n1 [0]);
// Obtain the song name
$ G1 = explode ("\" ", $ a1 [3]);
$ Name = str (trim ($ g1 [0]);
// Obtain the song address
$ H1 = explode ("href = \" ", $ str );
$ H2 = explode ("\" ", $ h1 [1]);
$ Mtvurl = str (str_replace ($ host, "", trim ($ h2 )));
// Add a database
/********
You can add
********/

}
$ Id ++;
If ($ id <= $ end) {echo "<a href = t. php? Id = $ id> cleck here </a> ";
Echo "<meta http-equiv = \" refresh \ "content = \" 0; url = t. php? Id = $ id \ "> ";}
Elsedie ("program runing over ");
}
?>

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.