This shows you the differences between two versions of the page.
|
lemmy-php [2020/12/02 15:49] neil created |
lemmy-php [2020/12/02 15:49] (current) neil |
||
|---|---|---|---|
| Line 6: | Line 6: | ||
| ==== Create a new post ==== | ==== Create a new post ==== | ||
| <code php> | <code php> | ||
| - | + | <?php | |
| - | <?php require("lemmy.class.php"); | + | require("lemmy.class.php"); |
| $url = "https://lemmy.glasgow.social"; | $url = "https://lemmy.glasgow.social"; | ||
| $lemmy = new lemmy($url); | $lemmy = new lemmy($url); | ||
| Line 20: | Line 20: | ||
| $lemmy->createPost($post); | $lemmy->createPost($post); | ||
| + | ?> | ||
| </code> | </code> | ||