Пример #1
0
<?php

include 'app.php';
$articleQuery = $_SERVER['QUERY_STRING'];
$BMXML = new BMXML('http://feeds.lexblog.com/WormsAndGermsBlog.rss');
$articleId = $BMXML->whatsMyID($articleQuery);
$article = $BMXML->getArticle($articleId);
?>


<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title><?php 
echo $article['title'];
?>
</title>
</head>
<body>
    <h1><?php 
echo $article['title'];
?>
</h1>
    
    <div class="body">
        <?php 
echo $article['body'];
?>
        
    </div>
Пример #2
0
            margin: 0 auto;
        }
        
        .primary-image {
            width: 50%;
            margin: 0 auto;
            display: block;
        }
    </style>
    
</head>
<body>
    <?php 
include 'app.php';
$xml = 'http://feeds.lexblog.com/WormsAndGermsBlog.rss';
$BMXML = new BMXML($xml);
?>
    
    <div class="container">
        <h1>Rss Feed</h1>
        
        
        <ul>
            <?php 
$articles = $BMXML->filteredList(['title', 'vlink'], 1);
for ($i = 0; $i < count($articles[0]); $i++) {
    ?>
                    <li>
                        <a href="/article.php?<?php 
    echo $articles[1][$i];
    ?>