From c8a5123842d869df06f63a5892d13f25912541da Mon Sep 17 00:00:00 2001 From: Gilles Grandou Date: Wed, 1 May 2019 18:26:42 +0200 Subject: [PATCH] Initial commit --- init.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 init.php diff --git a/init.php b/init.php new file mode 100644 index 0000000..219a740 --- /dev/null +++ b/init.php @@ -0,0 +1,32 @@ +host = $host; + $host->add_hook($host::HOOK_SUBSCRIBE_FEED, $this); + } + + function hook_subscribe_feed($contents, $url, $auth_login, $auth_pass) { + if (preg_match("/^https:\/\/twitter\.com\/([^\/]+)$/", $url, $matches) === 1) { + $user = $matches[1]; + $contents = ""; + $contents .= ""; + $contents .= ""; + $contents .= ""; + //error_log(print_r($contents, TRUE)); + } + return $contents; + } + + function api_version() { + return 2; + } +} +?>