mirror of https://github.com/helloxz/onenav.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
569 B
24 lines
569 B
<?php |
|
$content = file_get_contents('./bookmarks_2021_4_8.html'); |
|
|
|
$pattern = "/<A.*<\/A>/i"; |
|
|
|
preg_match_all($pattern,$content,$arr); |
|
|
|
foreach( $arr[0] as $link ) |
|
{ |
|
//var_dump($link); |
|
#$pattern = "/href=\"(.*)\"? ADD_DATE/i"; |
|
$pattern = "/http.*\"? ADD_DATE/i"; |
|
preg_match($pattern,$link,$urls); |
|
$url = str_replace('" ADD_DATE','',$urls[0]); |
|
$pattern = "/>.*<\/a>$/i"; |
|
preg_match($pattern,$link,$titles); |
|
|
|
$title = str_replace('>','',$titles[0]); |
|
$title = str_replace('</A','',$title); |
|
//echo $url; |
|
//exit; |
|
echo $title.' - '.$url."<br />"; |
|
//echo 'dsd'; |
|
} |