Re: run external php scriptã > By: Mortifis to All on Sat Feb 09 2019 15:57:26ãã > Mo> my win7_x86 system.ãã ã > If I were doing a lot of this, I'd probably make a function that:ãã > - Takes the command-line to execute as an argumentã > - Generates a random tempfile nameã > - Runs the command and tacks on the redirect to the temp fileã > - Reads the temp file contentsã > - Deletes the temp fileã > - Returns the temp file contentsãã > And then I'd probably still feel a bit gross.ã ãperhaps a shower afterward would help :-)ããThanks for the info, now I gotta p, open a beerãã---ã þ Synchronet þ AlleyCat! BBS - http://alleycat.synchro.net:81ã
Re: run external php scriptã > By: Mortifis to All on Sat Feb 09 2019 03:57 pmãã ã > system.exec() will just run the command. If you want the output of theã > command, you'll need to redirect the output to a file and read that file (onã > Windows).ãã ãNo wonder I dislike windows LOLããIs there an equivelent to file_get_content('http://blah_blah.blah');ãI was poking around some sources and found http_request.header but it didn'tãwork.ããI am just trying to include a little url data in index.ssjsããie: template.myvar = whatever_grabs_the_url_contents('http://the.url/' +ãany_args);ããso I can simply use @@myvar@@ in any web docs. ( I have done this on Linuxãwithout issue using system.popenãã---ã þ Synchronet þ AlleyCat! BBS - http://alleycat.synchro.net:81ã
Re: run external php scriptã > By: Mortifis to All on Sat Feb 09 2019 03:57 pmãã ã > system.exec() will just run the command. If you want the output of theã > command, you'll need to redirect the output to a file and read that file (onã > Windows).ãã ãNo wonder I dislike windows LOLããIs there an equivalent to file_get_content('http://blah_blah.blah');ãI was poking around some sources and found http_request.header but it didn'tãwork.ããI am just trying to include a little url data in index.ssjsããie: template.myvar = whatever_grabs_the_url_contents('http://the.url/' +ãany_args);ããso I can simply use @@myvar@@ in any web docs. ( I have done this on Linuxãwithout issue using system.popenãã---ã þ Synchronet þ AlleyCat! BBS - http://alleycat.synchro.net:81ã
Re: Re: run external php scriptã > By: Mortifis to Digital Man on Sun Feb 10 2019 12:29:40ãã > Mo> Is there an equivalent to file_get_content('http://blah_blah.blah');ãã > require('http.js', 'HTTPRequest');ã > const response = (new HTTPRequest()).Get('http://blah_blah.blah');ããThank you, I am getting closer, just gotta scrape some css stuffs in theãresponse.ããBTW where do I find your openweathermap.js? I looked on github under web4butãseem to have lost my glasses :-oãã---ã þ Synchronet þ AlleyCat! BBS - http://alleycat.synchro.net:81ã
Re: run external php scriptã > By: Mortifis to All on Sat Feb 09 2019 15:57:26ãã > > So, my question is, how do I trap the result under windows, itã > > is handled automagically under Linuxãã > we just went through this with tickit... we were trying to determine whyã > addfiles was not working right for someone when tickit ran as an event butã > it (addfiles) did run properly when they manually ran tickit...ãã > look at the tickit sources in the addfiles section and you'll see what iã > came up with that worked great and was left in tickit if anyone needed theã > facility later for troubleshooting...ããI did, thank you, knew how to redirect to files and read them, seems a long wayãaround that mr gates imposed upon us :-Þ hopefully some future verion ofãwinbloz has a comparable > /dev/null 2>&1 function or whatever ... I onlyãbothered with all this cuz I broke a G string on my acoustic and got bored LOLãã---ã þ Synchronet þ AlleyCat! BBS - http://alleycat.synchro.net:81ã
Re: Re: run external php scriptã > By: Mortifis to echicken on Sun Feb 10 2019 16:37:16ãã > Mo> BTW where do I find your openweathermap.js? I looked on github underã > Mo> web4but seem to have lost my glasses :-oãã > It's a generic library and not part of the web interface. I put it in theã > Synchronet CVS under exec/load/. Note that the script doesn't do anythingã > on its own to display information to a BBS user; it's a library for scriptsã > that want to interact with the OWM API.ããwhich is what I want to play with :-)ãã > I did create a sidebar module for the web interface that uses this library;ã > it's under web/sidebar/.extras/ in the github repo.ããI was looking in web/sidebar/.extras/openwethermap.ssjs and saw the referenceãto openweathermap.js but couldn't find it either on my system or in github.ãI'll grab it from cvs.synchro.net, thanksããã > OpenWeatherMap use requires an API key, so you'll have to go to their siteã > and sign up for one. Add a section to ctrl/modopts.ini like this:ããããI have had an openweathermap key for a couple years that I use with my phpãscripts, I still use Duece's old runemaster nightshade, but I will look intoãthe webv4, thanks :)ãã---ã þ Synchronet þ AlleyCat! BBS - http://alleycat.synchro.net:81ã
Re: Re: run external php scriptã > By: Mortifis to echicken on Sun Feb 10 2019 16:37:16ãã > Mo> BTW where do I find your openweathermap.js? I looked on github underã > Mo> web4but seem to have lost my glasses :-oãã > It's a generic library and not part of the web interface. I put it in theã > Synchronet CVS under exec/load/. Note that the script doesn't do anythingã > on its own to display information to a BBS user; it's a library for scriptsã > that want to interact with the OWM API.ãã ãBTW I have been working on incorporating the wttr.in python scripts or curlãcallsãinto the web/nightshade templates. I have used both openweathermaps andãwttr.in for sometime on some of my other sites under LAMP using both <iframe>ãand file_get_contents, just playing around. I will look closely at the .js ...ãI appreciate the help, thanks.ãã---ã þ Synchronet þ AlleyCat! BBS - http://alleycat.synchro.net:81ã
Sysop: | Karloch |
---|---|
Location: | Madrid, Spain |
Users: | 54 |
Nodes: | 8 (0 / 8) |
Uptime: | 128:45:49 |
Calls: | 700 |
Files: | 17,895 |
D/L today: |
128 files (60,769K bytes) |
Messages: | 66,010 |