x


PHP Connect to Unity Server and send an RPC

Hey everyone! I would like to be able to call a function on a unity server by connecting to it with PHP and submitting some information. The information is purely text (and may be as simple as a short number), however it's the initial connection i'm a little stumped with! An example of what I'm trying to do would be loading a certain webpage might for instance generate an object ingame in a certain position on clients via the server.

I'm certain that this kind of thing is possible in PHP, just I don't know what to connect to in unity to send through an RPC. Any help would be really appreciated - thanks! All the best, Luke Briggs

more ▼

asked May 25 '10 at 10:14 PM

Luke Briggs gravatar image

Luke Briggs
51 1 1 3

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

Never mind - I've figured out how to do it.

Thanks anyway :)

more ▼

answered May 26 '10 at 01:11 PM

Luke Briggs gravatar image

Luke Briggs
51 1 1 3

For the benefit of others, how about adding what you figured out to the answer. :-)

May 26 '10 at 02:05 PM SteveFSP
(comments are locked)
10|3000 characters needed characters left

Probably a little late for some, but better late rather than never I suppose!

I solved this one by implementing my own server -> client system (by making a server in C#) that the clients (both game using C# System.Net.Sockets and PHP through fsockopen) can then connect to. This made lots of other interesting things possible, so if you can make your own server then I would certainly reccommend it :)

more ▼

answered May 21 '11 at 11:04 PM

Luke Briggs gravatar image

Luke Briggs
51 1 1 3

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x706
x412
x237
x131

asked: May 25 '10 at 10:14 PM

Seen: 2252 times

Last Updated: May 21 '11 at 11:04 PM