作者 邓超

x

@@ -33,6 +33,7 @@ class HotMail { @@ -33,6 +33,7 @@ class HotMail {
33 */ 33 */
34 private $db; 34 private $db;
35 35
  36 + private $back = [];
36 37
37 /** 38 /**
38 * @author:dc 39 * @author:dc
@@ -65,6 +66,16 @@ class HotMail { @@ -65,6 +66,16 @@ class HotMail {
65 } 66 }
66 } 67 }
67 68
  69 + // 黑名单
  70 + if(!empty($this->back)&&is_array($this->back)){
  71 + foreach ($this->back as $item){
  72 + if(!$this->db->count("select count(*) from `ai_black_email` where ".dbWhere(['email'=>$e]))){
  73 + echo '插入数据 '.$e."\n";
  74 + $this->db->insert('ai_black_email',['email'=>$e],false);
  75 + }
  76 + }
  77 + }
  78 +
68 } 79 }
69 80
70 81
@@ -104,6 +115,9 @@ class HotMail { @@ -104,6 +115,9 @@ class HotMail {
104 if($data){ 115 if($data){
105 $data = @json_decode($data,1); 116 $data = @json_decode($data,1);
106 if($data && isset($data['data']) && is_array($data['data'])){ 117 if($data && isset($data['data']) && is_array($data['data'])){
  118 + if(!empty($data['back'])){
  119 + $this->back = [];
  120 + }
107 return $data['data']; 121 return $data['data'];
108 } 122 }
109 } 123 }