473,385 Members | 1,320 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,385 software developers and data experts.

Socket binding

Right, I have a box with multiple IP addresses assigned to it.

What I want is to be able to connect to elsewhere, appearing as each of those
IPs. I currently have code where no source IP is set as the extra addresses
are a new thing to me.

It looks like it's possible using socket_bind() but that's a bit too low level
for me, and makes use of an experimental extension module.

Ideally I would like to be able to bind fsockopen() to a particular IP, then
repeat and bind it to another IP - is this possible at all? I already have the
code which deals with fgets() and fwrite(), so it would be much easier as I'm
not sure how to implement them using the other socket extension.

Hope that makes sense :) This is my first post here.

TIA

--
J
My Realm: http://www.myrealm.co.uk/
'Drink up. The worlds about to end.'
Jan 4 '06 #1
1 1643
Linux Jay wrote:
It looks like it's possible using socket_bind() but that's a bit too
low level for me, and makes use of an experimental extension module.


Still, socket_bind() is your friend. And AFAIK, the extension isn't
experimental anymore (see http://www.php.net/sockets).

The degree of low-level is not too bad, as you will see with the example on
the man page (http://www.php.net/socket_bind)
JW
Jan 4 '06 #2

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

Similar topics

11
by: anuradha.k.r | last post by:
hi, i am writing a socket program in python,both client side and server side.I've written the client side which is working perfectly fine(checked it against server program written in C).but as for...
2
by: sashan | last post by:
I'm writing a program using sockets. I'm binding to a port like this: PORT = 5000 # Arbitrary non-privileged port s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind((HOST,...
4
by: Scott Robinson | last post by:
I have been having trouble with the garbage collector and sockets. Unfortunately, google keeps telling me that the problem is the garbage collector ignoring dead (closed?) sockets instead of...
1
by: Joe | last post by:
Hi, I browsed the news and a few seem to have this problem too, but no solution ! I have a client server application where in case the connection gets bad (crashes or whatever) client or...
1
by: Bryan Martin | last post by:
Using udp sockets inside a class called by ASP.NET By impersonating you can use a TCP socket from a external class and call it from a ASP.NET page. However, changing the socket type to UDP and...
2
by: Rene Sørensen | last post by:
We are 4 students working on a assignment, that our teacher gave use, normally we do this is C++, but the 4 of us, use C# more often that C++ so… We made a small games called reversi, now our job...
2
by: Vitali Gontsharuk | last post by:
Hi! I have a problem programming a simple client-server game, which is called pingpong ;-) The final program will first be started as a server (nr. 2) and then as a client. The client then...
9
by: darthghandi | last post by:
I am trying to create a server application using asynchronous sockets. I run into a problem when I try to connect to my server using a non-.net program. I can establish the connection, and send...
11
by: Jay | last post by:
I have a socket listener and a test app. The socket listener app: opens up the port 51296 and listens. The test app - sends a message on port 51296. If the listener and test app are on the same...
5
by: darthghandi | last post by:
I've created a class to listen to all interfaces and do a BeginAccept(). Once it gets a connection, it passes the connected socket off and stores it in a List. Next, it continues to listen for...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.