Esempio n. 1
0
        // don't add the category twice
        return $content;
    }
    $content = trim($content);
    if ('' == $content) {
        // this probably means that we're adding a type to a type page without any text at the top
        $content = $type;
    } elseif (inString($content, '[[has type:')) {
        $content = $type;
    } else {
        $content .= $type;
    }
    // if there isn't already a type...
    return $content;
}
$myBot = new BasicBot();
if (isset($_POST['server'])) {
    $serveur = $_POST['server'];
} else {
    if (isset($_GET['server'])) {
        $serveur = $_GET['server'];
    } else {
        $serveur = $_SESSION['server'];
    }
}
$myBot->wikiServer = $serveur;
//echo "Connecting to $serveur.\n";
//echo "Phase 1\n";
$args = array();
// Property array: key=property page and value=type
$propArray = array("Property:changeSetID" => "String", "Property:hasSemanticQuery" => "String", "Property:patchID" => "String", "Property:pushFeedServer" => "URL", "Property:pushFeedName" => "String");
Esempio n. 2
0
#!/usr/bin/php
<?php 
require_once 'BasicBot.class.php';
if (count($argv) < 5) {
    die("Usage: bot host port botname botkey\n");
}
try {
    $bot = new BasicBot($argv[1], $argv[2], $argv[3], $argv[4]);
} catch (Exception $e) {
    die($e->getMessage() . "\n");
}
$bot->run();
?>