From ed3dfc93ab01311120bee97ecda7da8bf2ab6efc Mon Sep 17 00:00:00 2001 From: pezcurrel Date: Thu, 24 Oct 2024 08:09:56 +0200 Subject: [PATCH] =?UTF-8?q?Added=20comment=20block=20with=20instructions?= =?UTF-8?q?=20for=20=E2=80=9Cpostlength=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/mastodon.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/mastodon.php b/lib/mastodon.php index bb4c7dd..d5fda7a 100644 --- a/lib/mastodon.php +++ b/lib/mastodon.php @@ -5,6 +5,16 @@ // require gettlds.php in the calling script and use it to set it like this: // $retlds=gettlds($path_to_tlds_cache_file,true); +/* +Warning: postlength function requires $retlds global variable to be defined. +$retlds has to be a string with a list (better if reverse ordered) of valid +tlds separated by "|"; you can get such a list by adding "require gettlds.php" +in the calling script like this: +$retlds=gettlds($path_to_tlds_cache_file,true); +$retlds=$retlds['tlds']; +($retlds['warnings'] will contain possible gettlds warnings) +*/ + function validtoken($token) { if (preg_match('#^[A-Za-z0-9_-]{43}$#',$token)===1) return true;