-
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
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
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
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
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
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
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
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
]
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
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
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',
11 matches
Mail list logo