source: cows/branches/cows-vis/cows/pylons/project_templates/cows_server/+package+/public/js/yui/examples/io/assets/weather.php @ 5259

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/cows/branches/cows-vis/cows/pylons/project_templates/cows_server/+package+/public/js/yui/examples/io/assets/weather.php@5259
Revision 5259, 700 bytes checked in by domlowe, 11 years ago (diff)

adding yui javascript

Line 
1<?php
2/* yadl_spaceid - Skip Stamping */
3header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
4
5// always modified
6header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
7
8// HTTP/1.1
9header("Cache-Control: no-store, no-cache, must-revalidate");
10header("Cache-Control: post-check=0, pre-check=0", false);
11header("Content-Type:text/xml");
12
13$url = 'http://xml.weather.yahoo.com/forecastrss?'.getenv('QUERY_STRING');
14
15function 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);
26echo $feed;
27?>
Note: See TracBrowser for help on using the repository browser.