SilberWitch on Nostr: Here's how I get around using blastr. I looked where he gets the relay list from. He ...
Here's how I get around using blastr. I looked where he gets the relay list from. He just uses the API from Nostr.Watch.
```
// download a list of active relays
$url = "
https://api.nostr.watch/v1/online";;
$page = file_get_contents($url);
$requestedRelays = json_decode($page, true);
sort($requestedRelays);
```
Published at
2024-09-22 18:39:34Event JSON
{
"id": "8d9131bd8c631c8ac4a90ab4e7f8d968029d81713a0e60893a41ef5c5a4d3ac9",
"pubkey": "fd208ee8c8f283780a9552896e4823cc9dc6bfd442063889577106940fd927c1",
"created_at": 1727030374,
"kind": 1,
"tags": [
[
"e",
"3824f2cdfd6fe0fb48846a7fdc8a9ba5e728ca46d9f07e64d983af07d2a93b57",
"",
"root"
],
[
"e",
"98337bff60f7fca3843a2561ae19fac6577f53f0033ce67ff9f9b35b039055a9",
"",
"reply"
],
[
"p",
"dc4cd086cd7ce5b1832adf4fdd1211289880d2c7e295bcb0e684c01acee77c06"
],
[
"p",
"fd208ee8c8f283780a9552896e4823cc9dc6bfd442063889577106940fd927c1"
],
[
"p",
"604e96e099936a104883958b040b47672e0f048c98ac793f37ffe4c720279eb2"
]
],
"content": "Here's how I get around using blastr. I looked where he gets the relay list from. He just uses the API from Nostr.Watch.\n\n```\n// download a list of active relays\n$url = \"https://api.nostr.watch/v1/online\"; \n$page = file_get_contents($url);\n$requestedRelays = json_decode($page, true);\nsort($requestedRelays);\n```",
"sig": "8a8e80d2d38071ad07b2acb5c81ae7383dd6387fc8775404dd8cd43a367d2684a2b754333618731462d6fb1ddc2e10ca61075c9fc7c9a6f1ca48e9f5046c48c3"
}