cvs: pear /Services_Weather/examples weather.com-error.php

From: Date: Wed, 01 Oct 2003 13:12:10 +0000
Subject: cvs: pear /Services_Weather/examples weather.com-error.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-13220@lists.php.net to get a copy of this message
eru Wed Oct 1 09:12:10 2003 EDT Added files: /pear/Services_Weather/examples weather.com-error.php Log: Initial Revision Index: pear/Services_Weather/examples/weather.com-error.php +++ pear/Services_Weather/examples/weather.com-error.php <?php /* vim: set expandtab tabstop=4 shiftwidth=4: */ // +----------------------------------------------------------------------+ // | PHP version 4 | // +----------------------------------------------------------------------+ // | Copyright (c) 1997-2003 The PHP Group | // +----------------------------------------------------------------------+ // | This source file is subject to version 2.0 of the PHP license, | // | that is bundled with this package in the file LICENSE, and is | // | available through the world-wide-web at | // | http://www.php.net/license/2_02.txt. | // | If you did not receive a copy of the PHP license and are unable to | // | obtain it through the world-wide-web, please send a note to | // | license@php.net so we can mail you a copy immediately. | // +----------------------------------------------------------------------+ // | Authors: Alexander Wirtz <alex@pc4p.net> | // +----------------------------------------------------------------------+ // // $Id: weather.com-error.php,v 1.1 2003/10/01 13:12:10 eru Exp $ require_once "Science/Weather.php"; $weatherDotCom = &Science_Weather::service("WeatherDotCom", array("debug" => 2)); $weatherDotCom->setAccountData("<PartnerID>", "<LicenseKey>"); //$weatherDotCom->setCache("file", array("cache_dir" => "/tmp/cache/")); $weatherDotCom->setUnitsFormat("metric" ); $weatherDotCom->setDateTimeFormat("d.m.Y", "H:i"); $search = $weatherDotCom->searchLocation("foobar"); if (Science_Weather::isError($search)) { echo "Error: ".$search->getMessage()."\n"; } $location = $weatherDotCom->getLocation("foobar"); if (Science_Weather::isError($location)) { echo "Error: ".$location->getMessage()."\n"; } $location = $weatherDotCom->getLocation(); if (Science_Weather::isError($location)) { echo "Error: ".$location->getMessage("")."\n"; } ?>

« previous php.pear.cvs (#13220) next »