From cc9eba54622e8eac3f0abb5c6d5c9a43b3a8c8d1 Mon Sep 17 00:00:00 2001 From: marcus Date: Thu, 24 Jul 2008 09:19:51 +0000 Subject: New site pinger, refs #149 git-svn-id: https://code.elgg.org/elgg/trunk@1507 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/ping.php | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 engine/lib/ping.php (limited to 'engine/lib/ping.php') diff --git a/engine/lib/ping.php b/engine/lib/ping.php new file mode 100644 index 000000000..7a40334f6 --- /dev/null +++ b/engine/lib/ping.php @@ -0,0 +1,60 @@ +path . "version.php"); + + // Get export + $export = export($CONFIG->site_id); + + return send_api_post_call($NOTIFICATION_SERVER, + array( + 'method' => 'elgg.system.ping' + ), + array( + 'version' => $version, + 'release' => $release, + ), + $export, + 'text/xml' + ); + } + + /** + * Notify the server. + */ + function ping_init() + { + global $CONFIG; + + if ($CONFIG->ping_home) + { + // Now run this stuff, but only once + run_function_once("ping_run_once"); + } + } + + // Register a startup event + register_elgg_event_handler('init','system','ping_init'); +?> \ No newline at end of file -- cgit v1.2.3