예제 #1
0
파일: index.php 프로젝트: Annon201/IML
<?php

include_once 'legal.php';
list($id, $title, $descr) = isMileyLegal();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Refresh" content="60" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="alternate" title="Is Miley legal?" href="http://www.ismileylegal.com/rss.xml" type="application/rss+xml" />
<title>Is Miley Legal?</title>
<style type="text/css">
<!--
body {
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	overflow: hidden;
}
#container {
	width: 600px;
	height: auto;
	margin: 150px auto;
	padding: 0;
	overflow: hidden;
}
#container h1 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 96pt;
예제 #2
0
파일: rss.php 프로젝트: Annon201/IML
<?php

include_once 'legal.php';
header('Content-type: application/rss+xml');
echo '<?xml version="1.0"?>' . "\n";
echo '<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">' . "\n";
echo "\t<channel>\n";
echo "\t\t<title>Is Miley legal?</title>\n";
echo "\t\t<link>http://www.ismileylegal.com/</link>\n";
echo "\t\t<description>Is Miley Cyrus of legal age in Australia?</description>\n";
echo "\t\t<language>en-us</language>\n";
echo "\t\t" . '<atom:link href="http://www.ismileylegal.com/rss.xml" rel="self" type="application/rss+xml" />' . "\n";
$today = currentDateTime();
$checkdate = createDateTime($today->format('Y'), $today->format('m'), $today->format('d'), 6, 0, 0);
for ($x = 0; $x < 20; $x++, $checkdate->modify("-1 day")) {
    list($id, $title, $descr) = isMileyLegal($checkdate, true);
    echo "\t\t\n";
    echo "\t\t<item>\n";
    echo "\t\t\t<title>{$title}</title>\n";
    echo "\t\t\t<description>{$descr}</description>\n";
    echo "\t\t\t<link>http://www.ismileylegal.com/#{$id}</link>\n";
    echo "\t\t\t<guid>http://www.ismileylegal.com/#{$id}</guid>\n";
    echo "\t\t\t<pubDate>" . $checkdate->format("r") . "</pubDate>\n";
    echo "\t\t</item>\n";
}
echo "\t\t\n";
echo "\t</channel>\n";
echo "</rss>";