aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_admin.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-01-02 17:30:59 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-01-02 17:30:59 +0000
commit2faf2639ee89ab6e92ac474bbc01ca226c4c4ed3 (patch)
treefc921eff9cd66ee46f22b550977b2d9fe3f34ca4 /phpBB/includes/functions_admin.php
parente68d442f522dd51fe23d4f0ae6095b132c7052ce (diff)
downloadforums-2faf2639ee89ab6e92ac474bbc01ca226c4c4ed3.tar
forums-2faf2639ee89ab6e92ac474bbc01ca226c4c4ed3.tar.gz
forums-2faf2639ee89ab6e92ac474bbc01ca226c4c4ed3.tar.bz2
forums-2faf2639ee89ab6e92ac474bbc01ca226c4c4ed3.tar.xz
forums-2faf2639ee89ab6e92ac474bbc01ca226c4c4ed3.zip
- install style and style elements
- refresh template and style cache git-svn-id: file:///svn/phpbb/trunk@5416 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_admin.php')
-rw-r--r--phpBB/includes/functions_admin.php54
1 files changed, 54 insertions, 0 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index e80696d23d..3929b43448 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -2476,6 +2476,60 @@ function get_database_size()
}
/**
+* Retrieve contents from remotely stored file
+*/
+function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port = 80, $timeout = 10)
+{
+ global $user;
+
+ if ($fsock = @fsockopen($host, $port, $errno, $errstr, $timeout))
+ {
+ @fputs($fsock, "GET $directory/$filename HTTP/1.1\r\n");
+ @fputs($fsock, "HOST: $host\r\n");
+ @fputs($fsock, "Connection: close\r\n\r\n");
+
+ $file_info = '';
+ $get_info = false;
+
+ while (!@feof($fsock))
+ {
+ if ($get_info)
+ {
+ $file_info .= @fread($fsock, 1024);
+ }
+ else
+ {
+ $line = @fgets($fsock, 1024);
+ if ($line == "\r\n")
+ {
+ $get_info = true;
+ }
+ else if (strpos($line, '404 Not Found') !== false)
+ {
+ $errstr = $user->lang['FILE_NOT_FOUND'];
+ return false;
+ }
+ }
+ }
+ @fclose($fsock);
+ }
+ else
+ {
+ if ($errstr)
+ {
+ return false;
+ }
+ else
+ {
+ $errstr = 'fsock disabled';
+ return false;
+ }
+ }
+
+ return $file_info;
+}
+
+/**
* Tidy database
* Removes all tracking rows older than 6 months, including mark_posted informations
*/