This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Last revision Both sides next revision | ||
mastodon_rss [2021/06/13 00:22] neil |
mastodon_rss [2021/06/14 20:16] neil |
||
---|---|---|---|
Line 10: | Line 10: | ||
header('Content-Type: text/xml'); | header('Content-Type: text/xml'); | ||
$bearer = "get your token from the development page in the mastodon web client settings"; | $bearer = "get your token from the development page in the mastodon web client settings"; | ||
+ | $instance = "glasgow.social"; | ||
$headers = [ | $headers = [ | ||
'Authorization: Bearer '.$bearer, | 'Authorization: Bearer '.$bearer, | ||
Line 15: | Line 16: | ||
$ch_bookmarks = curl_init(); | $ch_bookmarks = curl_init(); | ||
- | curl_setopt($ch_bookmarks, CURLOPT_URL, "https://glasgow.social/api/v1/bookmarks"); | + | curl_setopt($ch_bookmarks, CURLOPT_URL, "https://$instance/api/v1/bookmarks"); |
curl_setopt($ch_bookmarks, CURLOPT_RETURNTRANSFER, true); | curl_setopt($ch_bookmarks, CURLOPT_RETURNTRANSFER, true); | ||
curl_setopt($ch_bookmarks, CURLOPT_HTTPHEADER, $headers); | curl_setopt($ch_bookmarks, CURLOPT_HTTPHEADER, $headers); |