Compare commits

..

No commits in common. "master" and "patch-master-20210817" have entirely different histories.

83 changed files with 286 additions and 278 deletions

70
CDN_HOWTO.md Normal file
View File

@ -0,0 +1,70 @@
# 카페24(cafe24) CDN/스트리밍 사용법
ReasonableFramework v1.6.2 기준 https://github.com/gnh1201/reasonableframework
## 목차
- 카페24 ([10G 광아우토반 Full SSD](https://www.cafe24.com/?controller=product_page&type=basic&page=autoban) 웹 호스팅 상품 기준)
- Amazon S3 또는 타사 정적 파일 호스팅/Object Storage 사용자
- 문의사항
## 카페24 ([10G 광아우토반 Full SSD](https://www.cafe24.com/?controller=product_page&type=basic&page=autoban) 웹 호스팅 상품 기준)
1. 카페24(cafe24.com) 관리자 페이지에 로그인하여, CDN/스트리밍 도메인 정보를 얻는다.
1. 메인 웹 사이트 로그인 -> `나의서비스관리` 클릭
2. 좌측 메뉴에서 `서비스 접속관리` -> `서비스 접속 정보` 클릭
3. CDN/스트리밍 정보 확인
```
*** CDN ***
CDN 하드 용량: 200M
CDN 트래픽 용량: 500M
FTP 주소: iup.cdn2.cafe24.com
FTP 포트: 21
FTP 아이디: [사용자 아이디]
*** 스트리밍 ***
스트리밍 하드 용량: 200M
스트리밍 트래픽 용량: 500M
FTP 주소: wm-004.cafe24.com
FTP 포트: 5565
FTP 아이디: [사용자 아이디]
```
4. CDN의 경우, `https://[사용자 아이디].cdn2.cafe24.com`(예시)가 접속 주소가 된다.
5. 스트리밍의 경우, `mms://wm-004.cafe24.com/[사용자 아이디]/abc.mp3`(예시)가 접속 주소가 된다.
2. ResonableFramework v1.6.2 설치 및 CDN/스트리밍 설정
1. https://github.com/gnh1201/reasonableframework 접속 후 `Release` 탭을 누르고 `v1.6.2` 또는 최신 버전을 내려받는다.
2. `storage/config/uri.ini.php` 파일의 CDN/스트리밍 관련 부분을 아래와 같이 수정한다.
```
base_cdn_url = https://[사용자 아이디].cdn2.cafe24.com
base_vod_url = mms://wm-004.cafe24.com/[사용자 아이디]
```
3. `route` 폴더 밑에 `cdntest.php` 이름의 빈 파일을 만들고, 아래와 같이 입력 후 저장한다.
```
<?php
$data = array(
"imageurl" => get_cdn_link("/picture.jpg");
);
renderView("view_cdntest", $data);
```
4. `view` 폴더 밑에 `view_cdntest.php` 이름의 빈 파일을 만들고, 아래와 같이 입력 후 저장한다.
```
<img src="<?php echo $imageurl; ?>" alt="this is cdn test">
```
5. 사용하고 있는 웹 호스팅에 reasonableframework-master 폴더 아래의 모든 파일을 업로드한다.
6. 1번에서 얻은 FTP 정보를 이용하여, CDN 서버에 `picture.jpg` 이름으로 임의의 JPG 그림 파일을 업로드한다.
7. 웹 브라우저를 열고 `http://[웹 호스팅 주소]/?route=cdntest`에 접속하여 그림이 잘 뜨는지 확인한다.
## Amazon S3 또는 타사 정적 파일 호스팅/Object Storage 사용자
- 정적 파일 호스팅을 지원하는 서비스의 경우, `base_cdn_url`의 주소만 바꾸어주면 동일한 방법으로 사용이 가능하다.
## 문의사항
- support@exts.kr

View File

@ -1,11 +0,0 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Go"
given-names: "Namhyeon"
orcid: "https://orcid.org/0009-0006-8421-0911"
title: "ReasonableFramework"
version: v1.6.8
doi: 10.5281/zenodo.11392417
date-released: 2024-05-30
url: "https://github.com/gnh1201/reasonableframework"

View File

@ -1,8 +1,8 @@
# These are supported funding model platforms
github: gnh1201
open_collective: welsonjs
liberapay: catswords
custom: ['https://www.buymeacoffee.com/catswords', 'https://toss.me/catswords']
github: gnh1201, catswords # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: catswords # Replace with a single Patreon username
ko_fi: catswords
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
custom: # Replace with a single custom sponsorship URL

141
KOREAN.MD
View File

@ -1,98 +1,55 @@
# 본 웹 어플리케이션에 대하여
본 웹 어플리케이션은 ReasonableFramework 기반으로 작성됨. https://github.com/gnh1201/reasonableframework
## 기반 소프트웨어
본 웹 소프트웨어는 ReasonableFramework 기반으로 작성되었습니다.
https://github.com/gnh1201/reasonableframework
## 적재된 모듈 목록
* System: base (시스템 기반)
* System: config (시스템 설정)
* System: database (데이터베이스)
* System: logger (로그)
* System: uri (URI 및 URL 제어)
* System: security (보안)
* Helper: paginate (페이지 네비게이션)
* Helper: gnuboard, gnuboard.config, gnuboard.lib (그누보드 설정 및 라이브러리 연동)
* Helper: vworld (국토교통부 vworld 연동)
* Helper: wprest (워드프레스[wordpress] REST API 클라이언트)
* Hepler: webpagetool (Proxy 설정, UA 설정, JSON/DOM 파서를 지원하는 HTTP 클라이언트)
* Helper: noreporting, allreporting (오류 출력 범위를 설정)
* Helper: isemail.lnk (is_email 지원 -> /vendor/isemail)
* Helper: metaparser.lnk (HTML META 데이터 파싱 지원 -> /vendor/PHP-MetaParser)
* Helper: simple_html_dom (HTML DOM 처리기)
* Helper: oracle (오라클 데이터베이스 접속 및 쿼리)
* Helper: exectool (PHP 명령행 실행 지원)
* 그 외 다양한 사양 지원을 위한 모듈들
## 오픈소스 라이선스
* 이 프로젝트는 LGPL 3.0 오픈소스 라이선스 하에 배포됨.
* System: base (시스템 기반)
* System: config (시스템 설정)
* System: database (데이터베이스)
* System: logger (로그)
* System: uri (URI 및 URL 제어)
* System: security (보안)
* Helper: paginate (페이지 네비게이션)
* Helper: gnuboard, gnuboard.config, gnuboard.lib (그누보드 설정 및 라이브러리 연동)
* Helper: vworld (국토교통부 vworld 연동)
* Helper: wprest (워드프레스[wordpress] REST API 클라이언트)
* Hepler: webpagetool (Proxy 설정, UA 설정, JSON/DOM 파서를 지원하는 HTTP 클라이언트)
* Helper: noreporting, allreporting (오류 출력 범위를 설정)
* Helper: isemail.lnk (is_email 지원 -> /vendor/isemail)
* Helper: metaparser.lnk (HTML META 데이터 파싱 지원 -> /vendor/PHP-MetaParser)
* Helper: simple_html_dom (HTML DOM 처리기)
* Helper: oracle (오라클 데이터베이스 접속 및 쿼리)
* Helper: exectool (PHP 명령행 실행 지원)
## 기술지원
* Website: https://exts.kr/go/home
* E-mail: support@exts.kr
## 저작권
* LGPL (별도의 오픈소스 라이센스 문서에 기입 요망)
## 최근변경
* 2024-05-30
## 정적 파일 호스팅 관련 지침 (카페24 CDN 또는 Amazon S3)
본 지침은 버전 v1.6.8를 기준으로 한다.
### 정적 파일 호스팅 서비스의 예시
- 카페24 ([10G 광아우토반 FullSSD+](https://hosting.cafe24.com/?controller=new_product_page&page=autobahn) 웹 호스팅 상품 기준)
- Amazon S3
- Object Storage
### 카페24 정적 파일 호스팅 사용자
1. 카페24(cafe24.com) 관리자 페이지에 로그인하여, CDN/스트리밍 도메인 정보를 얻는다.
1. 메인 웹 사이트 로그인 -> `나의서비스관리` 클릭
2. 좌측 메뉴에서 `서비스 접속관리` -> `서비스 접속 정보` 클릭
3. CDN/스트리밍 정보 확인
```
*** CDN ***
CDN 하드 용량: 200M
CDN 트래픽 용량: 500M
FTP 주소: iup.cdn2.cafe24.com
FTP 포트: 21
FTP 아이디: [사용자 아이디]
*** 스트리밍 ***
스트리밍 하드 용량: 200M
스트리밍 트래픽 용량: 500M
FTP 주소: wm-004.cafe24.com
FTP 포트: 5565
FTP 아이디: [사용자 아이디]
```
4. CDN의 경우, `https://[사용자 아이디].cdn2.cafe24.com`(예시)가 접속 주소가 된다.
5. 스트리밍의 경우, `mms://wm-004.cafe24.com/[사용자 아이디]/abc.mp3`(예시)가 접속 주소가 된다.
2. ResonableFramework v1.6.8 설치 및 CDN/스트리밍 설정
1. [깃허브 저장소](https://github.com/gnh1201/reasonableframework) 접속 후 `Release` 탭을 누르고 `v1.6.8` 또는 최신 버전을 내려받는다.
2. `storage/config/uri.ini.php` 파일의 CDN/스트리밍 관련 부분을 아래와 같이 수정한다.
```
base_cdn_url = https://[사용자 아이디].cdn2.cafe24.com
base_vod_url = mms://wm-004.cafe24.com/[사용자 아이디]
```
3. `route` 폴더 밑에 `cdntest.php` 이름의 빈 파일을 만들고, 아래와 같이 입력 후 저장한다.
```
<?php
$data = array(
"imageurl" => get_cdn_link("/picture.jpg");
);
renderView("view_cdntest", $data);
```
4. `view` 폴더 밑에 `view_cdntest.php` 이름의 빈 파일을 만들고, 아래와 같이 입력 후 저장한다.
```
<img src="<?php echo $imageurl; ?>" alt="this is cdn test">
```
5. 사용하고 있는 웹 호스팅에 reasonableframework-master 폴더 아래의 모든 파일을 업로드한다.
6. 1번에서 얻은 FTP 정보를 이용하여, CDN 서버에 `picture.jpg` 이름으로 임의의 JPG 그림 파일을 업로드한다.
7. 웹 브라우저를 열고 `http://[웹 호스팅 주소]/?route=cdntest`에 접속하여 그림이 잘 뜨는지 확인한다.
### Amazon S3 또는 Object Storage 사용자
- 해당 정적 파일 호스팅 업체에서 제공하는 공통 링크를 확인한 뒤, 해당 링크를 `storage/config/uri.ini.php` 파일의 `base_cdn_url`에 반영한다.
## 기술지원 및 문의사항
- 웹사이트: https://catswords.social/@catswords_oss
- 이메일: abuse@catswords.net
* 2018-07-22

View File

@ -1,18 +1,20 @@
# ReasonableFramework
![License LGPLv3](https://img.shields.io/github/license/gnh1201/reasonableframework.svg)
[![DOI](https://zenodo.org/badge/114566493.svg)](https://zenodo.org/doi/10.5281/zenodo.11392416)
![KCC C-2020-018490](https://img.shields.io/static/v1?label=KCC&message=C-2020-018490&color=orange)
ReasonableFramework is RVHM structured PHP framework. aka, RSF, VSPF, C-2020-018490
- ReasonableFramework is `RVHM` structured PHP framework with common security
- Prefix code: `RSF` (ReasonableFramework)
- Old prefix code: `VSPF` (Very Simple PHP Framework)
## Specifications
- Various types of database connection drivers. e.g, PHP PDO, MySQLi, Legacy MySQL, MySQL over the shell, Oracle(OCI)
- No OOP, Just `RVHM` structure
- R is Route. like as `controller`
- V is View
- H is Helper. like a `import` on Python, Go, NodeJS
- M is Model. it implemented with `KV bind`(like as `Map` data structure), Model is optional.
- Controllable shared variables: Minimize abuse of global variables. Inspired by the `scope` of AngularJS, and `SharedPreferences` of Android Framework
- CGI style compatibility prepared for industrial applications: This framework can utilize both the latest object-oriented style and the CGI style required in industrial applications.
![This project open source licensed under LGPL version 3](https://github.com/gnh1201/reasonableframework/raw/master/lgplv3-147x51.png)
## Security policy
- [Security policy and techincal support](SECURITY.md)
## Specification
- Database connection (via PDO, MySQLi (MySQL Improved), MySQL Tranditional, MySQL CLI, Oracle(OCI))
- RVHM structure: `R` is Route (like as `controller`), `V` is View, `H` is Helper (like as `import` on Python/Go/NodeJS), `M` is Model and implemented with `KV bind`(like as `Map` data structure), Model is not required.
- Controllable shared variables: Minimize abuse of global variables (Inspired by the `scope` of AngularJS, and `SharedPreferences` of Android Framework)
## Compatible
- Tested in PHP 5.3.3
@ -28,6 +30,9 @@ ReasonableFramework is RVHM structured PHP framework. aka, RSF, VSPF, C-2020-018
## Map of structure
![Map of structure](https://github.com/gnh1201/reasonableframework/raw/master/assets/img/reasonableframework.jpg)
## Roadmap
- Support critial and special-purposed web environment (industry, scientific, legacy, or more)
## Quick Start
1. git clone https://github.com/gnh1201/reasonableframework.git
2. edit database configuration: `/storage/config/database.ini.php`
@ -35,15 +40,19 @@ ReasonableFramework is RVHM structured PHP framework. aka, RSF, VSPF, C-2020-018
4. go to `http://:base_url/?route=example` or `http://:base_url/example/`(if set `.htaccess`) in the web browser.
5. code it.
## Use cases
## Examples
- [Send severities from Zabbix to Grafana](https://gist.github.com/gnh1201/792964e9719d2f62157cf46e394888f5)
- [REST API Integration (Papago Translation REST API)](https://gist.github.com/gnh1201/081484e6f5e10bd3be819093ba5f49c8)
- [Payment Gateway Integration](https://github.com/gnh1201/reasonableframework/blob/master/route/orderpay.pgkcp.php)
- [REST API Integration (Naver Papago Translation REST API)](https://gist.github.com/gnh1201/081484e6f5e10bd3be819093ba5f49c8)
- [Payment Gateway Integration (KCP)](https://github.com/gnh1201/reasonableframework/blob/master/route/orderpay.pgkcp.php)
## Remote logging
- Remote logging feature based on [RFC3164(The BSD Syslog Protocol)](https://tools.ietf.org/html/rfc3164)
## Advanced security (only for sponsors)
- CORS, CSRF, XSS, SQL-injection protection is common security, it is free and open-source for everyone.
- Firewall, DDoS protection, and more security tools are available only for sponsors. [more](https://github.com/gnh1201/reasonableframework/blob/master/SECURITY.md)
## Tested on free web hostings
## Remote logger (free for all)
- Remote logger feature based on [RFC3164(The BSD Syslog Protocol)](https://tools.ietf.org/html/rfc3164), with [Papertrail](https://www.papertrail.com/)
## Compatible of free web hostings
| Provider | Pass? | Tested version | Note
| ---------------------- | ------ | -------------- | -------------------------- |
@ -60,29 +69,42 @@ ReasonableFramework is RVHM structured PHP framework. aka, RSF, VSPF, C-2020-018
| freehostingnoads.net | :warning: Warn | v1.5 | CURL blocked |
| awardspace.com | :warning: Warn | v1.5 | CURL blocked |
## How to use CLI (Command-line interface)
## How to use CLI (Command line interface)
```
$ php cli.php --route :route --session-id :session_id
```
## Comment about PSR standards
Many people are saying that this project seems to be distant from the [PSR](https://www.php-fig.org/psr/) standards, and that claim is correct.
## Administratives
- This project was registered to the Korea Copyright Commission's software copyright registration system. the registration number is `C-2020-018490`(version: v1.6.5.1-kcc) and approved in June 3, 2020.
- The open source license applied to this project will remain the same now and in the future.
The coding convention of this project is similar to the CGI style that was widely used in the early 2000s. Moreover, this style is still observed in solutions written in PHP that are sold in markets such as [WordPress](https://wordpress.org/) plugins, [a local-optimized CMS](https://github.com/gnuboard/gnuboard5), or [Codecanyon](https://codecanyon.net/) in 2023.
## 한국어(Korean)
- **리즈너블 프레임워크**는 한국의 웹 개발 환경에 적합한 PHP 프레임워크입니다.
- 레거시 코드에 기반하거나 숙련되지 않은 개발자가 프로그램을 개발하여도 최대의 안정성을 제공합니다.
- 한국, 아시아, 북미, 유럽권의 PHP를 기반으로 하는 무료 웹 호스팅에서도 안정적인 운영이 가능합니다.
- 객체지향(OOP), 모듈러(MVC), 시큐어 코딩 등 현대적인 웹 기술을 모르더라도 **편리한 기준**을 제공합니다.
- Composer(패키지 관리자)를 포함한 별도의 개발 보조 도구, PHP 플러그인, PHP 프레임워크가 사용 불가능한 환경에 적합합니다.
- 한국에서 사용되는 각종 CMS와 API와 연동되어 한국 환경에서 사용 빈도가 높은 구현 유형을 작성하는데 적합합니다.
- RVHM 구조는 MVC 구조와 함께 사용하실 수 있으며, 기존 개발 스킬로도 사용할 수 있도록 더 유연한 구조를 가집니다.
- **리즈너블 프레임워크**는 CSRF, XSS, SQL 인젝션 등 기초적인 **보안 위협에 대응**하도록 설계되어 있습니다.
- **리즈너블 프레임워크**는 `Forwarded` 헤더를 자체적으로 지원하여 부하 분산이나 익명 웹사이트 구축(예를 들어, Tor)에 적합합니다.
- 이 프로젝트는 PHP 버전 4 부터 버전 7까지 다양한 **기업 수준의 적용 사례**를 포함하고 있습니다.
- 이 프로젝트는 [카카오톡 채팅방](https://catswords.re.kr/go/kakaotalk)에서 실시간으로 버그 및 보안 이슈를 제보받고 있습니다.
Although this project hardly uses object-oriented concepts and does not use package managers like Composer much, it still incorporates concepts such as Model, View, Controller, Router, and Helper that are proposed in modern frameworks, and we have made efforts to provide a similar experience as much as possible.
We made efforts to address common security vulnerabilities (XSS, CSRF, SQL injection) in web applications, and included many code snippets that were designed to minimize reliance on specific DBMS or communication drivers.
The specifications that this project offers are still in demand in enterprise environments, so it can be a useful solution if you happen to be in such a situation.
Whenever this project was introduced, I received a lot of questions about PSR, and I also made efforts to find customers who were willing to pay for a PSR version, such as holding conferences for existing customers. However, there is still no good news. Until good news comes, my plan is to mainly maintain this project.
If you want to comply with the PSR standards and your colleagues are also ready to learn them humbly, we recommend that you consider [Codeigniter](https://github.com/bcit-ci/CodeIgniter) (which has a similar structure to this project) or [Silm Framework](https://github.com/slimphp/Slim).
## Security Policy
- [Security policy](SECURITY.md)
## English
- **ReasonableFramework** is a PHP framework designed to the restrictive web environments.
- It provides maximum stability even if the program is developed for developers who are based on legacy code or are not skilled.
- It also works smoothly on free web hosting (in South Korea, Asia, America, and Europe) based on PHP 4 and 7.
- It provides **a convincing standard** even if you don't know modern web techs, such as object-oriented, modular(MVC), and secure coding.
- Ideal for environments where separate development aids, including Composer, PHP extensions, and the famous PHP framework are not available.
- Compatible with famous CMS and API used with REST API, it is suitable to create implementation type that is frequently used in various environment.
- RVHM structure can be used with MVC structure, and has more flexible structure to use as existing development skills.
- **ResonableFramework** is designed to **respond to fundamental security threats** such as CSRF, XSS, and SQL injection.
- **ResonableFramework** is supported `Forwarded` headers natively, so it is ideal for build a load balancing or hidden(e.g. Tor) services.
- This project including a lots of the **enterprise level cases** from PHP version 4(legacy) to 7(modern).
- This project receiving a realtime reports that bugs and security issues in the [official chatting room](https://catswords.re.kr/go/kakaotalk).
## Contact us
- abuse@catswords.net
- ActivityPub [@catswords_oss@catswords.social](https://catswords.social/@catswords_oss)
- gnh1201@gmail.com
- support@exts.kr
- catswords@protonmail.com (if you require confidential)

View File

@ -7,17 +7,25 @@ currently being supported with security updates.
| Version | Supported |
| ------- | ------------------------------------------ |
| 1.6.x | :white_check_mark: (Current) |
| 1.5.x | :x: (EOL: 2020-08-25) |
| 1.6.x | :white_check_mark: |
| 1.5.x | :white_check_mark: (but, until 2020-08-25) |
| < 1.5 | :x: |
## Reporting a Vulnerability
Use this section to tell people how to report a vulnerability.
Tell them where to go, how often they can expect to get an update on a
reported vulnerability, what to expect if the vulnerability is accepted or
declined, etc.
## Contact us
* ActivityPub [@catswords_oss@catswords.social](https://catswords.social/@catswords_oss)
* abuse@catswords.net
## Paid tier for improving security
the advanced security against XSS, CSRF, SQL injection, DDoS, Webshell (malicious code), weak configurations, which extensions available only for sponsors.
Generally, the default security is sufficient to you in our framework. so, you have to use it after did understand what is this.
### Minimum tier
- 25 USD/monthly (Email questions and answers)
### Link
https://www.patreon.com/posts/advanced-security-27376670

2
VERSION.MD Normal file
View File

@ -0,0 +1,2 @@
# Confirmed version
Last confirmed: 2018-03-09 22:00 (KST, GMT+09:00, Seoul)

3
bootstrap.707.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
chmod -R 707 .
cp ./storage/example/_.htaccess ./.htaccess

View File

@ -1,5 +1,4 @@
#!/bin/bash
#find . -type d -exec chmod 0755 {} \;
#find . -type f -exec chmod 0644 {} \;
chmod -R u+rwX,go+rX,go-w .
find . -type d -exec chmod 0755 {} \;
find . -type f -exec chmod 0644 {} \;
cp ./storage/example/_.htaccess ./.htaccess

View File

@ -4,7 +4,7 @@
* @file cli.php
* @created_on 2018-07-22
* @created_on 2020-04-20
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief ReasonableFramework CLI mode
* @cvs http://github.com/gnh1201/reasonableframework
*/

View File

@ -5,7 +5,7 @@
"authors": [
{
"name": "Go Namhyeon",
"email": "abuse@catswords.net"
"email": "gnh1201@gmail.com"
}
],
"require": {

3
fixindent.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
find ./ -type f -name "*.php" -exec sed -i 's/\t/ /g' {} \;
echo "done"

View File

@ -2,7 +2,7 @@
/**
* @file api.whois.kr.php
* @date 2019-05-26
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief KISA Whois/Domain/IP/AS Query Helper (https://whois.kr)
*/

View File

@ -2,7 +2,7 @@
/**
* @file catsplit.format.php
* @date 2019-05-28
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief Catsplit format encoder
* @documentation https://github.com/gnh1201/catsplit-format
*/

View File

@ -1,5 +1,5 @@
<?php
// Go Namhyeon <abuse@catswords.net>
// Go Namhyeon <gnh1201@gmail.com>
// 2019-09-25
if(!is_fn("decode_colona_format")) {

View File

@ -1,6 +1,6 @@
<?php
// @date 2019-10-13
// @author Go Namhyeon <abuse@catswords.net>
// @author Go Namhyeon <gnh1201@gmail.com>
if(!is_fn("unzip")) {
function unzip($src, $dst, $options=array()) {

View File

@ -2,7 +2,7 @@
/**
* @file country.kr.php
* @date 2018-04-15
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief Country Helper (Korean)
*/

View File

@ -2,7 +2,7 @@
/**
* @file database.alt.php
* @date 2018-09-10
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief Database alternative driver switcher
*/

View File

@ -2,7 +2,7 @@
/**
* @file database.mysql.cmd.php
* @date 2019-04-06
* @auther Go Namhyeon <abuse@catswords.net>
* @auther Go Namhyeon <gnh1201@gmail.com>
* @brief MySQL(MariaDB) command line driver
*/

View File

@ -2,7 +2,7 @@
/**
* @file database.mysql.imp.php
* @date 2018-09-10
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief MySQLi database helper
*/

View File

@ -2,7 +2,7 @@
/**
* @file database.mysql.old.php
* @date 2018-09-14
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief MySQL-old (lower than 5.4) database helper
*/

View File

@ -2,7 +2,7 @@
/**
* @file oracle.php
* @date 2018-03-27
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief Oracle database helper for ReasonableFramework
*/

View File

@ -3,7 +3,7 @@
* @file exectool.php
* @created_on 2018-07-22
* @updated_on 2020-07-10
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @forked from https://github.com/scipag/PHPUtilities
* @brief ExecTool helper
*/

View File

@ -2,7 +2,7 @@
/**
* @file gnuboard.php
* @date 2018-05-27
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief Database Helper for Gnuboard 4, Gnuboard 5
*/

View File

@ -2,16 +2,16 @@
/**
* @file hiddentool.php
* @created_on 2021-05-24
* @updated_on 2022-09-13
* @author Go Namhyeon <abuse@catswords.net>
* @updated_on 2021-05-24
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief Tools for Hidden Services (e.g. Tor, I2P, etc...)
*/
if (!is_fn("detect_hidden_service")) {
function detect_hidden_service() {
$score = 0;
$score = 0;
$suffixes = array("onion", "i2p", "crypto");
$suffixes = array("onion", "i2p");
$forwarded_host = get_header_value("X-Forwarded-Host");
if (!empty($forwarded_host)) {
if (in_array(end(explode('.', $forwarded_host)), $suffixes)) {

View File

@ -2,7 +2,7 @@
/**
* @file hybridauth.dbt.php
* @date 2018-04-15
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief HybridAuth DB Helper
*/

View File

@ -2,7 +2,7 @@
/**
* @file hybridauth.lnk.php
* @date 2018-09-26
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief HybridAuth library RSF Linker
***/

View File

@ -2,7 +2,7 @@
/**
* @file isemail.lnk.php
* @date 2018-03-02
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief IsEmail library linker
*/

View File

@ -2,7 +2,7 @@
/**
* @file jCryption.lnk.php
* @date 2018-09-30
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief jCryption (alternative HTTPS on javascript) Helper
*/

View File

@ -1,7 +1,7 @@
<?php
// @created_on 2019-10-13
// @updated_on 2020-01-27
// @author Go Namhyeon <abuse@catswords.net>
// @author Go Namhyeon <gnh1201@gmail.com>
if(!is_fn("json_decode_ex")) {
function json_decode_ex($data, $options=array()) {

View File

@ -2,7 +2,7 @@
/**
* @file kimsboard7.dbt.php
* @date 2018-08-20
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief Database Helper for Kimsboard 7 (experimental)
*/

View File

@ -2,7 +2,7 @@
/**
* @file lguplus.api.php
* @date 2019-10-07
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief `LGU+`or `LGUPlus` is trandmark of LGUPlus Co. Ltd.
*/

View File

@ -2,7 +2,7 @@
/**
* @file lguplus.install.php
* @date 2019-10-13
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief `LGU+`or `LGUPlus` is trandmark of LGUPlus Co. Ltd.
*/

View File

@ -2,7 +2,7 @@
/**
* @file mailgun.api.php
* @date 2019-04-12
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief Mailgun REST API interface module
* @documentation https://documentation.mailgun.com/en/latest/api-sending.html
*/

View File

@ -2,7 +2,7 @@
/**
* @file metaparser.lnk.php
* @date 2018-03-21
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief PHP-Metaparser library linker
*/

View File

@ -2,7 +2,7 @@
/**
* @file mobiletool.php
* @date 2019-04-29
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief Mobile Tool
* @documentation https://www.w3.org/Mobile/training/device-detection/mobile_detector.txt
*/

View File

@ -1,9 +1,8 @@
<?php
/**
* @file networktool.php
* @created_on 2018-04-11
* @updated_on 2022-09-16
* @author Go Namhyeon <abuse@catswords.net>
* @date 2018-04-11
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief Network tool helper
*/
@ -127,11 +126,3 @@ if(!is_fn("get_network_outbound_addr")) {
return $addr;
}
}
if(!is_fn("detect_perf_agent")) {
function detect_perf_agent() {
$evt = get_network_event();
$agent = $evt['agent'];
return preg_match('(PingdomPageSpeed|GTmetrix)', $agent) === 1;
}
}

View File

@ -2,7 +2,7 @@
/**
* @file obfuscator.php
* @date 2018-10-21
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief PHP Obfuscator for ReasonableFramework
*/

View File

@ -2,7 +2,7 @@
/**
* @file pagenate.php
* @date 2018-01-01
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief Page navigation helper
*/

View File

@ -3,7 +3,7 @@
* @file perftool.php
* @created_on 2020-02-19
* @updated_on 2020-02-24
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief PerfTool helper
*/

View File

@ -2,7 +2,7 @@
/**
* @file pgkcp.install.php
* @date 2019-10-13
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief KCP PG(Payment Gateway) Auto-Install Tool
*/

View File

@ -3,7 +3,7 @@
* @file pgkcp.lnk.php
* @created_on 2018-08-25
* @updated_on 2020-01-13
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief KCP PG(Payment Gateway) Helper
*/

View File

@ -1,7 +1,7 @@
<?php
/*
* @file rfc3164.proto.php
* @author Go Namhyeon <abuse@catswords.net> (Modified)
* @author Go Namhyeon <gnh1201@gmail.com> (Modified)
* @author Troy Davis (@tory) - https://gist.github.com/troy/2220679 (Original)
* @brief Helper for RFC3164(The BSD Syslog Protocol) - https://tools.ietf.org/html/rfc3164
* @created_on 2018-03-02

View File

@ -2,7 +2,7 @@
/**
* @file socialtools.php
* @date 2018-09-27
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief SocialTools (refactoring from SocioRouter)
*/

View File

@ -2,7 +2,7 @@
/**
* @file spreadsheet-reader.lnk.php
* @date 2018-09-20
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief Excel file parser
***/

View File

@ -1,7 +1,7 @@
/**
* @file staticgen.php
* @date 2018-07-22
* @auther Go Namhyeon <abuse@catswords.net>
* @auther Go Namhyeon <gnh1201@gmail.com>
* @brief Static Web Generation Tool for ResaonableFramework
*/

View File

@ -3,7 +3,7 @@
* @file string.utils.php
* @created_on 2018-05-27
* @updated_on 2020-02-21
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief String utility helper
*/

View File

@ -2,7 +2,7 @@
/**
* @file tablewiz.php
* @date 2018-02-26
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief TableWiz helper
*/

View File

@ -2,7 +2,7 @@
/**
* @file timetool.php
* @date 2018-09-26
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief Time tools
*/

View File

@ -2,7 +2,7 @@
/**
* @file twilio.api.php
* @date 2019-04-08
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief Twilio REST API interface module
* @documentation https://www.twilio.com/docs/sms/send-messages
*/

View File

@ -2,7 +2,7 @@
/**
* @file vworld.php
* @date 2018-01-11
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief Geo Helper based on vWorld (vworld.kr, molit.go.kr)
*/

View File

@ -2,7 +2,7 @@
/**
* @file webhooktool.php
* @date 2019-05-04
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief WebhookTools
* @trademark
* * `NateOn` is trademark of SK Communications Co Ltd., SK Planet Co Ltd., or other SK businesses.

View File

@ -3,7 +3,7 @@
* @file webpagetool.php
* @created_on 2018-06-01
* @updated_on 2021-02-01
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief WebPageTool helper
*/
@ -884,7 +884,7 @@ if(!is_fn("get_webproxy_url")) {
if(!is_fn("get_web_user_agent")) {
function get_web_user_agent($ua="") {
if(empty($ua)) {
$ua = "ReasonableFramework/1.6.7-preview1 (Server; PHP " . phpversion() . "; https://catswords.social/@catswords_oss; abuse@catswords.net)";
$ua = "ReasonableFramework/1.6-dev (https://github.com/gnh1201/reasonableframework)";
} else {
$ua = make_safe_argument($ua);
}

View File

@ -2,7 +2,7 @@
/**
* @file wprest.php
* @date 2018-03-14
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief Wordpress Rest API helper
*/

View File

@ -3,7 +3,7 @@
* @file zabbix.api.php
* @created_on 2019-04-08
* @updated_on 2020-03-05
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief Zabbix JSON-RPC API (3.0) interface module
* @documentation https://www.zabbix.com/documentation/current/ (4.4)
*/

View File

@ -2,7 +2,7 @@
/**
* @file zeroboard4.dbt.php
* @date 2018-08-20
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief Database Helper for Zeroboard 4 PL 9 (experimental)
*/

View File

@ -3,7 +3,7 @@
* @file index.php
* @created_on 2018-05-27
* @updated_on 2020-06-14
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief ReasonableFramework is RVHM structured PHP framework with common security
* @cvs https://github.com/gnh1201/reasonableframework
* @sponsor https://patreon.com/catswords (with advanced security)

BIN
lgplv3-147x51.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -2,7 +2,7 @@
/**
* @file api.getorder.pgkcp.php
* @date 2018-09-24
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief KCP PG(Payment Gateway) get completed order
*/

View File

@ -2,7 +2,7 @@
/**
* @file api.gnuboard.php
* @date 2018-05-31
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief Integration controller for Gnuboard CMS 4.x, 5.x
*/

View File

@ -2,7 +2,7 @@
/**
* @file api.mailgun.php
* @date 2019-04-15
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief Mailgun API controller
*/

View File

@ -2,7 +2,7 @@
/**
* @file api.setconfig.pgkcp.php
* @date 2018-09-30
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief KCP PG(Payment Gateway) set configuration API
*/

View File

@ -2,7 +2,7 @@
/**
* @file api.social.php
* @date 2018-09-26
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief SocialTools API (refactoring from SocioRouter API)
*/

View File

@ -2,7 +2,7 @@
/**
* @file api.twilio.php
* @date 2019-04-15
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief Twilio API controller (or domestic API)
*/

View File

@ -2,7 +2,7 @@
/**
* @file api.uuid.php
* @date 2018-08-19
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief UUID Generator API
*/

View File

@ -2,7 +2,7 @@
/**
* @file api.zabbix.php
* @date 2019-04-15
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief Zabbix API
*/

View File

@ -2,7 +2,7 @@
/**
* @file mobileswitcher.php
* @date 2019-04-29
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief mobile device switcher
*/

View File

@ -3,7 +3,7 @@
* @file ordercomplete.pgkcp.php
* @created_on 2018-09-03
* @updated_on 2020-01-25
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief KCP PG(Payment Gateway) contoller when completed
*/

View File

@ -2,7 +2,7 @@
/**
* @file orderform.php
* @date 2018-09-03
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief order form
*/

View File

@ -3,7 +3,7 @@
* @file orderpay.pgkcp.php
* @date 2018-08-25
* @updated 2019-10-14
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief KCP PG(Payment Gateway) Controller
*/

View File

@ -3,7 +3,7 @@
* @file orderpay.step2.pgkcp.php
* @created_on 2018-08-27
* @updated_on 2020-01-25
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief KCP PG(Payment Gateway) contoller when done
*/

View File

@ -2,7 +2,7 @@
/**
* @file orderpay.step3.pgkcp.php
* @date 2018-08-27
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief KCP PG(Payment Gateway) contoller when done
*/

View File

@ -3,7 +3,7 @@ if(!defined("_DEF_RSF_")) set_error_exit("do not allow access");
$data = array(
"name" => "Hong gil dong",
"email" => "abuse@catswords.net",
"email" => "support@exts.kr",
"tel" => ""01000000000",
"base_url" => base_url()
);

View File

@ -2,7 +2,7 @@
/**
* @file webapp.php
* @date 2019-02-23
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief Isolator(Compatibility mode) for legacy application
*/

View File

@ -3,7 +3,7 @@
* @file base.php
* @created_on 2018-04-13
* @updated_on 2020-02-10
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief Base module
*/

View File

@ -3,7 +3,7 @@
* @file config.php
* @date 2018-04-13
* @updated 2020-03-25
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief Configuration module
*/

View File

@ -3,7 +3,7 @@
* @file database.php
* @created_on 2018-04-13
* @updated_on 2020-04-16
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief Database module
*/

View File

@ -3,7 +3,7 @@
* @file logger.php
* @created_on 2018-05-27
* @updated_on 2020-06-21
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief Logger module for ReasonableFramework
*/

View File

@ -3,7 +3,7 @@
* @file security.php
* @created_on 2018-05-27
* @updated_on 2020-02-04
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief Security module for ReasonableFramework
* @sponsor https://patreon.com/catswords (with advanced security)
*/

View File

@ -3,7 +3,7 @@
* @file storage.php
* @date 2018-05-27
* @updated 2020-06-16
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief Stroage module for ReasonableFramework
*/

View File

@ -2,8 +2,8 @@
/**
* @file uri.php
* @created_on 2018-04-13
* @updated_on 2024-04-29
* @author Go Namhyeon <abuse@catswords.net>
* @updated_on 2020-12-25
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief URI module
*/
@ -11,10 +11,10 @@ if(!is_fn("base_url")) {
function base_url() {
$base_url = "";
// #133 Add support 'X-Forwarded-Host' header
// 2020-12-25: #133 Add support 'X-Forwarded-Host' header
$forwarded_host = get_header_value("X-Forwarded-Host");
if(!empty($forwarded_host)) {
$base_url = sprintf("https://%s", $forwarded_host);
$base_url = sprintf("http://%s", $forwarded_host);
} else {
$base_url = get_config_value("base_url");
if(empty($base_url)) {
@ -61,7 +61,7 @@ if(!is_fn("read_route")) {
// get route in URI
if(empty($route)) {
if(loadHelper("networktool")) {
//$nevt = get_network_event(); // unused
$nevt = get_network_event();
$uri = $requests['_URI'];
if(strpos($uri, '?') !== false) {
@ -298,26 +298,8 @@ if(!is_fn("redirect_uri")) {
show_errors();
}
}
if(array_key_equals("method", $options, "html")) {
echo <<<EOF
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="refresh" content="1;url=$uri">
<title>Redirect</title>
</head>
<body>
<a id="goto" href="$uri">Go to the page</a>
<script>window.onload = function() { document.getElementById("goto").click(); };</script>
</body>
</html>
EOF;
} else {
header("Location: " . $uri, true, $permanent ? 301 : 302);
}
header("Location: " . $uri, true, $permanent ? 301 : 302);
exit();
}
}
@ -465,21 +447,3 @@ if(!is_fn("get_header_value")) {
return $value;
}
}
if(!is_fn("test_user_agent")) {
function test_user_agent($ua, $tua) {
$result = false;
if (!empty($ua)) {
$words = explode(" ", str_replace("/", " ", $ua));
foreach($words as $word) {
if (in_array($word, $tua)) {
$result = true;
break;
}
}
}
return $result;
}
}

View File

@ -18,7 +18,7 @@
<div class="content">
<h2 id="default-form" class="content-subhead">결제 환불 문의</h2>
<p>결제 환불 관련 문의는 <code>abuse@catswords.net</code>으로 해주시기 바랍니다.</p>
<p>결제 환불 관련 문의는 <code>support@exts.kr</code>으로 해주시기 바랍니다.</p>
<form id="orderform" name="orderform" method="post" class="pure-form pure-form-aligned" action="<?php echo base_url(); ?>">
<fieldset>

View File

@ -2,7 +2,7 @@
/**
* @file view_orderpay.pgkcp.php
* @date 2018-08-25
* @author Go Namhyeon <abuse@catswords.net>
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief KCP PG(Payment Gateway) View
*/