Example #1
0
function windows()
{
    $html_title = 'workerman windows 版本下载安装';
    $html_nav = 'windows';
    $html_keywords = 'workerman windows版本';
    $download_workermanwin_count_key = 'download_workermanwin_count';
    $workermanwin_download_count = \WorkerMan\Lib\Store::get($download_workermanwin_count_key);
    include NET_ROOT . '/Views/header.tpl.php';
    include NET_ROOT . '/Views/windows.tpl.php';
    include NET_ROOT . '/Views/footer.tpl.php';
}
function workerman_statistics()
{
    $html_title = 'workerman-statistics | 一个高性能的PHP监控统计系统';
    $html_nav = 'applications';
    $github_repo = 'workerman-statistics';
    $html_keywords = 'php 监控统计系统';
    $download_statistics_count_key = 'download_statistics_count';
    $statistics_download_count = \WorkerMan\Lib\Store::get($download_statistics_count_key);
    include NET_ROOT . '/Views/header.tpl.php';
    include NET_ROOT . '/Views/workerman-statistics.tpl.php';
    include NET_ROOT . '/Views/footer.tpl.php';
}
function workerman_thrift()
{
    $html_title = 'workerman-thrift-rpc | 一个高性能的PHP Thrift Rpc框架';
    $html_nav = 'applications';
    $github_repo = 'workerman-thrift';
    $html_keywords = 'php thrift';
    $download_thrift_count_key = 'download_thrift_count';
    $thrift_download_count = \WorkerMan\Lib\Store::get($download_thrift_count_key);
    include NET_ROOT . '/Views/header.tpl.php';
    include NET_ROOT . '/Views/workerman-thrift.tpl.php';
    include NET_ROOT . '/Views/footer.tpl.php';
}
Example #4
0
function web_sender()
{
    $html_title = 'WEB推送 | 一个WEB消息推送框架,基于WebSocket';
    $html_nav = 'applications';
    $github_repo = 'web-msg-sender';
    $html_keywords = 'web推送';
    $download_sender_count_key = 'download_sender_count';
    $sender_download_count = \WorkerMan\Lib\Store::get($download_sender_count_key);
    include NET_ROOT . '/Views/header.tpl.php';
    include NET_ROOT . '/Views/sender.tpl.php';
    include NET_ROOT . '/Views/footer.tpl.php';
}
Example #5
0
function browserquest()
{
    $html_title = 'browserquest | MMO 多人在线游戏 BrowserQuest PHP 版本';
    $html_nav = 'applications';
    $html_keywords = 'BrowserQuest php版本';
    $github_repo = 'BrowserQuest-php';
    $download_browserquest_count_key = 'download_browserquest_count';
    $browserquest_download_count = \WorkerMan\Lib\Store::get($download_browserquest_count_key);
    include NET_ROOT . '/Views/header.tpl.php';
    include NET_ROOT . '/Views/browserquest.tpl.php';
    include NET_ROOT . '/Views/footer.tpl.php';
}
function workerman_flappybird()
{
    $html_title = 'workerman-flappy-bird | flappy bird (像素小鸟)多人在线版源代码 PHP+Websocket+HTML5';
    $html_nav = 'applications';
    $github_repo = 'workerman-flappy-bird';
    $html_keywords = '多人在线小鸟,php websocket';
    $download_flappybird_count_key = 'download_flappybird_count';
    $flappybird_download_count = \WorkerMan\Lib\Store::get($download_flappybird_count_key);
    include NET_ROOT . '/Views/header.tpl.php';
    include NET_ROOT . '/Views/workerman-flappybird.tpl.php';
    include NET_ROOT . '/Views/footer.tpl.php';
}
function workerman_vmstat()
{
    $html_title = 'VMStat服务器状态监控服务';
    $html_nav = 'applications';
    $github_repo = 'workerman-vmstat';
    $html_keywords = 'php socket, vmstat';
    $download_vmstat_count_key = 'download_vmstat_count';
    $vmstat_download_count = \WorkerMan\Lib\Store::get($download_vmstat_count_key);
    include NET_ROOT . '/Views/header.tpl.php';
    include NET_ROOT . '/Views/workerman-vmstat.tpl.php';
    include NET_ROOT . '/Views/footer.tpl.php';
}
Example #8
0
function workerman()
{
    $html_title = '介绍 | workerman PHP Socket 服务器框架';
    $html_desc = '';
    $html_keywords = 'workerman介绍';
    $html_nav = 'about';
    $download_workerman_count_key = 'download_workerman_count';
    $workerman_download_count = \WorkerMan\Lib\Store::get($download_workerman_count_key);
    include NET_ROOT . '/Views/header.tpl.php';
    include NET_ROOT . '/Views/workerman.tpl.php';
    include NET_ROOT . '/Views/footer.tpl.php';
}
function workerman_todpole()
{
    $html_title = 'workerman-todpole | PHP蝌蚪聊天室 HTML5+WebSocket+PHP 服务器实时推送技术';
    $html_nav = 'applications';
    $github_repo = 'workerman-todpole';
    $html_keywords = '小蝌蚪聊天室, PHP websocket';
    $download_todpole_count_key = 'download_todpole_count';
    $todpole_download_count = \WorkerMan\Lib\Store::get($download_todpole_count_key);
    include NET_ROOT . '/Views/header.tpl.php';
    include NET_ROOT . '/Views/workerman-todpole.tpl.php';
    include NET_ROOT . '/Views/footer.tpl.php';
}
Example #10
0
function camera()
{
    $html_title = 'LiveCamera | PHP+Websocket+HTML5调用摄像头实现视频直播';
    $html_nav = 'camera';
    $html_keywords = 'php websocket, php html5 摄像头';
    $github_repo = 'live-camera';
    $download_camera_count_key = 'download_camera_count';
    $camera_download_count = \WorkerMan\Lib\Store::get($download_camera_count_key);
    include NET_ROOT . '/Views/header.tpl.php';
    include NET_ROOT . '/Views/camera.tpl.php';
    include NET_ROOT . '/Views/footer.tpl.php';
}
function workerman_jsonrpc()
{
    $html_title = 'workerman-json-rpc | 一个高性能的PHP Json Rpc框架';
    $html_nav = 'applications';
    $github_repo = 'workerman-jsonrpc';
    $html_keywords = 'php json rpc';
    $download_jsonrpc_count_key = 'download_jsonrpc_count';
    $jsonrpc_download_count = \WorkerMan\Lib\Store::get($download_jsonrpc_count_key);
    include NET_ROOT . '/Views/header.tpl.php';
    include NET_ROOT . '/Views/workerman-jsonrpc.tpl.php';
    include NET_ROOT . '/Views/footer.tpl.php';
}
Example #12
0
function workerman_chat()
{
    $html_title = 'workerman-chat | 一个高性能的PHP 聊天室框架';
    $html_nav = 'applications';
    $github_repo = 'workerman-chat';
    $html_keywords = 'php聊天室,php websocket聊天室';
    $html_desc = 'workerman-chat 是一款基于PHP websocket开发的支持分布式部署的聊天室框架,支持群聊和私聊';
    $download_chat_count_key = 'download_chat_count';
    $chat_download_count = \WorkerMan\Lib\Store::get($download_chat_count_key);
    include NET_ROOT . '/Views/header.tpl.php';
    include NET_ROOT . '/Views/workerman-chat.tpl.php';
    include NET_ROOT . '/Views/footer.tpl.php';
}
Example #13
0
function home()
{
    if (!empty($_GET)) {
        return _header('Location: /', 301);
    }
    $html_title = 'workerman 一个高性能的PHP Socket 服务器框架';
    $html_keywords = 'workerman, php socket';
    $html_desc = 'Workerman是一款纯PHP开发的开源高性能的PHP socket服务器框架。支持TCP长连接,支持Websocket等诸多协议。被广泛的用于手机app、手游服务端、网络游戏服务器、聊天室、硬件通讯、智能家居、车联网、物联网等领域的开发。';
    $html_nav = 'home';
    $download_workerman_count_key = 'download_workerman_count';
    $workerman_download_count = \WorkerMan\Lib\Store::get($download_workerman_count_key);
    include NET_ROOT . '/Views/header.tpl.php';
    include NET_ROOT . '/Views/home.tpl.php';
    include NET_ROOT . '/Views/footer.tpl.php';
}
Example #14
0
function download_senderzip()
{
    $download_sender_count_key = 'download_sender_count';
    $count = \WorkerMan\Lib\Store::get($download_sender_count_key);
    $count = $count >= 0 ? intval($count) : 0;
    \WorkerMan\Lib\Store::set($download_sender_count_key, ++$count);
    return _header('Location: https://github.com/walkor/web-msg-sender/archive/master.zip');
}
Example #15
0
<?php

require_once __DIR__ . '/_init.php';
\WorkerMan\Lib\Store::config(NET_ROOT . '/data/data.php');
$url_info = parse_url($_SERVER['REQUEST_URI']);
if (isset($url_info['path'])) {
    $path = $url_info['path'];
} else {
    $path = '';
}
$host_name = 'www.workerman.net';
if (0 !== strpos($_SERVER['HTTP_HOST'], $host_name)) {
    return _header('Location: http://' . $host_name . $_SERVER['REQUEST_URI'], true, 301);
}
if (!empty($_GET)) {
    $url_data = parse_url($_SERVER['REQUEST_URI']);
    if (isset($url_data['path'])) {
        return _header('Location: http://' . $host_name . $url_data['path'], true, 301);
    }
}
$tmp_arr = explode('/', $path);
foreach ($tmp_arr as $key => $value) {
    if (trim($value) == '') {
        unset($tmp_arr[$key]);
    }
}
$tmp_arr = array_values($tmp_arr);
if (isset($tmp_arr[0])) {
    $func = "\\Workerman\\Modules\\{$tmp_arr[0]}";
    if (isset($tmp_arr[1])) {
        $func .= '_' . $tmp_arr[1];