Skip to content

Instantly share code, notes, and snippets.

<?php
// 解析ssr订阅
$code = '';
$decode = base64_decode($code);
@helieting
helieting / ddns.php
Created January 24, 2019 06:23
aliyun ddns
<?php
include_once 'aliyun-php-sdk-core/Config.php';
use Alidns\Request\V20150109 as Alidns;
$domain = 'www.cn';
$ip = getIP();
$rr = '@';
$key = 'xxxxxxxx';
$secret = 'yyyyyyyy';
@helieting
helieting / index.php
Created September 23, 2016 14:40
redis 并发
<?php
$redis = new redis();
$redis->connect('127.0.0.1');
$num = 10;
tryagain:
$len = $redis->llen('order:1');
if($len > $num) {
@helieting
helieting / index.html
Created September 15, 2014 12:43
bootstrap single page
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="http://cdn.staticfile.org/twitter-bootstrap/3.2.0/css/bootstrap.min.css">
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<form name="textform">
<div align="center">
<p>
@helieting
helieting / nusoap client without wsdl 1
Created October 15, 2012 09:21
nusoap client without wsdl
<?php
// SoapAction : SmsMoSync
date_default_timezone_set('Asia/Shanghai');
require_once './nusoap.php';
// Create the client instance
$client = new soapclient('http://x,x,x,x:9180/ct/services/CTZJHZ');
$client->soap_defencoding = 'utf-8';
@helieting
helieting / PSR-0-final-proposal.md
Created September 6, 2012 09:21 — forked from Thinkscape/PSR-0-final-proposal.md
PSR-0 Final Proposal (PHP Standards Working Group)

PSR-0 Final Proposal (PHP Standards Working Group)

The following describes the mandatory requirements that must be adhered to for autoloader interoperability.

Mandatory:

  • A fully-qualified namespace and class must have the following structure \ <Vendor Name> \ (<Namespace>)* \ <Class Name>
  • Each namespace must have a top-level namespace ("Vendor Name").
  • Each namespace can have as many sub-namespaces as it wishes.
  • Each namespace separator is converted to a DIRECTORY_SEPARATOR when loading from the file system.
  • Each "_" character in the CLASS NAME is converted to a DIRECTORY_SEPARATOR. The "_" character has no special meaning in the namespace.
@helieting
helieting / client.php
Created June 6, 2012 08:11
nusoap example1
<?php
// Pull in the NuSOAP code
require_once('nusoap.php');
// Create the client instance
$client = new soapclient('http://localhost/phphack/hellowsdl.php?wsdl', true);
// Check for an error
$err = $client->getError();
if ($err) {
// Display the error
echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
@helieting
helieting / client.php
Created June 6, 2012 08:08
nusoap example2
<?php
// Pull in the NuSOAP code
require_once('nusoap.php');
// Create the client instance
$client = new soapclient('http://localhost/phphack/hellowsdl2.php?wsdl', true);
// Check for an error
$err = $client->getError();
if ($err) {
// Display the error
echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
@helieting
helieting / doctrine
Created March 28, 2012 09:28
doctrine:doctrine-console
#!/usr/bin/env php
<?php
include('doctrine.php');