Re: [PHP] Bind IP with fsockopen

2007-04-12 Thread Tijnema !
- From: Richard Lynch [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 11, 2007 1:19 AM Subject: Re: [PHP] Bind IP with fsockopen fputs adds a newline, and you've got \r\n already, so your total output in the original is \r\n\n In the socket_bind one, you've got none of the \r\n

Re: [PHP] Bind IP with fsockopen

2007-04-11 Thread chris
socket_write($sock, $request); // store reply echo $sock; //output reply?? socket_close($sock); // Close ? - Original Message - From: Richard Lynch [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 11, 2007 1:19 AM Subject: Re: [PHP] Bind IP with fsockopen fputs adds a newline

Re: [PHP] Bind IP with fsockopen

2007-04-11 Thread Tijnema !
11, 2007 1:19 AM Subject: Re: [PHP] Bind IP with fsockopen fputs adds a newline, and you've got \r\n already, so your total output in the original is \r\n\n In the socket_bind one, you've got none of the \r\n stuff at all, much less \r\n\n On Tue, April 10, 2007 5:56 pm, [EMAIL PROTECTED

Re: [PHP] Bind IP with fsockopen

2007-04-11 Thread chris
Thanks Tijnema $line = trim(socket_read($sock, 1024)); was what I was after. Thanks - Original Message - From: Tijnema ! [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Wednesday, April 11, 2007 5:09 PM Subject: Re: [PHP] Bind IP with fsockopen On 4/11

Re: [PHP] Bind IP with fsockopen

2007-04-11 Thread chris
AM Subject: Re: [PHP] Bind IP with fsockopen fputs adds a newline, and you've got \r\n already, so your total output in the original is \r\n\n In the socket_bind one, you've got none of the \r\n stuff at all, much less \r\n\n On Tue, April 10, 2007 5:56 pm, [EMAIL PROTECTED] wrote: Im having

Re: [PHP] Bind IP with fsockopen

2007-04-10 Thread chris
Im having trouble converting this snippet to use the bind_socket function. my original code is.. ? $domain = 'internet.co.uk'; $fs = fsockopen('dac.nic.uk', 2043, $errno, $errstr, 60); if (!$fs) { fclose($fs); } else { fputs($fs, $domain\r\n); $line = fgets($fs, 1024); echo $line; } ? I

[PHP] Bind IP with fsockopen

2007-04-07 Thread chris
Hi is it possible to socket_bind with fsockopen? im using this with all my scripts... $fs = fsockopen('example.com', 2043, $errno, $errstr, 60); if (!$fs) { fclose($fs); and I need the remote conection to see me as one of my other IP's Ive read through socket_bind

Re: [PHP] Bind IP with fsockopen

2007-04-07 Thread Tijnema !
On 4/7/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi is it possible to socket_bind with fsockopen? im using this with all my scripts... $fs = fsockopen('example.com', 2043, $errno, $errstr, 60); if (!$fs) { fclose($fs); and I need the remote conection to see me as one of my other IP's

Re: [PHP] Bind IP with fsockopen

2007-04-07 Thread chris
] To: [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Saturday, April 07, 2007 11:54 PM Subject: Re: [PHP] Bind IP with fsockopen On 4/7/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi is it possible to socket_bind with fsockopen? im using this with all my scripts... $fs = fsockopen

Re: [PHP] Bind IP with fsockopen

2007-04-07 Thread Tom Rogers
Hi, Sunday, April 8, 2007, 6:51:46 AM, you wrote: cac Hi is it possible to socket_bind with fsockopen? im using this with all my scripts... cac $fs = fsockopen('example.com', 2043, $errno, $errstr, 60); cac if (!$fs) { cac fclose($fs); cac and I need the remote conection to see me as one of my

Re[2]: [PHP] Bind IP with fsockopen

2007-04-07 Thread Tom Rogers
Hi, TR You will have to do it using the socket api something like this but TR with error checking: TR ?php TR $sourceip = '192.168.1.1'; // ip you want to bind to TR $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); TR socket_bind($sock, $sourceip); TR socket_connect($sock, 'example.com',