-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathb2npp.php
More file actions
48 lines (47 loc) · 1.04 KB
/
Copy pathb2npp.php
File metadata and controls
48 lines (47 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
$str = file_get_contents('https://maxcdn.bootstrapcdn.com/bootstrap/latest/css/bootstrap.css');
$str=substr($str,strpos($str,'LICENSE'));
$tmp_str='';
$stopAdding=false;
for($i=0;$i<strlen($str);$i++)
{
if($str[$i]=="{")
$stopAdding=true;
if($str[$i]=="}")
{
$stopAdding=false;
continue;
}
if(!$stopAdding)
{
$tmp_str.=$str[$i];
}
}
$str=$tmp_str;
$num=-1;
for($i=0;$i<strlen($str);$i++)
{
$started=false;
if($str[$i]!="." && $str[$i]!="#" && !$started)
continue;
$started=true;
$tmp_str='';
while($str[$i+1]!="," && $str[$i+1]!="{" && $str[$i+1]!="}" && $str[$i+1]!=":" && $str[$i+1]!=" "){
$i++;
$tmp_str.=$str[$i];
}
if(strpos($tmp_str,'['))
$tmp_str=substr($tmp_str,0,strpos($tmp_str,'['));
$tmp_str=str_replace('.',"\"/><br><KeyWord name=\"",$tmp_str);
$tmp_str=str_replace(')','',$tmp_str);
$all_str[$num]=$tmp_str;
$num++;
$started=false;
}
$all_str=array_unique($all_str);
foreach($all_str as $a)
{
if($a!="")
echo "<KeyWord name=\"".$a."\" /><br>";
}
?>