[Phphtmllib-devel] SF.net SVN: phphtmllib:[3184] trunk/open2300
Status: Beta
Brought to you by:
hemna
From: <he...@us...> - 2008-11-07 06:43:50
|
Revision: 3184 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3184&view=rev Author: hemna Date: 2008-11-07 06:43:45 +0000 (Fri, 07 Nov 2008) Log Message: ----------- added Added Paths: ----------- trunk/open2300/bin/ trunk/open2300/bin/remote_update.php Added: trunk/open2300/bin/remote_update.php =================================================================== --- trunk/open2300/bin/remote_update.php (rev 0) +++ trunk/open2300/bin/remote_update.php 2008-11-07 06:43:45 UTC (rev 3184) @@ -0,0 +1,49 @@ +#!/usr/local/bin/php +<?php +/** + * This script is used to update the open2300 + * website that runs on a different machine + * from the wx station. + * + * @package open2300 + */ + +$lib_path = realpath('../lib'); +ini_set('include_path', '.:/usr/local/lib:'.$lib_path); + +define('PHPHTMLLIB', realpath('../lib/external/phphtmllib')); +$GLOBALS['path_base'] = realpath('..'); + +// autoload function for all our classes +require($GLOBALS['path_base'].'/lib/autoload.inc'); + +// setup error handling and required parameters +require($GLOBALS['path_base'].'/lib/init.inc'); + +$GLOBALS['config']->set('uncaught_exception_output', 'text'); + +//first we load the last entry from the DB +$wx = weatherDataObject::find("1=1 order by datetime desc"); + +//now construct the url call +$url = "http://".$GLOBALS['config']->get("remote_server_name"). + "/?target=remote-update"; + +$log->debug("remote_update: called"); +//var_dump($wx); +$rb = new RequestBuilder("RemoteUpdate"); +$rb->set_server($GLOBALS['config']->get('remote_server_name')); +$rb->set_url_type(Request::URL_TYPE_ABSOLUTE); + +//now construct the uri call +foreach($wx as $key => $value) { + $rb->set($key, $value); +} + +$url = html_entity_decode($rb->get_url()); +//echo($url."\n\n"); +//var_dump(strlen($url)); +//echo(html_entity_decode($url)."\n"); +var_dump(file_get_contents($url)); + +?> Property changes on: trunk/open2300/bin/remote_update.php ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |