File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 4
4
$ user_path_2 = $ _POST ["user_path_2 " ]??'' ;
5
5
$ arr_data = $ _POST ["arr_data " ]??'' ;
6
6
$ scheme = $ _POST ["scheme " ]??'' ;
7
+ $ scheme2 = $ _POST ["scheme2 " ]??'' ;
7
8
if (strlen ($ user_path_1 )>100 ||strlen ($ user_path_2 )>40 ) {
8
9
die ("Path or suffix's length has exceeded! " );
9
10
} else if (empty ($ arr_data )) {
14
15
} else {
15
16
$ pattern = "/.+>.*[' \"](\S+)[' \"].*\/\/(.*)/ " ;
16
17
}
18
+ if ($ scheme2 == '' ){
19
+ $ arr_data = preg_replace ("/.*\/\/.+>.+/ " ,'' ,$ arr_data );
20
+ $ arr_data = preg_replace ("/.*#.+>.+/ " ,'' ,$ arr_data );
21
+ $ arr_data = preg_replace ("/.*\/\*.+>[^\*]+\*\// " ,'' ,$ arr_data );
22
+ } else {
23
+ $ arr_data = str_replace ('*/ ' ,'' ,$ arr_data );
24
+ }
17
25
if (preg_match_all ($ pattern ,$ arr_data ,$ matches )){
18
26
for ($ i = 0 ; $ i < count ($ matches [1 ]); $ i ++){
19
27
echo $ matches [2 ][$ i ].', ' .$ user_path_1 .$ matches [1 ][$ i ].$ user_path_2 .PHP_EOL ;
You can’t perform that action at this time.
0 commit comments