colonymech / docs / www / colonyscout / index2.php @ f59acf11
History | View | Annotate | Download (2.79 KB)
1 |
<?php
|
---|---|
2 |
$cacheFile="cache/index.html"; |
3 |
if (file_exists($cacheFile)) //we can read this cache file back reduce database load |
4 |
{ |
5 |
header("Content-Type: text/html"); |
6 |
readfile($cacheFile); |
7 |
exit;
|
8 |
} else {
|
9 |
ob_start(); //start buffering so we can cache for future accesses
|
10 |
} |
11 |
|
12 |
require_once 'twitter.class.php'; Twitter::$cacheDir = dirname(__FILE__) .'/cache'; |
13 |
$twitter = new Twitter('colonyscout', 'geek6811'); |
14 |
if (!$twitter->authenticate()) { |
15 |
die('Invalid name or password'); |
16 |
} |
17 |
$channel = $twitter->load(Twitter::ME); |
18 |
$status = $channel->status; |
19 |
?>
|
20 |
|
21 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
22 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head> |
23 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
24 |
<meta name="google-site-verification" content="hwSOLj8uDUaKyOjQ4eAfxBHhnmCH0C-tS5hlC-wk0lw" /> |
25 |
<meta name="description" content="A low cost, versatile research platform for autonomous systems in collaborative robotics"> |
26 |
<meta name="keywords" content="Scout, robotics, Carnegie Mellon University, autonomous, engineer"> |
27 |
|
28 |
<?php include("header.php"); ?> |
29 |
<script src="Cambria_400.font.js" type="text/javascript"></script> |
30 |
<script type="text/javascript"> |
31 |
Cufon.replace('#hero-banner-text', { fontFamily:'Cambria', textShadow:'#CCCCCC 1px 1px' });
|
32 |
</script>
|
33 |
<title>Home | ColonyScout.com</title> |
34 |
|
35 |
</head>
|
36 |
<body bgcolor="#eeeeee"> |
37 |
|
38 |
<div id="general"> |
39 |
<?php include("nav.php"); ?> |
40 |
<div id="body"> |
41 |
<div id="body-boxes"> |
42 |
<div class="box-row"> |
43 |
<div id="hero-banner"> |
44 |
<div id="hero-banner-text">A low cost, versatile research platform for autonomous systems in collaborative robotics |
45 |
<br/><br/> |
46 |
<a href="gallery.php" class="small">See it in action >></a> |
47 |
</div>
|
48 |
</div>
|
49 |
<div id="hero-banner-side"></div> |
50 |
</div>
|
51 |
|
52 |
<div class="box-row topmargin"> |
53 |
<div class="white-top"></div> |
54 |
<div class="white-body text-box"> |
55 |
<div id="twitter-status"> |
56 |
<span class="newest"/><small><?php echo date("n.j.Y h:i", strtotime($status[0]->created_at)); ?></small><br/><?php echo $status[0]->text; ?></span> |
57 |
<p><small><?php echo date("n.j.Y h:i", strtotime($status[1]->created_at)); ?></small><br/><?php echo $status[1]->text; ?></p> |
58 |
</div>
|
59 |
|
60 |
<div id="twitter-box"> |
61 |
<a href="http://www.twitter.com/colonyscout/" title="Colony Scout Twitter Feed"> |
62 |
<img src="images/team_twitter.jpg" alt="Colony Scout Twitter Feed"/></a></div> |
63 |
<div class="bot-gray"></div> |
64 |
</div>
|
65 |
<div class="white-bottom"></div> |
66 |
</div>
|
67 |
|
68 |
</div>
|
69 |
</div> <!--BODY!--> |
70 |
|
71 |
|
72 |
<?php include("footer.php"); ?> |
73 |
|
74 |
</div><!--GENERAL!--> |
75 |
|
76 |
</body></html> |
77 |
<?php
|
78 |
$buffer = ob_get_contents();
|
79 |
ob_end_flush(); |
80 |
//$fp = fopen($cacheFile, "w"); fwrite($fp, $buffer); fclose($fp);
|
81 |
?>
|