本文整理匯總了PHP中Globals::stalk方法的典型用法代碼示例。如果您正苦於以下問題:PHP Globals::stalk方法的具體用法?PHP Globals::stalk怎麽用?PHP Globals::stalk使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Globals
的用法示例。
在下文中一共展示了Globals::stalk方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: doInit
function doInit()
{
if (Config::$pass == null) {
Config::$pass = trim(file_get_contents(getenv("HOME") . '/.cluebotng.password.only'));
}
API::init();
API::$a->login(Config::$user, Config::$pass);
Globals::$mysql = false;
checkMySQL();
Globals::$tfas = 0;
Globals::$stdin = fopen('php://stdin', 'r');
Globals::$run = API::$q->getpage('User:' . Config::$user . '/Run');
Globals::$wl = API::$q->getpage('Wikipedia:Huggle/Whitelist');
Globals::$optin = API::$q->getpage('User:' . Config::$user . '/Optin');
Globals::$aoptin = API::$q->getpage('User:' . Config::$user . '/AngryOptin');
Globals::$stalk = array();
Globals::$edit = array();
$tmp = explode("\n", API::$q->getpage('User:' . Config::$owner . '/CBAutostalk.js'));
foreach ($tmp as $tmp2) {
if (substr($tmp2, 0, 1) != '#') {
$tmp3 = explode('|', $tmp2, 2);
Globals::$stalk[$tmp3[0]] = trim($tmp3[1]);
}
}
$tmp = explode("\n", API::$q->getpage('User:' . Config::$owner . '/CBAutoedit.js'));
foreach ($tmp as $tmp2) {
if (substr($tmp2, 0, 1) != '#') {
$tmp3 = explode('|', $tmp2, 2);
Globals::$edit[$tmp3[0]] = trim($tmp3[1]);
}
}
}
示例2: doInit
function doInit()
{
if (Config::$pass == null) {
Config::$pass = trim(file_get_contents(getenv('HOME') . '/.cluebotng.password.only'));
}
Api::init();
Api::$a->login(Config::$user, Config::$pass);
Globals::$tfas = 0;
Globals::$stdin = fopen('php://stdin', 'r');
Globals::$run = Api::$q->getpage('User:' . Config::$user . '/Run');
Globals::$wl = Api::$q->getpage('Wikipedia:Huggle/Whitelist');
Globals::$optin = Api::$q->getpage('User:' . Config::$user . '/Optin');
Globals::$aoptin = Api::$q->getpage('User:' . Config::$user . '/AngryOptin');
Globals::$stalk = array();
Globals::$edit = array();
$tmp = explode("\n", Api::$q->getpage('User:' . Config::$owner . '/CBAutostalk.js'));
foreach ($tmp as $tmp2) {
if (strlen($tmp2) > 0 && substr($tmp2, 0, 1) != '#') {
$tmp3 = explode('|', $tmp2, 2);
if (count($tmp3) == 2) {
Globals::$stalk[$tmp3[0]] = trim($tmp3[1]);
} else {
print "Skipping auto stalk entry: {$tmp2}\n";
}
}
}
$tmp = explode("\n", Api::$q->getpage('User:' . Config::$owner . '/CBAutoedit.js'));
foreach ($tmp as $tmp2) {
if (strlen($tmp2) > 0 && substr($tmp2, 0, 1) != '#') {
$tmp3 = explode('|', $tmp2, 2);
if (count($tmp3) == 2) {
Globals::$edit[$tmp3[0]] = trim($tmp3[1]);
} else {
print "Skipping auto edit entry: {$tmp2}\n";
}
}
}
}