Пример #1
0
<?php

require_once dirname(__FILE__) . "/../../config.inc";
require_once "{$path_prefix}/db/Dal/Dal.php";
require_once "{$path_prefix}/ext/PingServer/PingServer.php";
if ($_POST) {
    $PingServer = new PingServer();
    $PingServer->set_params($_POST);
    $PingServer->save();
}
Пример #2
0
<?php

require_once dirname(__FILE__) . "/../../config.inc";
require_once "{$path_prefix}/db/Dal/Dal.php";
require_once "{$path_prefix}/ext/PingServer/PingServer.php";
$PingServer = new PingServer();
$PingServer->generate_xml();
// Current the argument is hardcoded to get the user updates only. Will be changed later on.
$filename = $PingServer->return_xml(1);
header('Location:' . $filename);
exit;
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* [filename] is a part of PeopleAggregator.
* [description including history]
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* @author [creator, or "Original Author"]
* @license http://bit.ly/aVWqRV PayAsYouGo License
* @copyright Copyright (c) 2010 Broadband Mechanics
* @package PeopleAggregator
*/
require_once dirname(__FILE__) . "/../config.inc";
require_once "api/DB/Dal/Dal.php";
require_once "api/PingServer/PingServer.php";
// TO DO: Change the File Path.
$filename = '/web/Ping/changes_user.xml';
if (file_exists(PA::$project_dir . $filename)) {
    $filename = PA::$project_dir . $filename;
} else {
    if (file_exists(PA::$core_dir . $filename)) {
        $filename = PA::$core_dir . $filename;
    } else {
        $filename = null;
    }
}
// make file if it does not exists or remake it after one hour
if ($filename == null || !(time() - filectime($filename)) < 3600) {
    $PingServer = new PingServer();
    $PingServer->generate_xml();
}
$handle = @fopen($filename, 'r');
$content = @fread($handle, filesize($filename));
print $content;