-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
33 lines (27 loc) · 957 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<?php
require "./lib/WeatherApi.php";
require "./lib/Tweeter.php";
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body>
<?php
$here = dirname(__FILE__);
set_include_path(ini_get('include_path').":${here}/vendor/arc90-service-twitter/lib");
$weather = new WeatherApi();
// ({start date}, {num days to recover})
$weather->get_24h_periods('97214',strtotime('Tomorrow'),2);
require_once 'Arc90/Service/Twitter.php';
$username = 'YOUR TWITTER HANDLE';
$password = 'YOUR TWITTER PW';
$twitter = new Arc90_Service_Twitter($username, $password);
$timeline = $twitter->test('json');
$timeline = $twitter->updateStatus($weather->description(),'json');
echo($timeline);
?>
</body>
</html>