470,849 Members | 1,497 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,849 developers. It's quick & easy.

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 1561
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by anuradha.k.r | last post: by
2 posts views Thread by sashan | last post: by
4 posts views Thread by Scott Robinson | last post: by
1 post views Thread by Bryan Martin | last post: by
2 posts views Thread by Rene Sørensen | last post: by
2 posts views Thread by Vitali Gontsharuk | last post: by
11 posts views Thread by Jay | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.