本文整理匯總了PHP中Manager::GetUrlData方法的典型用法代碼示例。如果您正苦於以下問題:PHP Manager::GetUrlData方法的具體用法?PHP Manager::GetUrlData怎麽用?PHP Manager::GetUrlData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Manager
的用法示例。
在下文中一共展示了Manager::GetUrlData方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: GetUpdateData
public static function GetUpdateData()
{
$DBData = Updater::GetDatabaseVersion();
$UpdateURL = "https://project.freedomcore.ru/freedomcore.php?action=%s¤t_hash=%s";
$UpdateData = Manager::GetUrlData(sprintf($UpdateURL, 'update', $DBData['database_version']));
return json_decode($UpdateData, true);
}
示例2: GetUpdateData
public static function GetUpdateData()
{
$DBData = Updater::GetDatabaseVersion();
$UpdateURL = "https://project.freedomcore.ru/freedomcore.php?action=%s¤t_hash=%s";
$UpdateData = Manager::GetUrlData(sprintf($UpdateURL, 'update', $DBData['database_version']));
$Data = json_decode($UpdateData, true);
$Data['downloaded'] = Updater::CheckForPull($Data['updating_to']['sha']);
return $Data;
}
示例3: APIRequest
private static function APIRequest($Method, $Hash, $AdditionalParameters = [])
{
$PList = "";
$AgentData = Manager::GetUrlData(sprintf(LauncherAPI::$FreedomCoreURL, $Method, $Hash) . $PList);
$JsonResponse = json_decode($AgentData, true);
return $JsonResponse;
}
示例4: json_decode
<?php
require_once 'header.php';
$UpdateData = Updater::GetUpdateData();
$UpdatesList = Manager::GetUrlData("https://project.freedomcore.ru/freedomcore.php?action=post_install&version=" . $UpdateData['updating_to']['id']);
$UpdatesList = json_decode($UpdatesList, true);
$DownloadDirectory = getcwd() . DS . 'Update' . DS . 'data' . DS;
$Count = count($UpdatesList['updates']);
$Iterations = 0;
foreach ($UpdatesList['updates'] as $Update) {
$LoadedData = Manager::GetUrlData($Update['download']);
$FileHandler = fopen($DownloadDirectory . str_replace('.freedomcore', '.php', $Update['filename']), 'w');
fwrite($FileHandler, $LoadedData);
fclose($FileHandler);
if ($Iterations == $Count - 1) {
header('Location: /Update/complete');
}
}