infi-power
4 days ago
weirdly enough the redirection from the tutorial seems broken, if i type "https://neocities.org/api/info?sitename=infi-power" in my address bar, it works fine???
tabf5
4 days ago
yeah the Neocities API lets you type the URL in directly but not get referred to it by another site, so I can't use it on mine. Ratiosemper's PHP let you get around this but now it's gone
dann
4 days ago
I'll check on the proxy site, but yeah, if you have a free account, it won't work anyway, since external calls after the initial load are not allowed.
v0idspace
4 days ago
ooooh so it wasnt just me! My "last updated..." script i got from that stopped working as well. Was hoping to find an alternative but so far no luck.
dargonics
1 month ago
i have a folder full of random photos i saved maybe i should make my own coolpix
jammakesjunk
1 month ago
Sorry for my reply being super late, my account is new. I had a little file just called "photos" on my laptop, so when I saw Coolpix on your page I just went, huh, this seems like the right term. The page now has a link to yours, so you are credited properly!!
^_^
thanks for sharing this!
this is my first time seeing a script on how to access the api. i assume fetching sitedata from the api using a simple fetch() function in a script on your website is blocked by neocities? cause it be a hell of a lot easier to just do that
@brachypelmide yes, since 2024 neocities blocks any fetch calls for new free accounts. @dann's tutorial mentions this, @dabric has made an article detailing how the neocities csp works: https://content-security-policy.neocities.org/
How can i use this in order to make my "last updated xx.xx.xx" widget work again? Because afaik it uses the same method here.
@v0idspace it's the same data fields you're formatting, only the proxy through which you get that data changes, so the last updated field will still work - i have it too
@predawka ah damn that sucks. i assume that was probably done to reduce load @v0idspace i THINK you should just be able to fetch the worker URL and get a working infoset from that (psuedocode, i suck at async: https://pastebin.com/raw/vHsrwMGi)
Thank you! I dont know if im gonna go trough with this because i dont wanna make another account for something, but i will keep it in mind!
Thanks for this. I need to brush up on Cloudflare, workers, and all the things I've missed by living in the past. At a glance, it appears to be doing the same thing that the weirdscifi proxy was doing--mainly handling the API call on the server side where Cross Origin isn't an issue, and then making it public again without the restriction.
It would be cool is the site name could be passed as a variable, but I'm not sure if that's possible. I'd just host it myself on my PHP server, but godaddy has me in this grandfathered plan where I get unlimited domains and space, but none of the modern stuff like SSL, which neocities won't touch unless implemented.
I might see if I can still use cloudflare on one of my sites to get HTTPS active, then I won't be relying on others.