function add_OPML_feeds($file_name) { $content_set = file($file_name); if (!$content_set) { $this->error(sprintf(AMP_TEXT_ERROR_OPEN_FAILED, $file_name)); return false; } $feeds = fof_opml_to_array(join("", $content_set)); return $this->_subscribe_feeds($feeds); }
fof_add_feed($url); } if ($opml) { if (!($content_array = file($opml))) { echo "Cannot open {$opml}<br>"; return false; } $content = implode("", $content_array); $feeds = fof_opml_to_array($content); } if ($_FILES['opml_file']['tmp_name']) { if (!($content_array = file($_FILES['opml_file']['tmp_name']))) { echo "Cannot open uploaded file<br>"; return false; } $content = implode("", $content_array); $feeds = fof_opml_to_array($content); } foreach ($feeds as $feed) { fof_add_feed($feed); echo "<hr size=1>"; flush(); } ?> <BR> <a href="view.php">Return to new items.</a> </body> </html>