本文整理汇总了PHP中MCAPI::closeOneOhSecurityHole方法的典型用法代码示例。如果您正苦于以下问题:PHP MCAPI::closeOneOhSecurityHole方法的具体用法?PHP MCAPI::closeOneOhSecurityHole怎么用?PHP MCAPI::closeOneOhSecurityHole使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MCAPI
的用法示例。
在下文中一共展示了MCAPI::closeOneOhSecurityHole方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: list
isset($_COOKIE['chimpunlock']) and list($username, $password) = explode('|', $_COOKIE['chimpunlock']) or isset($_POST['username']) and $username = $_POST['username'] and isset($_POST['pass']) and $password = $_POST['pass'] or list($username, $password) = array(null, null);
#die(serialize(array($username, $password)));
$mc = new MCAPI($username, $password);
if (!$mc->api_key) {
setcookie('chimpunlock', null);
die((isset($_POST['username']) ? 'Couldn\'t log in: ' . $mc->errorMessage : '') . '
<form action="#" method="POST">
<input type="text" name="username"/>
<input type="password" name="pass"/>
<input type="submit" value="Login"/>
</form>');
} else {
setcookie('chimpunlock', "{$username}|{$password}");
#header('Location: '.$_SERVER['PHP_SELF']) and die();
}
$mc->closeOneOhSecurityHole($username, $password) or $mc->errorCode == 101 or die('Security hole still open.' . $mc->errorCode . ': ' . $mc->errorMessage);
if (isset($_REQUEST['action'])) {
switch ($_REQUEST['action']) {
case 'expire':
$mc->apikeyExpire($username, $password);
break;
case 'add':
$mc->apikeyAdd($username, $password, $_REQUEST['key']);
break;
}
header('Location: ' . $_SERVER['PHP_SELF']) and die;
}
echo '
<table>
<thead>
<tr>