[PHP] Using fsockopen

2002-07-04 Thread ER Lees

Help

I'm a newbie to indepth PHP.

I want to issue an fsockopen command to pass a POST data set to a remote server script.

I understand the pricipals behind fsockopen, but I cannot figure out the string I need 
to pass to POST the data - I will be emulating the output from a Form element.

In addition, how do I detect a successful operation? before closing the socket?.

Any help greatfully received.

thks

Richard


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Using fsockopen

2002-07-04 Thread Remy Dufour

Take a look at this class. I think thats what you want !

 Help

 I'm a newbie to indepth PHP.

 I want to issue an fsockopen command to pass a POST data set to a remote
server script.

 I understand the pricipals behind fsockopen, but I cannot figure out the
string I need to pass to POST the data - I will be emulating the output from
a Form element.

 In addition, how do I detect a successful operation? before closing the
socket?.

 Any help greatfully received.

 thks

 Richard




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Using fsockopen()

2001-08-13 Thread David Ovens

Thought I would repost, does anyone have a solution ?

I am using php, apache on a windows system.

- Original Message -
From: "David Ovens" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, August 13, 2001 1:26 AM
Subject: [PHP] Using fsockopen()


 I am making a program, that uses the fsockopen command looking at various
 url's, but occasionally it stops with a timeout error, I have used the @
 infront of the fsockopen command, but it still times out with the error,
how
 do I make php ignore the error so that I can make it automatically retry
or
 do something else  ??


 Dave





 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Using fsockopen()

2001-08-13 Thread Tim

Is the timeout coming from fsockopen() or from the program using too
much time?

I've used @fsockopen() before without any issues (at least on Linux and
Solaris), but if your script is running for a long time, you may need to
tweak the execution time limit:

http://www.php.net/manual/en/function.set-time-limit.php

- Tim

On 13 Aug 2001 11:40:04 +0100, David Ovens wrote:
 Thought I would repost, does anyone have a solution ?
 
 I am using php, apache on a windows system.
 
 - Original Message -
 From: David Ovens [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, August 13, 2001 1:26 AM
 Subject: [PHP] Using fsockopen()
 
 
  I am making a program, that uses the fsockopen command looking at various
  url's, but occasionally it stops with a timeout error, I have used the @
  infront of the fsockopen command, but it still times out with the error,
 how
  do I make php ignore the error so that I can make it automatically retry
 or
  do something else  ??



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Using fsockopen()

2001-08-13 Thread David Ovens

this is my fsockopen satement it will check about 4/5 urls and then time out
(exceed 30 second timeout error) on the 5/6 url,  I have no idea, why my
program wont continue checking all the urls in one go.


$socket = @fsockopen($urlArray[host], $urlArray[port], $errnum, $errstr,
100);


- Original Message -
From: Tim [EMAIL PROTECTED]
To: David Ovens [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, August 13, 2001 11:55 AM
Subject: Re: [PHP] Using fsockopen()


 Is the timeout coming from fsockopen() or from the program using too
 much time?

 I've used @fsockopen() before without any issues (at least on Linux and
 Solaris), but if your script is running for a long time, you may need to
 tweak the execution time limit:

 http://www.php.net/manual/en/function.set-time-limit.php

 - Tim

 On 13 Aug 2001 11:40:04 +0100, David Ovens wrote:
  Thought I would repost, does anyone have a solution ?
 
  I am using php, apache on a windows system.
 
  - Original Message -
  From: David Ovens [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Monday, August 13, 2001 1:26 AM
  Subject: [PHP] Using fsockopen()
 
 
   I am making a program, that uses the fsockopen command looking at
various
   url's, but occasionally it stops with a timeout error, I have used the
@
   infront of the fsockopen command, but it still times out with the
error,
  how
   do I make php ignore the error so that I can make it automatically
retry
  or
   do something else  ??



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Using fsockopen()

2001-08-13 Thread David Ovens

so far by increasing the set_tim_limit function it seems to have cured my
problem.  I shall see how it goes.

Thanks

Dave

- Original Message -
From: Tim [EMAIL PROTECTED]
To: David Ovens [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, August 13, 2001 11:55 AM
Subject: Re: [PHP] Using fsockopen()


 Is the timeout coming from fsockopen() or from the program using too
 much time?

 I've used @fsockopen() before without any issues (at least on Linux and
 Solaris), but if your script is running for a long time, you may need to
 tweak the execution time limit:

 http://www.php.net/manual/en/function.set-time-limit.php

 - Tim

 On 13 Aug 2001 11:40:04 +0100, David Ovens wrote:
  Thought I would repost, does anyone have a solution ?
 
  I am using php, apache on a windows system.
 
  - Original Message -
  From: David Ovens [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Monday, August 13, 2001 1:26 AM
  Subject: [PHP] Using fsockopen()
 
 
   I am making a program, that uses the fsockopen command looking at
various
   url's, but occasionally it stops with a timeout error, I have used the
@
   infront of the fsockopen command, but it still times out with the
error,
  how
   do I make php ignore the error so that I can make it automatically
retry
  or
   do something else  ??



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Using fsockopen()

2001-08-13 Thread Tim

Try doing 

set_time_limit(0); 

at the start of your script and see if that makes a difference.

- Tim

On 13 Aug 2001 12:00:24 +0100, David Ovens wrote:
 this is my fsockopen satement it will check about 4/5 urls and then time out
 (exceed 30 second timeout error) on the 5/6 url,  I have no idea, why my
 program wont continue checking all the urls in one go.
 
 
 $socket = @fsockopen($urlArray[host], $urlArray[port], $errnum, $errstr,
 100);



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Using fsockopen()

2001-08-13 Thread i_union

Hi All

I'm new in this forum and this is a test message if you recived it please
only reply this message .

Thanks in advance




_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Using fsockopen()

2001-08-12 Thread David Ovens

I am making a program, that uses the fsockopen command looking at various
url's, but occasionally it stops with a timeout error, I have used the @
infront of the fsockopen command, but it still times out with the error, how
do I make php ignore the error so that I can make it automatically retry or
do something else  ??


Dave





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]