Skip to content

Commit ed926e8

Browse files
committed
fixed wordpress detection
1 parent 7c5236d commit ed926e8

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

src/CMS.php

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,27 @@
44
use \Curl\Curl;
55

66
/**
7-
* @author webreinvent
8-
*/
7+
* @author webreinvent
8+
*/
99
class CMS{
1010

11-
private $url;
11+
private $url;
1212

13-
public function __construct($url)
14-
{
15-
$this->url = $url;
16-
}
17-
//---------------------------------------------------
13+
public function __construct($url)
14+
{
15+
$this->url = $url;
16+
}
17+
//---------------------------------------------------
1818
public function detect()
1919
{
2020
$scrap = $this->scrap();
21+
2122
if($scrap['status'] == 'failed')
2223
{
2324
return $scrap;
2425
}
2526

26-
return $this->find_cms($scrap['data']);
27+
return $this->find_cms($scrap['data']);
2728
}
2829
//---------------------------------------------------
2930

@@ -48,7 +49,7 @@ public function scrap()
4849
public function find_cms($html)
4950
{
5051
$response['data']['url'] = $this->url;
51-
if (strpos($html, 'wp-admin') !== false)
52+
if (strpos($html, 'wp-content/themes') !== false)
5253
{
5354
$response['status'] = 'success';
5455
$response['data']['cms'] = 'wordpress';

0 commit comments

Comments
 (0)