First Commit
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
<div class="quotes">
|
||||
<?php
|
||||
$url = "http://feeds.feedburner.com/quotationspage/qotd";
|
||||
if ($url)
|
||||
{
|
||||
do
|
||||
{
|
||||
$x = rand(0,10);
|
||||
$xml = new SimpleXMLElement($url, NULL, TRUE);
|
||||
} while (!$xml && trim($xml->channel->item[$x]->description) == "");
|
||||
$string = trim(preg_replace("/<p>(.*)/", "", $xml->channel->item[$x]->description));
|
||||
$string = trim(preg_replace("/<a href(.*)<\/p>/", "", $string));
|
||||
$string = preg_replace("/\"/", "", $string);
|
||||
echo trim($string) . "<br/>(" . $xml->channel->item[$x]->title . ")<br/>Source: <a href=\"http://www.quotationspage.com/\">QuotationsPage</a>";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
Reference in New Issue
Block a user