public static function getSignature($timestamp, $nonce, $signature) { if (!$signature || !$timestamp || !$nonce) { return W::errReturn(Rc::RC_VAR_ERROR); } $tmp = array(WeixinConfig::WX_TOKEN, $timestamp, $nonce); sort($tmp, SORT_STRING); return sha1(implode($tmp)); }
public function fZ() { print "In Z::fZ()\n"; $this->fPrivateZ(); $this->fPrivate(); $this->fProtected(); $this->fPublic(); } } print "=== X ===\n"; $x = new X(); anon($x); W::fW($x); $x->fX(); #$x->fY(); #$x->fZ(); print "=== Y ===\n"; $y = new Y(); anon($y); W::fW($y); $y->fX(); $y->fY(); #$y->fZ(); print "=== Z ===\n"; $z = new Z(); anon($z); W::fW($z); $z->fX(); $z->fY(); $z->fZ(); print "Test end\n";
exit(W::response($xml, $data, 'news')); break; case 17: $res = wooyun(); $data = array(array('title' => 'wooyun.org 最新提交漏洞', 'cover' => $web . '/img/wooyun.png')); for ($i = 0; $i < count($data); $i++) { if ($res[$i]) { array_push($data, array('title' => $res[$i]['title'], 'note' => $res[$i]['description'], 'link' => $res[$i]['link'])); } } exit(W::response($xml, $data, 'news')); break; case 18: $res = sec0x50(); $data = array(array('title' => 'Web安全手册,专注Web安全', 'cover' => $web . '/img/0x50sec.png')); for ($i = 0; $i < count($data); $i++) { if ($res[$i]) { array_push($data, array('title' => $res[$i]['title'], 'note' => $res[$i]['description'], 'link' => $res[$i]['link'])); } } exit(W::response($xml, $data, 'news')); break; default: break; } } else { //exit(W::response($xml,simsimi($content))); exit(W::response($xml, xiaodoubi($content))); } } }
} else { exit(W::response($xml, $data)); } } else { if (rand(1, 10) == 6) { $data = randEngine(); if (is_array($data)) { if ($data['musicurl']) { exit(W::response($xml, $data, 'music')); } exit(W::response($xml, $data, 'news')); } else { exit(W::response($xml, $data)); } } else { $simiword = simsimi($content); if ($simiword == '404') { $data = randEngine(); if (is_array($data)) { if ($data['musicurl']) { exit(W::response($xml, $data, 'music')); } exit(W::response($xml, $data, 'news')); } else { exit(W::response($xml, $data)); } } exit(W::response($xml, $simiword)); } } }
public function ll() { echo 'in Man ll <br/>'; self::say(); static::say(); //如果子类中没有say则才会调用父类的 } } class W extends Man { public static function say() { echo 'in W say <br/>'; } } $w = new W(); $w->ll(); W::live(); /* in Man ll in Man say in W say in Man live in Man say in W say */ class a { public static function af() { echo 'in a:af<br/>';
} else { exit(W::response($xml, $data)); } } else { if (rand(1, 8) == 6) { switch (rand(1, 4)) { case 1: exit(W::response($xml, "聊了这么久小u给你讲个笑话吧:\n" . jokes())); break; case 2: $news = baiduNews(); $data = array(array('title' => '关心国家大事,了解天下奇谈,小u给你播报新闻啦!')); for ($i = 0; $i < 5; $i++) { array_push($data, array('title' => $news[title][$i] . "\n" . '------------------------------------------', 'note' => $news[resrc][$i], 'link' => $news[url][$i])); } exit(W::response($xml, $data, 'news')); break; case 3: exit(W::response($xml, "四六级没考过吧孩子,还是乖乖跟我学英语,嗯哼:\n" . en_sentenceAPI() . "\n哎哟,你还可以发英语单词考我哦,没有我不知道的,嘻嘻/:B-)")); break; case 4: exit(W::response($xml, "妹子爆个照吧,小u想看看嘛,看了会说话嘛/:8*")); break; default: break; } } else { exit(W::response($xml, simsimi($content))); } } }
<?php define('W_TIME', $_SERVER['REQUEST_TIME']); define('W_DATE', date('Y-m-d', W_TIME)); define('W_HOST', $_SERVER['HTTP_HOST']); define('W_ROOT_PATH', dirname(__FILE__)); define('YII_DEBUG', True); define('YII_TRACE_LEVEL', 3); $yiiFile = W_ROOT_PATH . '/framework/yii.php'; $wFile = W_ROOT_PATH . '/protected/components/W.php'; require $wFile; require $yiiFile; Yii::createWebApplication(W::getConfig())->run();
public function errAjax($rc, $errMsg = '') { return $this->onAjax(W::errReturn($rc, $errMsg)); }