zhangdehua 1 vuosi sitten
vanhempi
commit
35aea03bc2
1 muutettua tiedostoa jossa 13 lisäystä ja 0 poistoa
  1. 13 0
      app/index/controller/User.php

+ 13 - 0
app/index/controller/User.php

@@ -676,4 +676,17 @@ class User extends Controller
         return $this->renderSuccess([], 'Successful!');
     }
 
+    public function genArticles()
+    {
+        $f = file_get_contents('https://www.e-cigarette-forum.com/forums/e-cigarette-news.629/');
+        //$f = file_get_contents('https://www.e-cigarette-forum.com/threads/fda-commissioner-denigrates-tobacco-harm-reduction.984710/');
+        $preg = '/<div class=\"structItem-title\" uix-href=\".?/\">/';
+        $matches = [];
+        preg_match($preg,$f,$matches);
+        dd($matches);
+
+        file_put_contents('a.html',$f);
+        dd($f);
+    }
+
 }