Files
willysr f6bd48fbf5
Deploy PHP App / deploy (push) Successful in 2m10s
remove qotd.
Signed-off-by: Willy Sudiarto Raharjo <willysr@staff.ukdw.ac.id>
2026-08-26 15:43:53 +07:00

16 lines
582 B
PHP

<?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>";
}
?>