File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change 4
4
use \Curl \Curl ;
5
5
6
6
/**
7
- * @author webreinvent
8
- */
7
+ * @author webreinvent
8
+ */
9
9
class CMS {
10
10
11
- private $ url ;
11
+ private $ url ;
12
12
13
- public function __construct ($ url )
14
- {
15
- $ this ->url = $ url ;
16
- }
17
- //---------------------------------------------------
13
+ public function __construct ($ url )
14
+ {
15
+ $ this ->url = $ url ;
16
+ }
17
+ //---------------------------------------------------
18
18
public function detect ()
19
19
{
20
20
$ scrap = $ this ->scrap ();
21
+
21
22
if ($ scrap ['status ' ] == 'failed ' )
22
23
{
23
24
return $ scrap ;
24
25
}
25
26
26
- return $ this ->find_cms ($ scrap ['data ' ]);
27
+ return $ this ->find_cms ($ scrap ['data ' ]);
27
28
}
28
29
//---------------------------------------------------
29
30
@@ -48,7 +49,7 @@ public function scrap()
48
49
public function find_cms ($ html )
49
50
{
50
51
$ response ['data ' ]['url ' ] = $ this ->url ;
51
- if (strpos ($ html , 'wp-admin ' ) !== false )
52
+ if (strpos ($ html , 'wp-content/themes ' ) !== false )
52
53
{
53
54
$ response ['status ' ] = 'success ' ;
54
55
$ response ['data ' ]['cms ' ] = 'wordpress ' ;
You can’t perform that action at this time.
0 commit comments