From 1566079e573105bb453fb66282c6dfd298789748 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=86=E3=82=AF=E3=83=8B=E3=82=AB=E3=83=AB=E8=AB=8F?= =?UTF-8?q?=E8=A8=AA=E5=AD=90?= Date: Sun, 27 Mar 2022 02:57:46 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=AD=E3=83=AACURL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.sample.php | 6 ++++++ helper.php | 20 ++++++++++---------- helper/curl.php | 36 +++++++++++++++++++++++++++++++++++- 3 files changed, 51 insertions(+), 11 deletions(-) diff --git a/config.sample.php b/config.sample.php index 938975d..c97c004 100644 --- a/config.sample.php +++ b/config.sample.php @@ -3,8 +3,14 @@ define('APP_NAME', 'LoliPHP'); // データベース + define('DB_CONN', 'mysql'); // mysql|pgsql define('DB_HOST', 'localhost'); + define('DB_PORT', 3306); define('DB_USER', ''); define('DB_PASS', ''); define('DB_NAME', ''); + + // CURL + define('API_URI', ''); + define('API_AUTH', null); ?> diff --git a/helper.php b/helper.php index bf9eee7..2fc60ee 100644 --- a/helper.php +++ b/helper.php @@ -1,12 +1,12 @@ diff --git a/helper/curl.php b/helper/curl.php index 63a8f65..ace03ca 100644 --- a/helper/curl.php +++ b/helper/curl.php @@ -1,3 +1,37 @@ status) && $get->status == 404) { + return []; + } + + return $get; + } ?>