| This article introduces, using PHP to get Baidu included, as well as Baidu snapshot time of a piece of code, there is a need for friends, make a reference bar. PHP code to implement the query Baidu included the situation and Baidu snapshot time. Code:
(. *) <\/span>/"; /* String to match the snapshot date */$times = "/\d{4}-\d{1,2}-\d{1,2}/"; /* Regular expressions that match the snapshot date, such as: 2011-8-4*/$s 0 = @file_get_contents ($all); /* Place Site:www.ninthday.net's Web page into the $s0 string */$s 1 = @file_get_contents ($today); Preg_match ($utf _pattern, $s 0, $all _num); /* Match "find related results *" * * * Preg_match ($utf _pattern, $s 1, $today _num); Preg_match ($kz _pattern, $s 0, $temp); Preg_match ($times, $temp [0], $screenshot); if ($all _num[1] = = "") $all _num[1] = 0; if ($today _num[1] = = "") $today _num[1] = 0; if ($screenshot [0] = = "") $screenshot [0] = "no snapshot";? > <title>Baidu included and Baidu snapshot time-bbs.it-home.org</title>
| Date |
Baidu included |
Baidu today included |
Baidu Snapshot Date |
| |
|
|
|
Baidu included: "target=" _blank ">
Baidu today included: "target=" _blank ">
Baidu Snapshot Date: ">
|