chat

For questions about using Classic.

Post » Tue May 27, 2008 3:10 am

hi people, im trying to create a chat using construct, is possible?

im trying do this with text files, but im having a problem, i can download text files to show on edit box, but how i can upload text files to server?
B
1
G
4
Posts: 9
Reputation: 1,043

Post » Tue May 27, 2008 9:39 am

There are no online plugins yet so it's not really possible at the moment. Some should be on the way soon.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Tue May 27, 2008 2:52 pm

Zero: That would be awesome to create that once possible! Looking forward to it!
B
13
S
3
G
5
Posts: 286
Reputation: 3,193

Post » Tue May 27, 2008 6:03 pm

thanks for the replys :)
B
1
G
4
Posts: 9
Reputation: 1,043

Post » Tue May 27, 2008 9:38 pm

You could use Python sockets; a quick google finds several socket tutorials :).
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Thu May 29, 2008 12:06 am

Or PHP could be used, if you know how (I'm thinking about it too >_>)

The gist of my idea is make it add the message by accessing "send.php?m=" & MessageBox.Text - and that page uses $_GET["m"] to get the message and add it to a database (I could, and probably should, use an array but I only really started PHP, never went far past SQL).
Then, every ten seconds or so (or on a manual click limited to once every five seconds to prevent sidetrack DOS attacks) it downloads "readmsg.php" which returns the last fifteen messages in a format that the application then parses into the message bank.

Of course I'd have to sanitize the inputs and the like too.

However, using PHP to do it like this I could add certain other functions like username/login use, web control panels and even direct web access (which kind of negates the point of an external exe) to the chat.

At least that's the idea, I know I could probably do it but I'm not sure if I can be bothered. Plus it's a bit hacky but according to Rich (or was it Ashley? I'll have to find that post D: ) it should work, because apparently the download object gets the output of the PHP script.

Anyway, all the PHP stuff you'd need to do it that way can be learned easily at W3Schools and doesn't cost anything. The biggest problem you could possibly encounter would be finding a host that would let you do it without charging you a fair amount.
B
3
S
2
G
4
Posts: 130
Reputation: 1,735

Post » Thu May 29, 2008 3:21 pm

Yeah, though it may be easier to use the new HTTP object, you could essentially make a chat with PHP/ASP.

It's not really the optimal way though so Python sockets is still the better option until an Online plugin is developed.

It's worth noting that either way, you're going to need a host for the chat (be it a PHP/ASP server, or a PC which handles the custom chat host). Unless of course it's P2P, but that's not really a 'chat' :P.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Fri May 30, 2008 2:27 pm

[quote="Rich":288cre7h]Yeah, though it may be easier to use the new HTTP object, you could essentially make a chat with PHP/ASP.

It's not really the optimal way though so Python sockets is still the better option until I finish that Online plugin I've been dropping buckets of hints about.

It's worth noting that either way, you're going to need a host for the chat (be it a PHP/ASP server, or a PC which handles the custom chat host). Unless of course it's P2P, but that's not really a 'chat' :P.[/quote:288cre7h]

:D

That's true, I'm not really doing it for the efficiency though - more like a "Because I can" thing. Sort of like the MacBook Air.
B
3
S
2
G
4
Posts: 130
Reputation: 1,735


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests