Subj : Re: Getting IP Address
To : echicken
From : Mortifis
Date : Mon Jan 21 2019 05:06 pm
> Re: Getting IP Address
> By: Mortifis to All on Mon Jan 21 2019 15:45:03
> Mo> In the /web/root/index.ssjs I would like to grab the connecting user's
> Mo> IP
> You can get it from http_request.remote_ip or client.ip_address, and these
> probably have the same value.
> Mo> address and pass it along to a system.open("script ip_add") as an argv
> Mo> but
> system.exec('/path/to/script ' + http_request.remote_ip);
Perfect, Thank You! ... in /sbbs/web/root/index.ssjs I used template.weather =
system.popen("weather" + http_request.remote_ip); (Sorry, still using the stock
Nightshade Theme) then in /sbbs/web/templates/nightshade/rightnav.ini I added
@@weather@@ ... weather is a php script (cuz I suck at js) to grab the
openweathermap after parsing the city via a file_get_contents from
api.ipstack.com ... probably an easier way to do it but it works
Perhaps you could give it a little test later and see if it gets your weather
http://emptykeg.synchro.net
---
� Synchronet � The Empty Keg BBS emptykeg.synchro.net:82 Lake Echo NS Canada