Need help to find the code or direction to make the server in HMG
Moderator: Rathinagiri
Need help to find the code or direction to make the server in HMG
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.
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
Try hbnetio sample. It should be in samples folder
Re: Need help to find the code or direction to make the server in HMG
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
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
I found old sample with micro httpd
- Attachments
-
- uhttpd.zip
- (44.31 KiB) Downloaded 215 times
- Roberto Lopez
- HMG Founder
- Posts: 4023
- Joined: Wed Jul 30, 2008 6:43 pm
Re: Need help to find the code or direction to make the server in HMG
Hi!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.
Maybe this article I've wrote some time ago, coul help you:
https://hmgthinking.wordpress.com/2015/07/18/23/
Good Look!
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
Re: Need help to find the code or direction to make the server in HMG
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
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
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.
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
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.