This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* PHP飞信发送类-增强版 | |
* | |
* 本项目基于quanhengzhuang在google code上面的项目php-fetion | |
* 基于php-fetion版本1.2.1 | |
* | |
* @author horsley <i@a-li.me> | |
* @version 1.1.0 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//模板文件路径定义 | |
if (!defined('TPL_ROOT_PATH')) define('TPL_ROOT_PATH', dirname(__FILE__).'/tpl'); | |
class Template { | |
private $_data = array(); | |
private $_tpl_name; | |
function __construct($tpl_name = '') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
/** | |
* lnmp的设置补丁以适应awstats日志统计 | |
* @author: horsley <imhorsley@qq.com> | |
* | |
* 可用于lnmp和lnmpa,已在0.8和0.9版本上面测试过,默认状态的日志格式有误,少了双引号 | |
*/ | |
error_reporting(E_ALL); | |
//虚拟主机脚本 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Created by JetBrains PhpStorm. | |
* User: horsley | |
* Date: 12-12-16 | |
* Time: 下午10:19 | |
* To change this template use File | Settings | File Templates. | |
*/ | |
if (!defined("TRAN_DICT_PATH")) define("TRAN_DICT_PATH", dirname(dirname(__FILE__)) . '/data/translations.json'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$result = array(); | |
$result_html = ''; | |
if (isset($_POST['domain']) && !empty($_POST['domain'])) { | |
$domain_regex = '/[a-z\d][a-z\-\d\.]+[a-z\d]/i'; | |
if (preg_match($domain_regex, $_POST['domain'])) { | |
if ($url = parse_url($_POST['domain'])) { //compatible when user post an url instead of a domain | |
if (isset($url['host'])) { | |
$result = dns_get_record($url['host'], DNS_A + DNS_AAAA + DNS_CNAME); | |
} else if (isset($url['path'])) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Implementation of a UDP proxy | |
package main | |
import ( | |
"flag" | |
"fmt" | |
"log" | |
"net" | |
"os" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* A simple PHP script to get vps's status from solus api | |
* | |
*/ | |
set_time_limit(180); | |
$serv_array = array( | |
array(//an vps | |
'api_server' => 'https://solus.hostigation.com:5656', //panel login page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
/** | |
* Created by JetBrains PhpStorm. | |
* User: horsley | |
* Date: 13-1-30 | |
* Time: 上午1:00 | |
* To change this template use File | Settings | File Templates. | |
* | |
* cron -e and add this file , remember chmod + x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Created by JetBrains PhpStorm. | |
* User: Horsley | |
* Date: 12-4-30 | |
* Time: 下午3:47 | |
* To change this template use File | Settings | File Templates. | |
*/ | |
$act = $_GET['action']; | |
switch($act){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @author Anush Prem <goku.anush@gmail.com> | |
* @package Solver | |
* @subpackage Sudoku | |
* @version 0.1 | |
*/ | |
/** |
OlderNewer