This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
lemmy-api-php [2023/06/27 15:28] admin |
lemmy-api-php [2023/06/28 14:55] (current) neil |
||
---|---|---|---|
Line 31: | Line 31: | ||
Here is some example code for a PHP command line tool that will let you purge local users. | Here is some example code for a PHP command line tool that will let you purge local users. | ||
+ | |||
+ | <code php config.php> | ||
+ | <?php | ||
+ | $lemmy_domain = ""; // e.g. lemmy.ml | ||
+ | $username = ""; | ||
+ | $password = ""; | ||
+ | $token_file = ".lemmy-api-token"; // this is where your token is cached, can be any location | ||
+ | ?> | ||
+ | </code> | ||
<code php lemmy-api.php> | <code php lemmy-api.php> |