github/app/Services/Github/Mod/Base.php
2025-04-30 20:44:07 +08:00

47 lines
992 B
PHP
Executable File

<?php
namespace App\Services\Github\Mod;
use App\Services\TomTool\Http;
class Base {
public $oHttp;
public $oHuodong;
public $sHuodongStr;
public $aArticle;
public function __construct()
{
$this->oHttp = new Http();
}
public function todayUpd()
{
$this->oHttp->sToUrl = env('api_url_freenode_base').'/'.'api/github/todayupd';
$r = $this->oHttp->send();
if (env('is_loc') == 1) {
return true;
}
if ($r == 1) {
return true;
} else {
return false;
}
}
public function getArticleFreenode()
{
$this->oHttp->sToUrl = env('api_url_freenode_base').'/'.'api/github/getlast';
$sFreenodeNow = $this->oHttp->send();
$aFreenodeNow = json_decode($sFreenodeNow, 1);
// $sTitleSub = $aFreenodeNow['title_sub'];
return $aFreenodeNow;
}
}