How to create socket connection with php?
Let’s learn how to create socket connection with php. The most accurate or helpful solution is served by Stack Overflow.
There are ten answers to this question.
Best solution
Currently my situation is i have a window server hosting web and will communicate to unix host server(database) to retrieve data whenever user request. I'm using apache and PHP for my window server. Can i actually create a new persistent socket connection to host whenever a new user log in and the socket will tie to the specific user? the socket should only tie with one user. The reason to use persistent socket is because allow user to continue the connection with other pages after the user log...
Answer:
finally able to connect to the same host with multiple persistent socket by contain a "/"...
santrekate at Stack Overflow Mark as irrelevant Undo
Other solutions
my server program : import socket sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.bind(('localhost', 10086)) sock.listen(5) sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) while True: clientsocket, addr = sock.accept()...
Answer:
The problem you are encountering is that the while loop in your server code creates a new socket object...
John Clover at Quora Mark as irrelevant Undo
here is my code: <?php $PORT = 9001; //the port on which we are connecting to the "remote" machine $HOST = 'localhost'; //the ip of the remote machine (in this case it's the same machine) $sock = socket_create(AF_INET, SOCK_STREAM, 0) /...
Answer:
is something running on Port 9001 on the host that can accept the socket? XAMPP default installation...
jackerx_... at Yahoo! Answers Mark as irrelevant Undo
login-form.php <?php require("do_html_header.php"); do_html_header(); ?> <body bgcolor="00FFCC"> <form id="loginForm" name="loginForm" method="post" action="login-exec.php">...
Answer:
Are you sure it doesn't get past the login-form.php, or it flickers a bit when you submit, If it does...
Gab at Yahoo! Answers Mark as irrelevant Undo
I'm writing a simple FTP client. I want to create an FTP-control connection to send /receive commands only and an FTP-data connection to download file from the FTP server. This is what I got for the control connection: Socket controlSocket = new Socket...
Answer:
You want to create FTP client using Socket programming in Java then u need to check the link given in...
ageoftvb at Yahoo! Answers Mark as irrelevant Undo
i am using cpanel 11 i have these pear packages installed on my web host Auth_SASL 1.0.2 Mail 1.1.14 Mail_Mime 1.5.2 Mail_Queue 1.2.2 Mail_mimeDecode 1.5.0 Net_SMTP 1.3.2 Net_Socket 1.0.9 Net_URL 1.0.15 i have an note in php pear section of my...
Answer:
Your code is correct, may be there is something wrong with your pear installation. Follow these steps...
kapeel at Yahoo! Answers Mark as irrelevant Undo
Do I create a new php file and name it with anything I want, then input the codes (below) "in" the php file? A table should be created in mysql after I save this php file? <?php // Make a MySQL Connection mysql_connect("localhost"...
Answer:
yeah, you should create a file with a php extension and just paste this code there. I have made some...
Mohammed at Yahoo! Answers Mark as irrelevant Undo
Hi, so here is the thing. I would like to run/translate the following script in linux: This bat file would execute the main.php in parallel with the given parameters. start /d "E:\xampp\php\" php.exe E:\xampp\htdocs\main.php param1 param2 start...
Answer:
php /path/to/your/main.php param1 param2 & php /path/to/your/main.php param1 param2 & The "...
GAZ at Yahoo! Answers Mark as irrelevant Undo
Hello, I am trying to create a members page for my website and I want it to display a welcome message for when the person views it, something like: "Welcome <USERNAME>" I am new to PHP so I am not sure if there is something I am doing...
Answer:
I don't see any wrong with your code! I think you should replace 'Username' (string index) in both php...
Octet at Yahoo! Answers Mark as irrelevant Undo
Hi, When you create a socket connection to scan all (65535) TCP ports to ensure if they are open or not, the connection to all ports is really time consuming (at least taking hours to complete, if even it may stop). I was thinking threading some of the...
Answer:
Are you trying to scan a destination (a target pc, for example) or a path (to see if your pc can reach...
Douglas at Yahoo! Answers Mark as irrelevant Undo
Related Q & A:
- How to make SSH connection between servers using public-key authentication?Best solution by Server Fault
- How to create pagination in PHP?Best solution by Stack Overflow
- How to keep socket alive?Best solution by Stack Overflow
- How to create a table in PHP with MySQL?Best solution by Stack Overflow
- How to create dynamic php pages?Best solution by Stack Overflow
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.