NeoBook as CGI program?
Moderator: Neosoft Support
-
- Posts: 1596
- Joined: Mon Apr 04, 2005 4:13 pm
- Location: Buenos Aires, Argentina
- Contact:
NeoBook as CGI program?
Hi overthere,
I think this scenario:
* Your domestic pc has a dynamic IP
* You did not installed a web server in this pc.
* You would like run several NeoBook programs from another computers (or phones)
Long time ago, i found a Powerbasic program with a minimal version of a webserver (all we need in 44 kb!!!).
When running, the path of the program is the root of the server
I tested this trying to run a NeoBook program, like a CGI one.
Obviously, the NeoBook program is non-interactive, because it runs into the server (bah, your machine...)
In this sample, i read a recordset from a sqlite database (could be anything any idea) and response from the webserver the recordset.
the result image (from my phone, running Mozilla Firefox) is:
If you wanna more info, tell me about this.
My 0.01
David de Argentina
I think this scenario:
* Your domestic pc has a dynamic IP
* You did not installed a web server in this pc.
* You would like run several NeoBook programs from another computers (or phones)
Long time ago, i found a Powerbasic program with a minimal version of a webserver (all we need in 44 kb!!!).
When running, the path of the program is the root of the server
I tested this trying to run a NeoBook program, like a CGI one.
Obviously, the NeoBook program is non-interactive, because it runs into the server (bah, your machine...)
In this sample, i read a recordset from a sqlite database (could be anything any idea) and response from the webserver the recordset.
the result image (from my phone, running Mozilla Firefox) is:
If you wanna more info, tell me about this.
My 0.01
David de Argentina
Last edited by David de Argentina on Fri Jun 02, 2017 3:30 pm, edited 1 time in total.
-
- Posts: 1596
- Joined: Mon Apr 04, 2005 4:13 pm
- Location: Buenos Aires, Argentina
- Contact:
Re: NeoBook as CGI program?
Same program using the external IP and Opera Browser on my Phone (Android):
Another 0.01
David de Argentina
Another 0.01
David de Argentina
-
- Posts: 1596
- Joined: Mon Apr 04, 2005 4:13 pm
- Location: Buenos Aires, Argentina
- Contact:
Re: NeoBook as CGI program?
Hi overthere,
An user told me the previous images are not showing.
I just moved them to another server.
Could any tell me if the images are now visible ?
Thanks in advance,
David de Argentina
An user told me the previous images are not showing.
I just moved them to another server.
Could any tell me if the images are now visible ?
Thanks in advance,
David de Argentina
Re: NeoBook as CGI program?
Tienes el '.bas' o bien el '.exe' de esa app?. Me interesaria una copia. Muy agradecido.
Do you have the '.bas' or '.exe' for that app? I'd be interested in a copy. Very thankful.
KEYLOR NAVAS es de COSTA RICA
Do you have the '.bas' or '.exe' for that app? I'd be interested in a copy. Very thankful.
KEYLOR NAVAS es de COSTA RICA
COSTA RICA
PURA VIDA
PURA VIDA
-
- Posts: 1596
- Joined: Mon Apr 04, 2005 4:13 pm
- Location: Buenos Aires, Argentina
- Contact:
Re: NeoBook as CGI program?
Hi Virger,
Here is the EXE:
http://specialapps.rcmediaservices.net/ ... Server.zip
The default path is the webcamserver.exe path.
The default open file is default.htm
At the remote client (phone, tablet, etc) you can write an URL that calls your NeoBook EXE program, like:
192.168.1.12/MiProgram.exe
or
MyExternalIP/MiProgram.exe
if you know remotelly the server esternal IP.
Use dynu services to get an URL for a dynamic IP. Works fine.
If your neobook program generates a response, it may be wrote in a "temp.htm" file, like:
FileWrite "temp.htm" "All" "Everything is OK"
or
FileWrite "temp.htm" "All" "[result_data]"
Enjoy it!
David de Argentina
Here is the EXE:
http://specialapps.rcmediaservices.net/ ... Server.zip
The default path is the webcamserver.exe path.
The default open file is default.htm
At the remote client (phone, tablet, etc) you can write an URL that calls your NeoBook EXE program, like:
192.168.1.12/MiProgram.exe
or
MyExternalIP/MiProgram.exe
if you know remotelly the server esternal IP.
Use dynu services to get an URL for a dynamic IP. Works fine.
If your neobook program generates a response, it may be wrote in a "temp.htm" file, like:
FileWrite "temp.htm" "All" "Everything is OK"
or
FileWrite "temp.htm" "All" "[result_data]"
Enjoy it!
David de Argentina
-
- Posts: 1596
- Joined: Mon Apr 04, 2005 4:13 pm
- Location: Buenos Aires, Argentina
- Contact:
Re: NeoBook as CGI program?
Same program called from Opera browser at Android device using the External (dynu linked) IP:
-
- NeoSoft Team
- Posts: 5628
- Joined: Thu Mar 31, 2005 10:48 pm
- Location: Oregon, USA
- Contact:
-
- Posts: 1596
- Joined: Mon Apr 04, 2005 4:13 pm
- Location: Buenos Aires, Argentina
- Contact:
Re: NeoBook as CGI program?
Thanks Dave,
It's very interesting really...
If you run (on any device) this url:
http://aplicaciones.dynu.com/recordset.exe
you could get the NeoBook program working.
I'm working on a new version that allow send parameters.
At NeoBook side, Commandline action should do the work, but nothing happens
At Powerbasic side (the webserver program) main problem is when webserver launch the action, in this case, the NeoBook program.
Perhaps i will need some help in this theme.
Greetings from Buenos Aires,
David de Argentina
It's very interesting really...
If you run (on any device) this url:
http://aplicaciones.dynu.com/recordset.exe
you could get the NeoBook program working.
I'm working on a new version that allow send parameters.
At NeoBook side, Commandline action should do the work, but nothing happens
At Powerbasic side (the webserver program) main problem is when webserver launch the action, in this case, the NeoBook program.
Perhaps i will need some help in this theme.
Greetings from Buenos Aires,
David de Argentina
Re: NeoBook as CGI program?
David,David de Argentina wrote:Thanks Dave,
It's very interesting really...
I'm working on a new version that allow send parameters.
At NeoBook side, Commandline action should do the work, but nothing happens
Perhaps i will need some help in this theme.
David de Argentina
Perhaps a safer way than launching an executable via the webserver (imagine if someone finds a way to launch format.exe) would be to use a database as the means to exchange information with NB.
You can have NB monitor a table for changes. When an entry is made you could have NB verify the request from a catalogue of acceptable responses or run a subroutine with data provided in a form that makes an entry in the table.
In this case the DB is an intermediary and you should be able to control what actions are done based on the content of specific columns in the record.
Using this method, NB could be used to monitor existing applications (content management / databases / form responses, etc) and make existing data useful in ways not imagined by the developer of that app.
David Payer
Des Moines, Iowa
USA
Des Moines, Iowa
USA
-
- Posts: 1596
- Joined: Mon Apr 04, 2005 4:13 pm
- Location: Buenos Aires, Argentina
- Contact:
Re: NeoBook as CGI program?
Hi DavidP,
Totally agree.
In order for this to be possible, it is necessary to be able to pass a parameter informing what is wanted to be done.
There is something strange about the way PowerBasic handles its own RUN function, which causes the parameter to be misinterpreted.
When I have some progress, I will let you know.
Regards,
David de Argentina
Totally agree.
In order for this to be possible, it is necessary to be able to pass a parameter informing what is wanted to be done.
There is something strange about the way PowerBasic handles its own RUN function, which causes the parameter to be misinterpreted.
When I have some progress, I will let you know.
Regards,
David de Argentina