BackupGuard
5 years ago
Dropbox
5 years ago
Request
5 years ago
SGArchive.php
5 years ago
SGAuthClient.php
5 years ago
SGCallback.php
5 years ago
SGCdrEntry.php
5 years ago
SGCharsetHandler.php
5 years ago
SGDBState.php
5 years ago
SGEntry.php
5 years ago
SGFileEntry.php
5 years ago
SGFileState.php
5 years ago
SGMigrateState.php
5 years ago
SGMysqldump.php
5 years ago
SGReloadHandler.php
5 years ago
SGReloader.php
5 years ago
SGReloaderState.php
5 years ago
SGReviewManager.php
5 years ago
SGState.php
5 years ago
SGStatsRequests.php
5 years ago
SGUploadHandler.php
5 years ago
SGUploadState.php
5 years ago
SGReloadHandler.php
36 lines
| 1 | <?php |
| 2 | |
| 3 | require_once(SG_REQUEST_PATH.'SGRequest.php'); |
| 4 | |
| 5 | class SGReloadHandler |
| 6 | { |
| 7 | private $host; |
| 8 | private $uri; |
| 9 | private $scheme; |
| 10 | private $port; |
| 11 | |
| 12 | public function __construct($url) |
| 13 | { |
| 14 | $this->host = @$_SERVER['HTTP_HOST']; |
| 15 | $this->url = $url; |
| 16 | $this->port = @$_SERVER['SERVER_PORT']; |
| 17 | $this->scheme = backupGuardGetCurrentUrlScheme(); |
| 18 | |
| 19 | if (!$this->port) { |
| 20 | $this->port = 80; |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | public function reload() |
| 25 | { |
| 26 | $selectedReloadMethod = SGConfig::get('SG_BACKGROUND_RELOAD_METHOD'); |
| 27 | $url = $this->scheme.'://'.$this->host.$this->url."&method=".$selectedReloadMethod; |
| 28 | |
| 29 | $request = SGRequest::getInstance(); |
| 30 | $request->setUrl($url); |
| 31 | $request->setParams(array()); |
| 32 | $request->setHeaders(array()); |
| 33 | $request->sendGetRequest(); |
| 34 | } |
| 35 | } |
| 36 |