Ejemplo n.º 1
0
#!/usr/bin/php
<?php 
include "/home/websites/browserplus/php/site.php";
include "/home/websites/browserplus/php/twitter.php";
// DOK_BASE - normally set in apache, but not available to scripts
putenv("DOK_BASE=/home/websites/browserplus/data");
$t = new Twitter();
$secret = $t->get_cache_secret();
$host = get_cfg_var('bp_env') == "local" ? "borg" : "browserplus.org";
fetch("http://{$host}/site/cache_twitter.php?s={$secret}");
Ejemplo n.º 2
0
<?php

include "../../php/site.php";
include "../../php/twitter.php";
$t = new Twitter();
// to make sure we're the ones calling
if (isset($_GET["s"]) && $_GET["s"] == $t->get_cache_secret()) {
    echo ($t->fetch_user_tweets("browserplus") ? "cached" : "error caching") . " user feed\n";
    echo ($t->fetch_search_tweets("browserplus") ? "cached" : "error caching") . " search feed\n";
}