拍拍帐号信息查询PHP
程序员文章站
2024-01-10 15:46:58
...
一个用于查询拍拍帐号信息的小程序,初学php写的比较烂。
1 load($result); 35 36 //卖家资料 37 $ele = $html->find('div[class=name]'); 38 if($ele == null){ 39 echo ""; 40 } 41 42 $info_detail['nick'] = $ele[0]->next_sibling()->plaintext; 43 $info_detail['area'] = $ele[1]->next_sibling()->plaintext; 44 $info_detail['time'] = $ele[2]->next_sibling()->plaintext; 45 46 //店铺综合评分 47 $colligation_score['score'] = $html->find('div[class=score module] h1 span.times strong', 0)->plaintext; 48 $ele = $html->find('div[class=score module] div.nav ul li'); 49 $colligation_score['conform'] = $ele[0]->children[1]->children[0]->plaintext; 50 $colligation_score['attitude'] = $ele[1]->children[1]->children[0]->plaintext; 51 $colligation_score['delivery speed'] = $ele[2]->children[1]->children[0]->plaintext; 52 53 54 //店铺近30天服务状况 55 $ele = $html->find('div[class=score module shop_about] div div ul li'); 56 $service_status['backmoney speed'] = $ele[0]->children[1]->children[0]->plaintext; 57 $service_status['backmoney rate'] = $ele[1]->children[1]->children[0]->plaintext; 58 $service_status['complaint handing speed'] = $ele[2]->children[1]->children[0]->plaintext; 59 $service_status['complaint rate'] = $ele[3]->children[1]->children[0]->plaintext; 60 61 62 //投诉率 63 $ele = $html->find('div[class=center_block small_table] div[class=score module shop_about] div ul li'); 64 $comp_rate['commercial quality'] = $ele[0]->children[1]->children[0]->plaintext; //商品质量原因 65 $comp_rate['stockout'] = $ele[1]->children[1]->children[0]->plaintext; //缺货原因 66 $comp_rate['attitude'] = $ele[2]->children[1]->children[0]->plaintext; //服务态度原因 67 $comp_rate['delivery speed'] = $ele[3]->children[1]->children[0]->plaintext; //发货速度原因 68 69 //退款率 70 $ele = $html->find('div[class=center_block small_table refund] div[class=score module shop_about] div ul li'); 71 $refund_rate['commercial quality'] = $ele[0]->children[1]->children[0]->plaintext; 72 $refund_rate['stockout'] = $ele[1]->children[1]->children[0]->plaintext; 73 $refund_rate['attitude'] = $ele[2]->children[1]->children[0]->plaintext; 74 75 //店铺信用率 76 $ele = $html->find('div[class=score module shop_score] h1.title', 0); 77 if($ele != null) { 78 $is_display_credit = true; 79 $credit_score = $ele->children[2]->score; 80 $reputation_rate = $ele->children[3]->children[0]->plaintext; 81 82 $ele = $html->find('div[class=score module shop_score] div.table table tr'); 83 $last_week['good'] = $ele[1]->children[1]->innertext; 84 $last_week['average'] = $ele[1]->children[2]->innertext; 85 $last_week['fail'] = $ele[1]->children[3]->innertext; 86 87 $last_month['good'] = $ele[2]->children[1]->innertext; 88 $last_month['average'] = $ele[2]->children[2]->innertext; 89 $last_month['fail'] = $ele[2]->children[3]->innertext; 90 91 $last_six_months['good'] = $ele[3]->children[1]->innertext; 92 $last_six_months['average'] = $ele[3]->children[2]->innertext; 93 $last_six_months['fail'] = $ele[3]->children[3]->innertext; 94 95 $total['good'] = $ele[4]->children[1]->innertext; 96 $total['average'] = $ele[4]->children[2]->innertext; 97 $total['fail'] = $ele[4]->children[3]->innertext; 98 } 99 100 $html->clear();101 102 103 104 }105 106 ?>107 108 109 110 111112拍拍帐号信息查询 113 114 210 211 212 213 214215 219220 221 222223277 278 279