PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Fri Dec 15, 2017 1:10 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Tue Nov 18, 2014 9:22 am 
Offline
Forum Commoner

Joined: Mon Nov 17, 2014 9:03 pm
Posts: 83
Hi,

Please note: if you are an experience php programmer, I am asking that you be patient since I don't have a code sample. My question is not a bout code error, is about how sockets work (interaction mechanics).

I am completely new to PHP, but because I am trying to learn PHP now, and with it, I want to write a video game.

I am still a little confused about Sockets.

For instance, I found this tutorial: http://www.binarytides.com/php-socket-p ... -tutorial/ that explains a lot about sockets.

I do understand the basics of how sockets work, since I have done socket programming in JAVA.

But this time I want to learn how to maintain a website in PHP which accepts socket connection from many clients, since it will be a video game.

So if anyone goes over the tutorial I posted in the link above, you will notice that the person who explained it used TELNET to test the server and client sockets.

This is my question, in php, when you write socket programming, the clients, do they have to run on telnet, for instance, if I am running the server in telenet can the clients (running NOT as a TELNET instance) run as web php page, and still read and send (relay) information to the server? Can someone try to explain this, that's what I am trying to understand?

Thanks.


Top
 Profile  
 
PostPosted: Tue Nov 18, 2014 10:28 am 
Offline
Moderator
User avatar

Joined: Mon Nov 03, 2003 7:13 pm
Posts: 5978
Location: Odessa, Ukraine
Telnet is just a client program in this case. It's used for demonstration purposes because it's ubiquitous. In real life you would use a real client, either pre-existing or written by you.


Top
 Profile  
 
PostPosted: Tue Nov 18, 2014 12:26 pm 
Offline
Forum Commoner

Joined: Mon Nov 17, 2014 9:03 pm
Posts: 83
Let rephrase the question, but do you need telnet to run either the server or the client php programs?

Like for instance, can I run the server sockets in one internet browser window from the computer that runs the web server, and then the client from another computer that wants to access the website and wants to communicate with the server that is running?


Top
 Profile  
 
PostPosted: Wed Nov 19, 2014 9:31 am 
Offline
Moderator
User avatar

Joined: Mon Nov 03, 2003 7:13 pm
Posts: 5978
Location: Odessa, Ukraine
No, telnet is not needed.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group