Page 1 of 2
Need help to find the code or direction to make the server in HMG
Posted: Wed Jun 22, 2022 6:10 pm
by Anand
I want to create a 'server' using HMG code which will wait for a 'port' and on receiving a html request will return data from dbf as html.
I should be able to access the server from browser using 'IP:port' like '192.168.0.100:5000'
I saw/used a similar code from HMG/MiniGUI, but I can not find it now. Need help to find the code or direction to make the server in HMG.
Re: Need help to find the code or direction to make the server in HMG
Posted: Wed Jun 22, 2022 7:39 pm
by mol
Try hbnetio sample. It should be in samples folder
Re: Need help to find the code or direction to make the server in HMG
Posted: Fri Jun 24, 2022 12:57 pm
by Anand
mol wrote: ↑Wed Jun 22, 2022 7:39 pm
Try hbnetio sample. It should be in samples folder
Thanks Mol for the suggestion.
I tried all NETIO I found in samples folder of HMG MiniGUI Ext.
In all the server works from the client application.
But I want to access the server from browser like 127.0.0.1:2941
Any guidance how I can achieve it ?
Re: Need help to find the code or direction to make the server in HMG
Posted: Sat Jun 25, 2022 6:49 pm
by mol
I'm out of office. But I try to find something tomorrow
Re: Need help to find the code or direction to make the server in HMG
Posted: Sun Jun 26, 2022 5:37 pm
by mol
I found old sample with micro httpd
Re: Need help to find the code or direction to make the server in HMG
Posted: Mon Jun 27, 2022 10:58 am
by Anand
mol wrote: ↑Sun Jun 26, 2022 5:37 pm
I found old sample with micro httpd
Thanks Mol. I will check and revert.
Re: Need help to find the code or direction to make the server in HMG
Posted: Thu Jun 30, 2022 1:09 pm
by Roberto Lopez
Anand wrote: ↑Wed Jun 22, 2022 6:10 pm
I want to create a 'server' using HMG code which will wait for a 'port' and on receiving a html request will return data from dbf as html.
I should be able to access the server from browser using 'IP:port' like '192.168.0.100:5000'
I saw/used a similar code from HMG/MiniGUI, but I can not find it now. Need help to find the code or direction to make the server in HMG.
Hi!
Maybe this article I've wrote some time ago, coul help you:
https://hmgthinking.wordpress.com/2015/07/18/23/
Good Look!
Re: Need help to find the code or direction to make the server in HMG
Posted: Sat Jul 02, 2022 8:24 am
by jayadevu
Hi Anand,
Just out of curiosity, why do you want to make a "server" in HMG when Apache (which is very popular and well maintained ) and the likes do the job best.
Warm regards,
Jayadev
Re: Need help to find the code or direction to make the server in HMG
Posted: Sun Jul 03, 2022 12:46 pm
by Anand
Sorry to everyone for late reply.
Last week was hectic and I could only sit for company work. Our kitchen is getting repaired and I had take leave for it.
Now I have some time and I will check both Mol and Roberto post for it. Thanks to both of you.
Jayadev, I have Android app. I am using it to access DBF and NTX files on our windows server, via ip:port address. To access the port I am using a java jar which accepts the request and creates files for it. Then my Xbase++ program uses that files to generate reports from DBF/NTX database. The java jar then send the report to the app.
I want to use Harbour to do both java and XBase++ job. But first to do the java job.
Re: Need help to find the code or direction to make the server in HMG
Posted: Sun Jul 03, 2022 1:34 pm
by Anand
mol wrote: ↑Sun Jun 26, 2022 5:37 pm
I found old sample with micro httpd
Well I could not compile it successfully. The batch file expects some per-defind path of Harbour and I use MiniGUI Extended.
I changed the path to MiniGUI Harbour folder but it did not work.
Maybe the code are very old (2009) and expects some code which is not there now.
Anyway no problem, I will keep trying and inform of any development. Thanks for the code.
I will now check Roberto's code as I get time.