If we open a socket connection in a php script and don’t close it in coding.
After script execution is completed, will the socket connection stay open?
If we open the same script in new tab or refresh the page, can we reuse that connection any how?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If it’s opened with
fsockopen(), it will be closed when the script finishes. If you want the socket to persist between script executions, check outpfsockopen(), which is provided exactly for this usecase.