本文整理汇总了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');
}
}