Total Pageviews

Friday, 1 May 2020

PhalApi,一个轻量级PHP开源接口框架

A PHP framework foucs on API fast development.接口,从简单开始!PhalApi简称π框架,一个轻量级PHP开源接口框架,专注于接口服务开发。 

PhalApi接口框架 / PhalApi API Framework

Latest Stable Version Total Downloads Latest Unstable Version License

开发文档 / Documents

专为PHPer准备的优雅而详细的开发文档,请看:PhalApi 2.x 开发文档
PhalApi 2.x English Docs.

在线示例 / Demo

快速安装 / Install

composer一键安装 / Install by composer

使用composer创建项目的命令,可实现一键安装。
One-click installation can be achieved by using the command of composer to create a project.
$ composer create-project phalapi/phalapi
温馨提示:关于composer的使用,请参考Composer 中文网 / Packagist 中国全量镜像

手动下载安装 / Download and Install manually

或者,也可以进行手动安装。将此Git项目代码下载解压后,进行可选的composer更新,即:
Alternatively, manual installation is also possible. Download PhalApi Project master-2x branch Source code. After downloading and unzipping, perform an optional composer update:
$ composer update

部署 / Deployment

Nginx配置 / Nginx Configuration

如果使用的是Nginx,可参考以下配置。
If you are using Nginx, you can refer to the following configuration.
server {
    listen 80;
    server_name dev.phalapi.net;
    # 将根目录设置到public目录
    root /path/to/phalapi/public;
    charset utf-8;

    location / {
        index index.php;
    }

    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        # 根据当前环境,选择合适的通讯方式
        # fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
}
配置时需要将网站根目录设置到public目录,配置保存后重启nginx。
Point the root path of the visit to public folder. Save and reload nginx.
温馨提示:推荐将访问根路径指向/path/to/phalapi/public。
Tips: It is recommended to point the root path of the visit to /path/to/phalapi/public.

数据库配置 / Database Configuration

如何使用的是MySQL数据库,参考修改./config/dbs.php数据库配置。
If you are using MySQL, please edit ./config/dbs.php.
return array(
    /**
     * DB数据库服务器集群 / database cluster
     */
    'servers' => array(
        'db_master' => array(                       // 服务器标记 / database identify
            'type'      => 'mysql',                 // 数据库类型,暂时只支持:mysql, sqlserver / database type
            'host'      => '127.0.0.1',             // 数据库域名 / database host
            'name'      => 'phalapi',               // 数据库名字 / database name
            'user'      => 'root',                  // 数据库用户名 / database user
            'password'  => '',                     // 数据库密码 / database password
            'port'      => 3306,                    // 数据库端口 / database port
            'charset'   => 'UTF8',                  // 数据库字符集 / database charset
            'pdo_attr_string'   => false,           // 数据库查询结果统一使用字符串,true是,false否
            'driver_options' => array(              // PDO初始化时的连接选项配置
                // 若需要更多配置,请参考官方文档:https://www.php.net/manual/zh/pdo.constants.php
            ),
        ),
    ),

    // 更多代码省略……
);
最后,需要给runtime目录添加写入权限。更多安装说明请参考文档下载与安装
At last, add writeable permission to folder runtime. For more detail about installation, refer to Download and Installation.

使用 / Usage

调用接口 / API Request

在PhalApi,你可以通过service参数(短名字是s参数)指定需要调用的接口服务。例如,访问默认接口服务。
For PhalApi, the default communicate protocol is HTTP/HTTPS. According to the specific implementation of the API service, we could use GET or POST to request. By default, you can specify the service parameter or s for short when requesting. The default API service is App.Site.Index.
对应执行的PHP代码在./src/app/Api/Site.php文件,源码片段如下:
The source PHP code of App.Site.Index API service is at ./src/app/Api/Site.php file.

namespace App\Api;
use PhalApi\Api;

/**
 * 默认接口服务类
 * @author: dogstar  2014-10-04
 */
class Site extends Api {
    public function getRules() {
        return array(
            'index' => array(
                'username'  => array('name' => 'username', 'default' => 'PhalApi', 'desc' => '用户名'),
            ),
        );
    }

    /**
     * 默认接口服务
     * @desc 默认接口服务,当未指定接口服务时执行此接口服务
     * @return string title 标题
     * @return string content 内容
     * @return string version 版本,格式:X.X.X
     * @return int time 当前时间戳
     * @exception 400 非法请求,参数传递错误
     */
    public function index() {
        return array(
            'title' => 'Hello ' . $this->username,
            'version' => PHALAPI_VERSION,
            'time' => $_SERVER['REQUEST_TIME'],
        );
    }
}
接口请求后结果输出类似如下:
API result as below after requesting:
{
    "ret": 200,
    "data": {
        "title": "Hello PhalApi",
        "version": "2.4.2",
        "time": 1501079142
    },
    "msg": ""
}
运行效果,截图如下:
Runtime Sreenshot:
_20190201151943

查看在线接口文档 / Visit Online API List Documents

PhalApi会根据你编写的接口的参数配置和代码注释,自动实时生成在线接口文档。在线接口文档链接为:
PhalApi will generate realtime online API documents automatically by PHP code and PHP comments. You can visit them by:
浏览效果类似如下:
Preview:

进入Portal运营平台 / Use Portal Platform

PhalApi采用了当前流行且优秀的layuimin开发全新的管理后台,专门提供给非技术的运营人员使用(技术人员也可使用)。安装Portal前请先配置好数据库连接。如果需要单独升级Portal,可进入应用市场免费下载到本地后安装升级。
PhalApi provides a new management system and we name it Portal.

翻译 / i18n

修改./public/init.php文件,可设置当前语言。
Edit ./public/init.php file to set current language.
// 翻译语言包设定-简体中文
\PhalApi\SL('zh_cn');

// Setting language to English
\PhalApi\SL('en');

一张图告诉你如何使用PhalApi 2.x / All in One Picture

phalapi-install

子项目 / Sub Projects

还有问题,怎么办?/ Any Question?

如发现问题,或者任何问题,欢迎提交Issue到这里,或进入PhalApi开源社区
如果喜欢,请帮忙在Github码云给个Star,也可以对PhalApi进行捐赠哦 ^_^。
Welcome to report any issue here.
If you like PhalApi, welcome to give us a Star at Github.

QLadder, shadowsocks在ios上的一个客户端程序

QLadder is a project for iOS client. It uses shadowsocks as server-side.

Xcode 10 and Swift 4.2.
Use carthage update --no-use-binaries --platform mac,ios to install all frameworks.
Is also uses CocoaPod to manage some dependencies.
Any question is welcome.

Support Us

  • Support the excellent projects mentioned above(NEKitPotatso, etc. ).
frm https://github.com/lettleprince/QLadder
----

A solution for the IWE (Immersive Wallless Experience) on iOS platform. 

Ladder

A solution for the IWE (Immersive Wallless Experience) on iOS platform.
Keep in mind:
The scenery outside the wall is beautiful and dangerous.

Features

  • Hide VPN Icon
  • PAC (Proxy auto-config)
  • Multiple Shadowsocks Method
    • AES-128-CFB
    • AES-192-CFB
    • AES-256-CFB (RECOMMENDED)
    • ChaCha20
    • Salsa20
    • RC4-MD5

Requirements

Installation

  1. Check out the latest version of the project:
$ git clone https://github.com/sheng/ladder-ios.git
  1. Enter the project directory, check out the project's dependencies:
$ cd ladder-ios
$ carthage update --no-use-binaries --platform ios
  1. Open the Ladder.xcodeproj.
  2. Build and run the Ladder scheme.
  3. Enjoy yourself.

Community

If you want to discuss this project, or ask questions about it, simply post questions or ideas here.

whichCDN

WhichCDN allows to detect if a given website is protected by a Content Delivery Network 

Requirements

Install the necessary python packages.
pip install -r requirements.txt

Usage

To scan a website, run whichCDN followed by the target URL or its domain name
whichCDN http://www.example.com | example.com

CDN supported

  • Cloudflare
  • Incapsula
  • Cloudfront
  • Akamai
  • Airee
  • CacheFly
  • EdgeCast
  • MaxCDN
  • Beluga
  • Limelight
  • Fastly
  • Myracloud
  • Microsft Azure

Todo

  • Azion
  • ArvanCloud
  • Beluga
  • DN77
  • CDNetwork
  • CDNsun
  • CDNvideo
  • ChinaCache
  • ChinaNetCenter
  • Highwinds
  • KeyCDN
  • Level3
  • NGENIX
  • Quantil
  • SkyparkCDN
  • Verizon Digital Media services
  • Turbobyte

More docs

Help is available by running whichCDN -help

waimai



当前分支使用ThinkPHP 5.0.24 开发。2.2分支不再维护。

超级外卖是专业的外卖订餐系统,使用它,不用写代码,只要会打字,就可以管理网站。 前台设计采用采用html5与css3设计,兼容IE6+、Firefox、Chrome、Safari、Opera等主流浏览器. 并可以在微博,微信中完美显示。后台功能模块化设计,用户操作方便。 易于上手,即安即用。 适合餐馆,酒店,外卖平台,糕点店,海鲜店.
测试版正式发布
安装方法: 上传网站目录,运行http://www.***.com/install 自动完成安装。 演示图片在uploads/fimg下,删除即可。 后台操作后,要清除缓存. 谢谢您的支持。
后台密码为admin 111111

ACI是一套基于PHP端的后台管理程序

更多信息请访问autocodeigniter.com

这是一套基于PHP端后台管理程序,兼容BOOSTRAP
V3.0,集成了用户管理,用户组管理,模块管理,菜单管理,权限管理,非常友好的支持二次开发及代码一站式自定义模块导入,最最关键的一点的基于Codeigniter 。
侧重点在于:做后台管理,企业级应用,APP管理程序,APP移动应用API接口,做毕业设计更是小菜一碟。

演示版本 http://demo.autocodeigniter.com
视频教程: http://www.youku.com/playlist_show/id_26135511.html
更多信息请访问http://www.autocodeigniter.com 。

区别于其他权限系统特色
1. 权限可以控制在按钮上面,如果这个页面中的按钮是编辑连接按钮,而当前用户没有权限是不会显示出来的。
2. 增加了模块管理环节,没有注册的模块无法正常使用.

frm https://github.com/hubinjie/ACI

TeamTalk


TeamTalk is a solution for enterprise IM

具体文档见doc目录下,安装之前请仔细阅读相关文档。

交流

 建议大家在开发过程中遇到问题,提交issues到https://github.com/mogujie/TeamTalk/issues  
frm https://github.com/meili/TeamTalk