# Using Server Socket

**URL:** <https://forum.kirupa.com/t/using-server-socket/323572>\
**Category:** programming\
**Created:** [July 7, 2011, 11:03am UTC](https://forum.kirupa.com/t/using-server-socket/323572 "2011-07-07T11:03:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![reza2181](https://avatars.discourse-cdn.com/v4/letter/r/7ea924/32.png) [@reza2181](https://forum.kirupa.com/u/reza2181)\
**Post date:** [July 7, 2011, 11:03am UTC](https://forum.kirupa.com/t/using-server-socket/323572/1 "2011-07-07T11:03:45Z")

</div>

Hi all

I have a LOGICAL problem…!  
I can create a server socket in some of programs like PHP, ASP or Even JAVA.  
I can test server socket in my localhost. for example i can create a PHP server socket and i can communicate my flash project (a simple chat program) with my server socket. but i don’t know how i must use my server socket in a “Real Host” !!!  
again for example when i want to run my php server socket in localhost i use CLI (php command line) and i start listening to a certain port on my local IP (127.0.0.1) and in ending of my test i close my Server socket so so easy with a certain text like “shutdown” or only close my CLI or any way that you think it work to close server socket …!  
but there is a several steps that i don’t know how i must do it on a real Host.  
**step one:**  
how i can start my server socket in my host?  
i don’t have access to CLI in my host.

**Step two:**  
think that “step one” solved and my server socket started.  
in this time how i can shutdown my server socket ?

i have more question but if this two step solved i think i can solve they too.  
i think it is my problem in an other words that:  
how i can “run” and “manage” a server socket like a “php” server socket that it is only a “.php” file, without accessing to “CLI” or “Command promte” or running a “.bat” file in my host?

i must add this note that i don’t know how i must use “CLI” or “command promte” or “.bat” in my Host. my supposition is that i can’t access to their ability.

if my information is not enough i can write more that about my problem.  
i will be so so happy for any clue.

have a nice time  
goodbye  
Reza
