本文整理汇总了PHP中httpget函数的典型用法代码示例。如果您正苦于以下问题:PHP httpget函数的具体用法?PHP httpget怎么用?PHP httpget使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了httpget函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: binarypuzzle_run
function binarypuzzle_run()
{
global $session;
page_header("Binary Puzzle Thing!");
addnav("O?Back to the Outpost", "village.php");
switch (httpget('op')) {
case "start":
//first set up the board
$switches = array(1 => array("val" => 1, "status" => 0), 2 => array("val" => 2, "status" => 0), 3 => array("val" => 4, "status" => 0), 4 => array("val" => 8, "status" => 0), 5 => array("val" => 16, "status" => 0), 6 => array("val" => 32, "status" => 0), 7 => array("val" => 64, "status" => 0), 8 => array("val" => 128, "status" => 0));
shuffle($switches);
set_module_pref("switches", serialize($switches));
//Now set up the clues
$clues = array();
for ($i = 1; $i <= 8; $i++) {
$toprange = $i * 32;
$bottomrance = $toprange - 32;
$clues[$i] = e_rand($bottomrange, $toprange);
}
$goal = e_rand(129, 255);
set_module_pref("clues", serialize($clues));
binarypuzzle_show($switches, $goal);
break;
case "switch":
$sw = httpget('switch');
$goal = httpget('goal');
$switches = binarypuzzle_switch($sw);
binarypuzzle_show($switches, $goal);
break;
}
page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:binarypuzzle.php
示例2: mutemod_domute
function mutemod_domute($id)
{
global $session;
$op = httpget('op');
if (is_module_active("biocomment") && httpget('refresh')) {
return false;
}
if ($op == "mute") {
set_module_pref("muted", 1, false, $id);
modulehook("mute", array("userid" => $id, "staffid" => $session['user']['acctid'], "when" => date("Y-m-d H:i:s")));
output("`n`\$This player has now been muted!");
output("`nThis will last until it is lifted, by you or another member of staff!`0`n");
} elseif ($op == "unmute") {
set_module_pref("muted", 0, false, $id);
output("`n`\$This player has now been unmuted!");
output("`nThey can talk again!`0`n");
} elseif ($op == "tempmute") {
set_module_pref("tempmute", 1, false, $id);
modulehook("tempmute", array("userid" => $id, "staffid" => $session['user']['acctid'], "length" => 1, "when" => date("Y-m-d H:i:s")));
output("`n`\$This player has now been muted temporarily!");
output("`nThey cannot talk until the next new day!`0`n");
} elseif ($op == "untempmute") {
set_module_pref("tempmute", 0, false, $id);
output("`n`\$This player has now been unmuted (from a temporary mute)!");
output("`nThey can talk again!`0`n");
} elseif ($op == "exttempmute") {
$tmuted = get_module_pref("tempmute", false, $id) + 1;
set_module_pref("tempmute", $tmuted, false, $id);
modulehook("tempmute", array("userid" => $id, "staffid" => $session['user']['acctid'], "length" => $tmuted, "when" => date("Y-m-d H:i:s")));
output("`n`\$This player´s tempory mute has been extended!");
output("`nThey cannot talk until %s days have passed!`0`n", $tmuted);
}
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:33,代码来源:mutemod.php
示例3: improbablehousing_run
function improbablehousing_run()
{
global $session;
$op = httpget("op");
require_once "modules/improbablehousing/run/{$op}.php";
page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:7,代码来源:improbablehousing.php
示例4: dwellings_run
function dwellings_run()
{
checkday();
page_header("Dwellings");
global $session;
$op = httpget("op");
$dwid = httpget('dwid');
$type = httpget('type');
debug(get_module_pref("location_saver"));
if ($type == "" && $dwid > 0) {
$sql = "SELECT type FROM " . db_prefix("dwellings") . " WHERE dwid={$dwid}";
$result = db_query($sql);
$row = db_fetch_assoc($result);
$type = $row['type'];
}
$cityid = httpget('cityid');
require_once "modules/dwellings/run/case_{$op}.php";
if ($op != "list" && $op != "") {
addnav("Leave");
addnav("Return to Hamlet", "runmodule.php?module=dwellings");
} else {
addnav("Navigation");
villagenav();
}
page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:26,代码来源:dwellings.php
示例5: titans_run
function titans_run()
{
global $session;
$titanop = httpget("titanop");
require_once "modules/titans/run/{$titanop}.php";
page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:7,代码来源:titans.php
示例6: pinata_runevent
function pinata_runevent($type, $link)
{
global $session;
$from = $link;
$session['user']['specialinc'] = "module:pinata";
$op = httpget('op');
if ($op == "") {
output("`#You discover a small `@bright green dragon pinata `#hanging from the branch of an old oak tree.");
output("As it twists and turns slightly in the gentle breeze, you wonder what treats may be contained within.`n`n");
output("Looking for something to swing at the `@pinata, `#you see leaning against the tree a stout branch, stripped of leaves.");
output("Breaking the `@pinata `#may yield precious resources, or it may result in exhaustion in the attempt to break it.`n`n");
output("`%Do you wish to take a swing?`0");
addnav("Swing", $from . "op=swing");
addnav("Don't Swing", $from . "op=noswing");
} elseif ($op == "swing") {
output("`#Knowing that trying to break the `@pinata `#could yield disappointment, you decide to take your chances.`n`n");
output("Picking up the stout branch in both hands, you take a deep breath as you step up to swing.");
output("`#You plant your feet and bring your arms back.`n`n");
output("`i`^The silence around you is broken by the whistle of the branch cutting the air`i.`0`n`n");
pinata_hit();
$session['user']['specialinc'] = "";
} else {
$session['user']['specialinc'] = "";
output("`&You are not confident in your ability to strike and break the `@pinata, `&so you return to the forest and leave it gently swaying from the branch waiting for the next warrior to come by.`0");
}
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:26,代码来源:pinata.php
示例7: rail_peddler_run
function rail_peddler_run()
{
global $session, $inventory;
$op = httpget("op");
$loc = rail_peddler_getloc();
$hid = $loc["peddlerhid"];
$rid = $loc["peddlerrid"];
$price = get_module_setting("peddlerprice");
if ($op == "buy") {
$headertext = "Why sure, I'll take one of those!";
} else {
$headertext = "Go away, I'm busy.";
}
page_header($headertext);
switch ($op) {
case "buy":
output("The scruffy vendor's eyes gleam. Was that a fla`gs`0h of green, or no? \"`2Verra wise, %s. Ye willna be sorry!`0\"`n`n", translate_inline($session['user']['sex'] ? 'lass' : 'lad'));
give_item("cardcase");
// if (!$success){
// output("Then -- a frown. \"`2Wait, no, I canna sell t'ye. Ye'd better petition the Big Boss, tell 'im t'see what's gaen wrong wiv all dis.`0\"`n`n");
// } else {
output("You have a fine leather card case. Pleased, you admire its soft texture. What an excellent purchase you have made!`n`n");
// }
$session['user']['gems'] -= $price;
break;
case "pass":
output("\"`2Bleedin' smart-arse.`0\" The scruffy vendor shrugs and goes off to pester someone else.`n`n");
break;
}
addnav("Back to the Concourse", "runmodule.php?module=improbablehousing&op=interior&hid={$hid}&rid={$rid}");
page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:32,代码来源:rail_peddler.php
示例8: sethsong_run
function sethsong_run()
{
$op = httpget('op');
$visits = get_module_setting("visits");
$been = get_module_pref("been");
$iname = getsetting("innname", LOCATION_INN);
tlschema("inn");
page_header($iname);
rawoutput("<span style='color: #9900FF'>");
output_notl("`c`b");
output($iname);
output_notl("`b`c");
tlschema();
// Short circuit out if we've heard enough
if ($been >= $visits) {
output("%s`0 clears his throat and drinks some water.", getsetting("bard", "`^Seth"));
output("\"I'm sorry, my throat is just too dry.\"");
} else {
sethsong_sing();
}
addnav("Where to?");
addnav("I?Return to the Inn", "inn.php");
villagenav();
rawoutput("</span>");
page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:26,代码来源:sethsong.php
示例9: friendlist_unignore
function friendlist_unignore()
{
global $session;
$ac = httpget('ac');
$ignored = rexplode(get_module_pref('ignored', 'friendlist', $ac));
$iveignored = rexplode(get_module_pref('iveignored'));
if (in_array($ac, $iveignored)) {
$sql = "SELECT name FROM " . db_prefix("accounts") . " WHERE acctid={$ac} AND locked=0";
$result = db_query($sql);
if (db_num_rows($result) > 0) {
$row = db_fetch_assoc($result);
$info = sprintf_translate("%s`Q has been removed from your list.", $row['name']);
require_once "lib/systemmail.php";
$t = array("`\$Ignore List Removal");
$mailmessage = array("%s`0`@ has removed you from %s ignore list.", $session['user']['name'], $session['user']['sex'] ? translate_inline("her") : translate_inline("his"));
systemmail($ac, $t, $mailmessage);
} else {
$info = translate_inline("That user no longer exists...");
}
}
$ignored = array_diff($ignored, array($session['user']['acctid']));
$ignored = rimplode($ignored);
set_module_pref('ignored', $ignored, 'friendlist', $ac);
if (in_array($ac, $iveignored)) {
$iveignored = array_diff($iveignored, array($ac));
$iveignored = rimplode($iveignored);
set_module_pref('iveignored', $iveignored);
}
output_notl($info);
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:30,代码来源:friendlist_unignore.php
示例10: offering_runevent
function offering_runevent($type)
{
global $session;
$session['user']['specialinc'] = "module:offering";
$seen = get_module_pref("seen");
$amt = round(max(1, $session['user']['dragonkills'] * 10) * $session['user']['level'] * max(1, 5000 - $session['user']['maxhitpoints']) / 20000);
$op = httpget('op');
if ($op == "") {
output("`7While you are listening to others chatting, a bizarrely-dressed woman approaches with an outstretched hand. `n`n");
output("\"`&For the offering!!! `^%s `&gold!`7\"", $amt);
$seen++;
set_module_pref("seen", $seen);
addnav(array("Give her %s gold", $amt), "village.php?op=shop");
addnav("Walk away", "village.php?op=nope");
} elseif ($op == "nope") {
output("`7You decide not to give any gold to this strange woman.`n");
$session['user']['specialinc'] = "";
} elseif ($session['user']['gold'] < $amt) {
output("`7The woman stares at your hand.`n`n");
output("\"`&No no no no no!!! He would not be pleased!!!`7\"`n`n");
output("`7Without another word, she walks away.`n");
$session['user']['specialinc'] = "";
} else {
output("`7You hand her `^%s`7 gold, and she lifts her head up, looks intently at something above her that only she can see, and whispers, `&\"%s!`&\" `7with apparent urgency.`n`n", $amt, getsetting("deathoverlord", '`$Ramius'));
output("`7Without another word she scurries off, a determined look on her face, and a purpose in her stride.`n`n");
if ($session['user']['dragonkills'] > 30) {
$session['user']['deathpower'] += 10;
} else {
$session['user']['deathpower'] += 15;
}
$session['user']['gold'] -= $amt;
}
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:33,代码来源:offering.php
示例11: cakeordeath_run
function cakeordeath_run()
{
global $session;
page_header("Cake Or Death");
switch (httpget("op")) {
case "examine":
// Tell the player what the deal with Cake Or Death is
$counter = number_format(get_module_setting("counter"));
output("`0A shiny wooden table sits back from the main street. Behind it, a man sits idly reading the Improbable Island Enquirer. Before him, sat on the table, is a large sponge cake. Above him is a banner, displaying the name of his game:`b'`5Cake`0 or `4Death!`0'`b`n`nHe sees you pondering the sign, and calls over to you. `b'`5Cake`0 or `4Death!`0 `b`5Cake`0 or `4Death!`0' he cries. 'Ninety-nine per cent chance of `b`5Cake`0`b!'`n`nIt's not often that an immaculately-dressed gentleman with glowing green eyes offers you a 99% chance of cake. What would you like to do?");
//add navs
addnav("CAKE!", "runmodule.php?module=cakeordeath&op=play");
addnav("Back away slowly", "village.php");
break;
case "play":
$counter = get_module_setting("counter");
addnav("Back to the Outpost", "village.php");
if ($counter > 0) {
output("The green-eyed gentleman hands you a slice of cake, on a paper plate. You thank him, and walk away merrily wolfing down your prize.`n`nYou feel `5Full Of Cake!`0");
set_module_setting("counter", get_module_setting("counter") - 1);
apply_buff('tastycake', array("name" => "`5Full Of Cake`0", "rounds" => 10, "atkmod" => 1.1, "defmod" => 1.1, "roundmsg" => "`5The cake you ate earlier has boosted your energy!`n", "schema" => "module-cakeordeath"));
}
if ($counter <= 0) {
output("The green-eyed gentleman hands you a slice of cake, on a paper plate. You thank him, and walk away merrily wolfing down your prize.`n`nYou feel `5Full Of Cake!`0`n`nMoments later, the slow-acting poison starts to take effect. The world begins to melt in front of you. Grey spots dance on the edges of your vision. Behind you, a green-eyed monster offers you another slice of cake, laughing and pointing.`n`nYou curse your luck as the hallucinations begin to kick in.");
set_module_setting("counter", 100);
apply_buff('failcake', array("name" => "`5Full Of FailCake`0", "rounds" => -1, "regen" => -10, "startmsg" => "`5You are walking on pink icing. The sky is made of jam. Your eyes are two cherries. That cake was awesome.`0`n", "roundmsg" => "`5The poisoned cake saps your strength, and you lose ten hitpoints!`0`n", "schema" => "module-cakeordeath"));
if (is_module_active("medals")) {
require_once "modules/medals.php";
medals_award_medal("failcake", "Failcake Fancier", "This player was unfortunate at the Cake or Death stand...", "medal_failcake.png");
}
}
break;
}
page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:34,代码来源:cakeordeath.php
示例12: translationconvert_run
function translationconvert_run()
{
global $session;
page_header("Translations Convertor Thing");
output("Outputting all known translations, so that you can do a find-and-replace in the files themselves and we can stop doing this silly translate thing.`n`n");
if (httpget('delete')) {
$del = httpget('delete');
$sql = "UPDATE " . db_prefix("translations") . " SET version='updated' WHERE tid={$del}";
db_query($sql);
}
$sql = "SELECT * FROM " . db_prefix("translations") . " WHERE version='dragonbones' ORDER BY uri";
$result = db_query($sql);
$total = 0;
while ($row = db_fetch_assoc($result)) {
if ($row['intext'] != $row['outtext']) {
$total++;
rawoutput("<a href=\"runmodule.php?module=translationconvert&delete=" . $row['tid'] . "\">MARK</a>");
addnav("", "runmodule.php?module=translationconvert&delete=" . $row['tid']);
output_notl("`n`0`b%s`b:", $row['uri']);
rawoutput("<table width=100%><tr><td width=50% border=1px solid #cccccc>" . $row['intext'] . "</td><td width=50%>" . $row['outtext'] . "</td></tr></table>");
output_notl("`n`n");
}
}
debug($total);
addnav("Back to the Grotto", "superuser.php");
page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:27,代码来源:translationconvert.php
示例13: es_bridge_gp_dohook
function es_bridge_gp_dohook($hook, $args)
{
global $session, $baseaccount;
$item = httpget('item');
$action = httpget('action');
if ($session['user']['armor'] != $baseaccount['armor'] && ($action == 'weararmor' || $action == 'buyarmor') && $session['user']['armor'] == $item) {
$category = 'armor';
$defense = $session['user']['defense'];
} elseif ($session['user']['weapon'] != $baseaccount['weapon'] && ($action == 'wearweapon' || $action == 'buyweapon') && $session['user']['weapon'] == $item) {
$category = 'weapon';
$attack = $session['user']['attack'];
} else {
$category = false;
}
if ($category && get_module_pref($category, 'mysticalshop')) {
$current_id = get_module_pref($category . 'id', 'mysticalshop');
debug("Current ID is {$current_id}");
require_once './modules/mysticalshop/lib.php';
mysticalshop_destroyitem($category);
mysticalshop_resetbuffs($current_id);
require_once './modules/mysticalshop_buffs/stripbuff.php';
mysticalshop_buffs_stripbuff();
if ($category == 'armor') {
$session['user']['defense'] = $defense;
} else {
$session['user']['attack'] = $attack;
}
debuglog('es_bridge_gp: ' . $category . ' (ID: ' . $current_id . ') item removed on action "' . $action . '".');
}
return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:es_bridge_gp.php
示例14: oneshotteleporter_run
function oneshotteleporter_run()
{
global $session;
$to = httpget("to");
if ($to == "") {
page_header("The Void");
output("You press the button on your One-Shot Teleporter. One obligatory blinding flash of light and pain later, you find yourself floating around in empty black nothingness!`n`nA flashing red light and an annoying BEEPing noise from your device insists that you select a destination, and quickly, before you find yourself stuck here or imploded.");
$vloc = array();
$vname = getsetting("villagename", LOCATION_FIELDS);
$vloc[$vname] = "village";
$vloc = modulehook("validlocation", $vloc);
ksort($vloc);
reset($vloc);
addnav("Choose a Destination");
foreach ($vloc as $loc => $val) {
addnav(array("Go to %s", $loc), "runmodule.php?module=oneshotteleporter&to=" . htmlentities($loc));
}
} else {
page_header("Back to Reality");
output("You quickly select an outpost from the list. With a sudden jolt, you find yourself standing in the middle of your chosen outpost! You look around for your teleporting device, but realise that it must have only teleported you, not itself. What a piece of junk.");
$session['user']['location'] = $to;
$session['user']['specialinc'] = "";
addnav("Continue");
addnav("Back to the Outpost", "village.php");
}
page_footer();
return true;
}
开发者ID:Beeps,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:28,代码来源:oneshotteleporter.php
示例15: worldmapen_editor_real
function worldmapen_editor_real()
{
global $session;
page_header("World Editor");
require_once "lib/superusernav.php";
superusernav();
// initialize the internal static maps
worldmapen_loadMap();
worldmapen_loadTerrainDefs();
$op = httpget("op");
$act = httpget("act");
$subop = httpget("subop");
debug("op={$op}, act={$act}, subop={$subop}");
switch ($subop) {
case "regen":
worldmapen_editor_regen($op, $subop, $act);
break;
case "manual":
worldmapen_editor_manual($op, $subop, $act);
break;
case "terrain":
worldmapen_editor_terrain($op, $subop, $act);
break;
default:
worldmapen_viewmap(false);
break;
}
addnav("Replace Cities", "runmodule.php?module=worldmapen&op=edit&subop=regen");
addnav("Manually Place Cities", "runmodule.php?module=worldmapen&op=edit&subop=manual");
addnav("Edit terrain type", "runmodule.php?module=worldmapen&op=edit&subop=terrain");
page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:32,代码来源:editor.php