|
...
|
...
|
@@ -250,10 +250,13 @@ class ProofreadingController extends BaseController |
|
|
|
$context = stream_context_create($contextOptions);
|
|
|
|
$sourceCode = file_get_contents($url, false, $context);
|
|
|
|
preg_match_all($pattern, $sourceCode, $matches);
|
|
|
|
$textContentArray = array_filter($matches[1], function($item) {
|
|
|
|
return !empty(trim($item));
|
|
|
|
});
|
|
|
|
$data = array_values($textContentArray);
|
|
|
|
$textContentArray = $matches[1];
|
|
|
|
$data = [];
|
|
|
|
foreach ($textContentArray as $v){
|
|
|
|
if(!empty($v)){
|
|
|
|
$data[] = $v;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$uniqueArray = array_unique($data);
|
|
|
|
$data = array_values($uniqueArray);
|
|
|
|
return $data;
|
...
|
...
|
|