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;