Revision: 3314
http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3314&view=rev
Author: hemna
Date: 2009-12-01 06:03:02 +0000 (Tue, 01 Dec 2009)
Log Message:
-----------
enable sending to dev. also added timeout to the file_get_contents()
Modified Paths:
--------------
trunk/open2300/bin/remote_update.php
Modified: trunk/open2300/bin/remote_update.php
===================================================================
--- trunk/open2300/bin/remote_update.php 2009-12-01 05:53:29 UTC (rev 3313)
+++ trunk/open2300/bin/remote_update.php 2009-12-01 06:03:02 UTC (rev 3314)
@@ -44,6 +44,33 @@
//echo($url."\n\n");
//var_dump(strlen($url));
//echo(html_entity_decode($url)."\n");
-var_dump(file_get_contents($url));
+$opts = array(
+ 'http' => array('timeout' => 15));
+$context = stream_context_create($opts);
+
+var_dump(file_get_contents($url,0,$context));
+
+
+if ($GLOBALS['config']->get('send_to_dev') == true) {
+ $url2 = "wxdev.hemna.com";
+ $rb = new RequestBuilder("RemoteUpdate");
+ $rb->set_server($url2);
+ $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());
+ $log->debug("Remote DEBUG updated calling : ".$url);
+ echo($url."\n\n");
+ //var_dump(strlen($url));
+ //echo(html_entity_decode($url)."\n");
+ var_dump(file_get_contents($url,0,$context));
+}
+
+
+
?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|