twilio-time-and-temperature/time-temp.inc.php.dist
2018-01-16 21:22:00 -08:00

32 lines
989 B
Plaintext

<?php
// This is a sample config file. Copy to time-temp.inc.php
// and modify the UPPERCASE bits.
$courtesy_of = "YOUR COMPANY HERE"; // spell this normally (i.e. github.com)
$courtesy_of_phonetic = "YOUR COMPANY NAME HERE"; // spell this phonetically (i.e. get hub dot com)
$wunderkey = "YOUR_WEATHERUNDERGROUND_API_KEY";
$url = "http://api.wunderground.com/api/";
$feature = "/conditions";
// TODO: replace the 1212 number(s) with YOUR Twilio number(s)
// and the appropriate cities/states for each $path .
if (array_key_exists('To', $_POST) && $_POST['To'] == "+19995551212") {
$path = "/q/CA/San_Francisco.json";
} elseif (array_key_exists('To', $_POST) && $_POST['To'] == "+19997771212") {
$path = "/q/HI/Honolulu.json";
} else {
$path = "/q/NY/New_York.json";
}
$motds = array(
'You are truly loved.',
'Your best days are still ahead.',
"It's okay to take things one day at a time.",
"Remember: don't panic.",
'Forty-two.'
);
shuffle($motds);