First Commit

This commit is contained in:
Willy Sudiarto Raharjo
2012-06-10 17:59:13 +07:00
commit b61a42ed9c
27 changed files with 1973 additions and 0 deletions
+17
View File
@@ -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>