PHP Implementation Capture program principle and simple sample code _php tutorial

Source: Internet
Author: User

I Believe in Love
Bluetooth Music Network-8391.com
Bluetooth Music Network-8391.com








Confirm Useful data:
Song name: I Believe in love
Singer: the Champs
Song Path: http://218.78.213.183:880/daolianmtvfuc__________________kkkkkkkkkk//shela_believe.wmv
We can only get the above data in the Thief program.
3, PHP code writing
Php: /********
Description, simplified for the program, the entire program does not use regular expressions
(I myself to this aspect also very smelly, hehe, master don't scold)
****/
Define a function, simple filtering of characters

function str ($txt) {
$txt = Str_replace ("'", "'", $txt);
$txt = Str_replace ("\" "," \ \ "", $txt);
return $txt;
}
Initialization 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 future changes to the address, the address of the front of the same extract
$host = "http://218.78.213.183:880/daolianmtvfuc__________________kkkkkkkkkk/";
if (! $action) {
echo "Click here to start";
Die ();
}else{
$end =3488;//End ID
if (! $id ││ $id <1) $id =1;//default ID number
$url = "http://mtv.8391.com/Yxwen.asp?id=". $id;
$str = @file_get_contents ($url);//Read page code
if ($STR) {
Use key characters to split code
$a 1=explode ("value=\" ", $str);//value=\" to split the character
Take the singer's name
$n 1=explode ("\" ", $a 1[1]);
$ges =str (Trim ($n 1[0));
Take song name
$g 1=explode ("\" ", $a 1[3]);
$name =str (Trim ($g 1[0));
Take the song address
$h 1=explode ("href=\", $str);
$h 2=explode ("\" ", $h 1[1]);
$mtvurl = str (str_replace ($host, "", Trim ($h 2)));
Add a Database
/********
According to their own procedures, the appropriate add
********/

}
$id + +;
if ($id <= $end) {echo "Cleck here";
echo " ";}
Elsedie ("program runing");
}
?>

http://www.bkjia.com/PHPjc/318135.html www.bkjia.com true http://www.bkjia.com/PHPjc/318135.html techarticle entryskipifref= "YES" titleibelieveinlove/title author Bluetooth music network -8391.com/author copyright Bluetooth Music Network -8391.com/copyright refhref= "http://218.78.213.183:880/daolianmtvfuc____ ...

  • Related Article

    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.