Acquisition of a regular solution to the great God
href= "Http://bosidengny.tmall.com/category-907362758.htm?search=y&catName=%D0%C2%C6%B7%D7%A8%C7%F8"
> New Area
href= "Http://bosidengny.tmall.com/category-907362759.htm?search=y&catName=%B1%A3%C5%AF%C9%CF%D7%B0"
> Warm Tops
Href= "Http://bosidengny.tmall.com/category-907362760.htm?search=y&parentCatId=907362759&parentCatName= %b1%a3%c5%af%c9%cf%d7%b0&catname=%bc%d9%c1%bd%bc%fe%a3%a8%b3%c4%c9%c0%c1%ec%a3%a9 "
>
Fake two pieces (shirt collar)
Href= "Http://bosidengny.tmall.com/category-907362761.htm?search=y&parentCatId=907362759&parentCatName= %b1%a3%c5%af%c9%cf%d7%b0&catname=v%c1%ec%c9%cf%d7%b0 "
>
V-neck Tops
Above is the category I match the first class classification
$DAFHT = ' #
(.*)
#iUs ';
Preg_match_all ($DAFHT, $fenlei, $dafenlei);
But the void asks the great God to answer
The primary classification is the acquisition of Category-907362761.htm, which is the numeric ID and the following name
Level two classification acquisition category-907362761.htm parentcatid=907362759 These two numeric IDs and the names that follow
How to write the card master half a day to find answers
------to solve the idea----------------------
Why bother writing this? The site changes slightly, Kung fu is wasted
There are many simple and practical tools on the Internet, why not?
Like this one.
$s =<<< TXT
href= "Http://bosidengny.tmall.com/category-907362758.htm?search=y&catName=%D0%C2%C6%B7%D7%A8%C7%F8"
> New Area
href= "Http://bosidengny.tmall.com/category-907362759.htm?search=y&catName=%B1%A3%C5%AF%C9%CF%D7%B0"
> Warm Tops
Href= "Http://bosidengny.tmall.com/category-907362760.htm?search=y&parentCatId=907362759&parentCatName= %b1%a3%c5%af%c9%cf%d7%b0&catname=%bc%d9%c1%bd%bc%fe%a3%a8%b3%c4%c9%c0%c1%ec%a3%a9 "
>
Fake two pieces (shirt collar)
Href= "Http://bosidengny.tmall.com/category-907362761.htm?search=y&parentCatId=907362759&parentCatName= %b1%a3%c5%af%c9%cf%d7%b0&catname=v%c1%ec%c9%cf%d7%b0 "
>
V-neck Tops
TXT;
Include ' simple_html_dom.php ';
$p = new Simple_html_dom;
$p->load ($s);
foreach ($p->find (' a ') as $v) {
echo $v->class, Php_eol; This is a class of classes that can be distinguished
Echo $v->href,php_eol; This is the URL
Echo Trim ($v->innertext ()), Php_eol; This is the explanatory text
}
Http://bosidengny.tmall.com/category-907362758.htm?search=y&catName=%D0%C2%C6%B7%D7%A8%C7%F8
Cat-name Fst-cat-name
Http://bosidengny.tmall.com/category-907362759.htm?search=y&catName=%B1%A3%C5%AF%C9%CF%D7%B0
Warm jacket
Cat-name Snd-cat-name
Http://bosidengny.tmall.com/category-907362760.htm?search=y&parentCatId=907362759&parentCatName=%B1%A3 %c5%af%c9%cf%d7%b0&catname=%bc%d9%c1%bd%bc%fe%a3%a8%b3%c4%c9%c0%c1%ec%a3%a9
Fake two pieces (shirt collar)
Cat-name Snd-cat-name
Http://bosidengny.tmall.com/category-907362761.htm?search=y&parentCatId=907362759&parentCatName=%B1%A3 %c5%af%c9%cf%d7%b0&catname=v%c1%ec%c9%cf%d7%b0
V-neck Tops