3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the Revised BSD License.
6 This program is distributed in the hope that it will be useful,
7 but WITHOUT ANY WARRANTY; without even the implied warranty of
8 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 Revised BSD License for more details.
11 Copyright 2004-2010 iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1
12 Copyright 2004-2010 Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2
14 $FileInfo: webinstall.php - Last Update: 09/24/2010 Ver 3.0 - Author: cooldude2k $
18 $FTPURL = "ftp.berlios.de";
19 $FTPUSER = "anonymous";
21 $FTPPATH = "/pub/idb/nighty-ver/";
23 $HTTPURL = "http://download.berlios.de/idb/";
24 // File Name Info for both FTP and HTTP
25 $TARGZFILE = "iDB.tar.gz";
27 require_once("./untar.php");
28 $mydir = addslashes(str_replace("\\", "/", dirname(__FILE__
)."/"));
29 $conn_id = ftp_connect($FTPURL, 21, 90);
30 $login_result = ftp_login($conn_id, $FTPUSER, $FTPPASS);
31 if ((!$conn_id) ||
(!$login_result)) {
32 $tarhandle = fopen("./".$TARGZFILE, "a+");
33 fwrite($tarhandle, file_get_contents($HTTPURL.$TARGZFILE));
35 chmod("./".$TARGZFILE, 0777);
37 ftp_pasv($conn_id, true);
38 ftp_chdir($conn_id, $FTPPATH);
39 ftp_get($conn_id, "./".$TARGZFILE, "./".$TARGZFILE, FTP_BINARY
);
42 gunzip("./".$TARGZFILE, "./".$TARFILE);
43 unlink("./".$TARGZFILE);
45 untar("./".$TARFILE, "./");
46 unlink("./".$TARFILE);
47 unlink("./untar.php");
48 unlink("./webinstall.php");
49 header("Location: ./install.php");