Re: [PHP] Bind IP with fsockopen

2007-04-12 Thread Tijnema !
essage - 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

Re: [PHP] Bind IP with fsockopen

2007-04-11 Thread chris
nesday, 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 stuff at all, much less \r\n\n On Tue, April 10, 2007 5:56

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: Sent: Wednesday, April 11, 2007 5:09 PM Subject: Re: [PHP] Bind IP with fsockopen

Re: [PHP] Bind IP with fsockopen

2007-04-11 Thread Tijnema !
ts($fs, "$domain\r\n"); // send query $line = fgets($fs, 1024); // store reply echo $line; // output reply so far I have.. - Original Message - From: "Richard Lynch" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 11, 2007 1:19 AM Sub

Re: [PHP] Bind IP with fsockopen

2007-04-11 Thread chris
// output reply so far I have.. - 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, and you've got \r\n already,

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.. I think im getting stuck on the fputs bit.. I have this which does not work.. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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> $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', 2043

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 o

Re: [PHP] Bind IP with fsockopen

2007-04-07 Thread chris
AIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: 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 = f

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 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 http://uk.php.net/manual/en/fu