|
0
|
1 |
<?php |
|
|
2 |
/* yadl_spaceid - Skip Stamping */ |
|
|
3 |
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); |
|
|
4 |
|
|
|
5 |
// always modified |
|
|
6 |
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); |
|
|
7 |
|
|
|
8 |
// HTTP/1.1 |
|
|
9 |
header("Cache-Control: no-store, no-cache, must-revalidate"); |
|
|
10 |
header("Cache-Control: post-check=0, pre-check=0", false); |
|
|
11 |
header("Content-Type:text/xml"); |
|
|
12 |
|
|
|
13 |
$url = 'http://xml.weather.yahoo.com/forecastrss?'.getenv('QUERY_STRING'); |
|
|
14 |
|
|
|
15 |
function getResource($url){ |
|
|
16 |
$ch = curl_init(); |
|
|
17 |
curl_setopt($ch, CURLOPT_URL, $url); |
|
|
18 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
|
|
19 |
$result = curl_exec($ch); |
|
|
20 |
curl_close($ch); |
|
|
21 |
|
|
|
22 |
return $result; |
|
|
23 |
} |
|
|
24 |
|
|
|
25 |
$feed = getResource($url); |
|
|
26 |
echo $feed; |
|
|
27 |
?> |