Revision: 675
Author: kerphi
Date: 2006-08-17 09:25:56 -0700 (Thu, 17 Aug 2006)
ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=675&view=rev
Log Message:
-----------
Code cleaning and add http proxy parameters
Modified Paths:
--------------
trunk/contrib/pfcInstaller2/index.php
Modified: trunk/contrib/pfcInstaller2/index.php
===================================================================
--- trunk/contrib/pfcInstaller2/index.php 2006-08-09 21:39:32 UTC (rev 674)
+++ trunk/contrib/pfcInstaller2/index.php 2006-08-17 16:25:56 UTC (rev 675)
@@ -1,24 +1,31 @@
<?php
+$http["proxy_host"] = "proxyout.inist.fr";
+$http["proxy_port"] = 8080;
+$base_url = "http://www.phpfreechat.net/download";
+$base_url = "http://puzzle.dl.sourceforge.net/sourceforge/phpfreechat";
+$archivename = "phpfreechat-1.0-beta4.tar.gz";
+//$archivename = "phpfreechat-0.9.3.tar.gz";
+$dstpath = dirname(__FILE__)."/data";
+
require_once 'PHP/Compat.php';
PHP_Compat::loadFunction('file_get_contents');
PHP_Compat::loadFunction('file_put_contents');
-$archivename = "phpfreechat-0.1.tar.gz";
-$dstpath = dirname(__FILE__)."/data";
if (!is_writable($dstpath))
die("ERROR: ".$dstpath." is not writable!");
require_once "HTTP/Request.php";
-$req =& new HTTP_Request("http://www.phpfreechat.net/download/".$archivename);
+$req =& new HTTP_Request($base_url."/".$archivename, $http);
if (!PEAR::isError($req->sendRequest()))
{
$archivecontent = $req->getResponseBody();
file_put_contents($dstpath."/".$archivename, $archivecontent);
require_once "File/Archive.php";
- @File_Archive::extract( $src = $dstpath."/".$archivename."/",
- $dest = $dstpath );
+ $src = $dstpath."/".$archivename."/";
+ $dest = $dstpath;
+ File_Archive::extract( $src, $dest );
}
?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|