473,395 Members | 1,541 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Passing sockets through pages

Dan
Hello

Has anybody tried to open a socket to connect to a server on page a.php
and then passing it throung a session variable and getting it back at
page b.php and use it there.

Ive tried that and it doesnt work, the sockets looses the connection.
Ive tried algo to serialize it one page and un serialize it int the
next one and still doesnt work.

Any ideas?

Dan

Jul 17 '05 #1
1 1455
Dan wrote:
Hello

Has anybody tried to open a socket to connect to a server on page a.php
and then passing it throung a session variable and getting it back at
page b.php and use it there.

Ive tried that and it doesnt work, the sockets looses the connection.
Ive tried algo to serialize it one page and un serialize it int the
next one and still doesnt work.


It won't work - PHP closes all file handles on exit. You could setup some
background process to handle the socket connection (but then you'll need
some method of connecting to the background process - but there may be
benefits in implementing a lightweight protocol to the backend).

C.

Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Rob Hunter | last post by:
Hi all. I want to run a Python daemon that manages a "to-do" queue. I want it so that the daemon is always running, where its running consists of looking at the queue to see if it has any jobs,...
11
by: Mike M | last post by:
Is it possible? In the parent process, I have a socket that binds, listens and then accepts new connections (which creates new sockets in the process). I want to be able to pass some of these new...
15
by: kernel.lover | last post by:
Hello, i want to know to have multiple clients connects to same server program does following is correct code #include <sys/types.h> #include <sys/socket.h> #include <stdio.h> #include...
1
by: Matt M | last post by:
Ok. So I'm passing values between web pages, as per microsoft's framework development guide (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/ht...
0
by: Tressa | last post by:
Sorry to be such a novice about this but..... I have a windows service. It contains two separate files. Both have the same namespace name. I need to pass "bDisplay" into the other file. I am...
2
by: Raj | last post by:
My C++ server uses sockets to communicate to the C# Client which is also using the sockets. I want to pass a C Structure from the VC++ socket server to the C# Client. What are the considerations...
12
by: manochavishal | last post by:
Hi, I am having strange problem in my Program. I cannot paste the whole program as it is huge so just pasting the lines i think are necessary. I am passing a integer array pointer to a...
1
by: martin | last post by:
This code compiles (this is how it should work): Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); This code does not compile (passing an int instead of...
2
by: william.w.oneill | last post by:
I have an application that takes a few command line parameters. As recommended by others in this group, I'm using a named mutex to ensure that only one instance of the application is running. My...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.