/ Published in: PHP
This is a mini bot I’ve made for meteo that retrieves informations from italian Google servers about weather forecast of a specified city (not only italian cities).
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function dayadd($days,$date=null , $format="d/m/Y"){ //add days to a date function } function attr($s,$attrname) { //get the attribute value of an html tag return ""; } function doGoogleMeteo($q,$date) { // grab google page with meteo query //parse html to find data, and store them in an array } } return $p[$date]; } return "nada."; } //Array ( // [title] => Rovesci // [img] => http://www.google.it/images/weather/rain.gif // [min] => -4°C // [max] => 7°C //)
URL: http://www.barattalo.it/2009/12/24/php-meteo-bot-for-google/