Folder reorganize 1
This commit is contained in:
14
data/OLD/temp.php
Normal file
14
data/OLD/temp.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<php
|
||||
$httpCall = 'www.google.com/ig/api?weather=' . $postal;
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, $httpCall);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
$output = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
|
||||
if (strpos($output, 'problem_cause') === false) {
|
||||
$xml = new SimpleXMLElement($output);
|
||||
$weather = $xml[0]->weather->current_conditions;
|
||||
echo 'Current Temperature: ' . $weather->temp_f;
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user