Added comment block with instructions
This commit is contained in:
parent
b375ffd0e5
commit
55a20aea7f
1 changed files with 9 additions and 0 deletions
|
@ -1,5 +1,14 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
$tldsregex 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 and using it like this:
|
||||
$tldsre=gettlds($path_to_tlds_cache_file,true);
|
||||
Then you can pass the list to postLength like this: $length=postLength($post,$tldsre['tlds']);
|
||||
($tldsre['warnings'] will contain possible gettlds warnings)
|
||||
*/
|
||||
|
||||
function postLength($post,&$tldsregex) {
|
||||
// echo "-A-> |{$post}|\n";
|
||||
// for some reason, mastodon seems to check tld existence only on http(s) links - see next regexp
|
||||
|
|
Loading…
Reference in a new issue