Provides various official and user-released code examples. For code reference, you are welcome to exchange and learn this section is reproduced. You can see the title and want to know the results. The result is $ money_sum .... You can donate a lot.
/**
* Calculate the total number of ThinkPHP donations
*/
$ Money_sum = 0; // total amount
$ Page_sum = 51; // the total number of pages. It is directly written if it is not automatically obtained.
For ($ j = 1; $ j <= $ page_sum; $ j ++ ){
$ Url = "http://www.thinkphp1.cn/donate/index/p/". $ j. ". html ";
$ Content_area = substr (file_get_contents ($ url), 10068 );
$ Main_area = substr ($ content_area, 0,-3970 );
Preg_match_all ('/¥ (. *) <\/span>/', $ main_area, $ money_arr );
For ($ I = 0; $ I {
$ Money_sum + = $ money_arr [1] [$ I];
}
}
Echo $ money_sum; /// 31541.05
?>
AD: truly free, domain name + VM + enterprise mailbox = 0 RMB