twilio-time-and-temperature/time-temp.inc.php.dist

21 lines
709 B
Plaintext
Raw Normal View History

2018-01-17 04:12:00 +00:00
<?php
// This is a sample config file. Copy to time-temp.inc.php
// and modify the UPPERCASE bits.
2018-01-17 04:41:55 +00:00
$courtesy_of_phonetic = "YOUR COMPANY NAME HERE"; // spell this phonetically (i.e. get hub dot com)
2018-01-17 04:12:00 +00:00
$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 .
2018-01-17 04:28:20 +00:00
if (array_key_exists('To', $_POST) && $_POST['To'] == "+19995551212") {
2018-01-17 04:12:00 +00:00
$path = "/q/CA/San_Francisco.json";
2018-01-17 04:28:20 +00:00
} elseif (array_key_exists('To', $_POST) && $_POST['To'] == "+19997771212") {
2018-01-17 04:12:00 +00:00
$path = "/q/HI/Honolulu.json";
} else {
$path = "/q/NY/New_York.json";
}