Creating a simple multi user chat program

Mark Read

Well-Known Member
Licensed User
Longtime User
Good morning forum.

My children have asked me to create a chat program for them to talk to selected friends (somewhere in the same town). I have seen the example Erel "Embed an Http Server...".

Do I still need an external server or can one of the children use this and all others connect to her?

Or can anyone else give start help?

Many thanks.
Mark
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
A solution such as the one in the HttpServer example cannot work if the "server device" is connected over a mobile network as mobile network providers block incoming connections.

If you have a spare device then you can turn it into a server. However you will still need to know its IP address (which changes from time to time). Practically it will be much easier to use an external server for that.
 
Upvote 0

Mark Read

Well-Known Member
Licensed User
Longtime User
Thanks Erel, I thought as much. Do you know of any free servers which would serve my purpose?

Mark
 
Upvote 0

Mark Read

Well-Known Member
Licensed User
Longtime User
Thanks for the reply Susu but my problem is that I don't have a webserver either. At least not one where I can install supplementary software!

Any further ideas?

Thanks
Mark.
 
Upvote 0

susu

Well-Known Member
Licensed User
Longtime User
You can register a free host like Free Hosting but I think you shoud buy your own host, it's about $2-$3/month.
 
Upvote 0

abner69

Member
Licensed User
Longtime User
Web Server at Home

If you have internet access within your house, another option is you can use your home computer as a "server". You can then install free webserver software such as IISExpress by microsoft, or Apache by the Apache Foundation.

You will need to install a few extras on your computer such as perl, php, and a web based chat app.

You willl also need a service such as no-ip.com to register/update your ip address provided by your isp.

All of this may sound like alot, but infact, can be done in just a couple of hours. if you have any questions, don't hesitate to ask.

...Pablo
 
Upvote 0

Mark Read

Well-Known Member
Licensed User
Longtime User
Thanks for the info Pablo. My internet at home is protected against external connections and I cannot change this. My internet is shared between three houses. I have not yet figured out how to port forward to a NAS system running Linux which would probably solve my problems (router through a second router - complicated but required).

My children want to talk to their friends who are not in my network so an external server would be the only other option. The only reason for doing this is to get them off Facebook and Ask.fm, in a controlled environment.

Thanks to all
Mark
 
Upvote 0

abner69

Member
Licensed User
Longtime User
another idea es if they are all running android devices, you could use GCM for sending messages back and for through a client.

...Pablo
 
Upvote 0

DKCERT

Member
Licensed User
Longtime User
How about a sms-chat, where a whitelist holds the 'legal' contacts and the messages are salted with a secret word to filter messages.

All text messages are intercepted. If the message is from a whitelisted number, then the text is checked for the secret word. If the secret word exist, the rest of the text is passed to the app and shown. If the secret word isn't found, the messages is treated normally.

This approach will of course put some strain on the subscription type )
 
Upvote 0

NeoTechni

Well-Known Member
Licensed User
Longtime User
You could set up a free/open source Jabber server
Get an IP redirect service like no-ip
And set up trillian on their devices with the profile for the jabber server
 
Upvote 0

Mark Read

Well-Known Member
Licensed User
Longtime User
@DKCERT - Thanks but you must be joking. My children have all got 1000 sms free in all networks and they managed to use them up in two weeks before I installed the Wifi system. That is not an option, sorry.

I will have another attempt at port forwarding through my two routers, to access my NAS. It has a web server and I am sure I can add php support.


Anyone know how to port forward?
Thanks to all for the suggestions.

Mark
 
Upvote 0

Mark Read

Well-Known Member
Licensed User
Longtime User
@thedesolatesoul.

Thanks for the info. Spent the whole day resetting my NAS, installing a web server with php and sql. Even got the port forwarding to work (stupid mistake: read in a forum that an external PC is required to test as from inside the domain it will not work. Thank god for handy's)!

@Erel.

Read that but I thought that would only work if all were on the same subnet. I need, my children plus selected friends on a different subnet.

Now is only the decision: php or sql? Time to start reading again.
Thanks to all.
Mark
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…