Skip to content
This repository was archived by the owner on Mar 7, 2018. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions opml.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,23 @@ class OPML {
var $_links = array();

function OPML($file) {
$this->file = $file;
$this->file = $file;
}

function parseOPMLtoArray() {
$parser = xml_parser_create();
$data = implode('', file($this->file));
xml_parse_into_struct($parser,$data,$d_ar,$i_ar);
$data = implode('', file($this->file));

xml_parse_into_struct($parser, $data, $d_ar, $i_ar);

foreach($d_ar as $element) {
if($element['tag'] == 'OUTLINE') {
foreach ($d_ar AS $element)
if ($element['tag']=='OUTLINE')
$feeds[] = $element['attributes'];
}
}

$this->feeds = $feeds;
}

function load() {
echo "<a href=\"$path_to_opml/". basename($this->file) . "\">Download OPML File</a>";
echo '<a href="$path_to_opml/'.basename($this->file).'">Download OPML File</a>';
}
}
?>
}