Re[2]: [PHP] wget --spider and ignore_user_abort(TRUE)

2008-11-10 Thread ANR Daemon
Greetings, Martino Dell'Ambrogio. In reply to Your message dated Tuesday, November 4, 2008, 15:11:45, - if I use wget --spider (HEAD request) the script exits just after the first output, all the functions below never get executed It is intended behaviour. Apache sending headers at the moment

[PHP] wget --spider and ignore_user_abort(TRUE)

2008-11-04 Thread Martino Dell'Ambrogio
Hi there, I am trying to get a script to run in background no matter what, but I am obviously doing it wrong. Here is the entire code: ?php //first instruction to be sure it is parsed ignore_user_abort(TRUE); set_time_limit(3600); //sleep(10); //this will send the HTTP code + headers + test

Re: [PHP] wget --spider and ignore_user_abort(TRUE)

2008-11-04 Thread Richard Heyes
I need the PHP script to keep running until the end) Until the end of what? Time? If you want your HTTP request to finish and a script to continue regardless then use the method I suggested, an start a shell process going. -- Richard Heyes HTML5 Graphing for FF, Chrome, Opera and Safari:

Re: [PHP] wget --spider and ignore_user_abort(TRUE)

2008-11-04 Thread Richard Heyes
- if I use wget --spider (HEAD request) the script exits just after the first output, all the functions below never get executed This has nothing to do with any system command. Then have your HTTP request trigger a system command that runs on regardless. The HTTP request continues on after

Re: [PHP] wget --spider and ignore_user_abort(TRUE)

2008-11-04 Thread Martino Dell'Ambrogio
On Tue, 04 Nov 2008 13:24:41 +0100, Jochem Maas wrote: try testing for the request type (i.e. HEAD) and if found don't output anything at all. This is a nice workaround and works perfectly, thanks! seems like apache (not the user) is shutting down the request as soon as it recieves the

Re: [PHP] wget --spider and ignore_user_abort(TRUE)

2008-11-04 Thread Martino Dell'Ambrogio
On Tue, 04 Nov 2008 11:59:20 +, Richard Heyes wrote: I need the PHP script to keep running until the end) Until the end of what? Time? Until the end of the script. If you want your HTTP request to finish and a script to continue regardless then use the method I suggested, an start a

Re: [PHP] wget --spider and ignore_user_abort(TRUE)

2008-11-04 Thread Martino Dell'Ambrogio
On Tue, 04 Nov 2008 10:03:11 +, Richard Heyes wrote: I am trying to get a script to run in background no matter what, but I am obviously doing it wrong. 1. Have it executed via a shell command. 2. Redirect all output. 3. Append the ampersand. This is not what I need, but thanks. The

Re: [PHP] wget --spider and ignore_user_abort(TRUE)

2008-11-04 Thread Richard Heyes
The question here is: why a PHP script called via 'wget --spider' through Apache/2 gets killed as soon as the HTTP reply code is sent, even if ignore_user_abort() is set? A script ending naturally is not the same as a user aborting. -- Richard Heyes HTML5 Graphing for FF, Chrome, Opera and

Re: [PHP] wget --spider and ignore_user_abort(TRUE)

2008-11-04 Thread Richard Heyes
I am trying to get a script to run in background no matter what, but I am obviously doing it wrong. 1. Have it executed via a shell command. 2. Redirect all output. 3. Append the ampersand. eg. A commandx such as: sleep 5 /dev/null 21 would become: ?php exec('sleep 5 /dev/null 21

Re: [PHP] wget --spider and ignore_user_abort(TRUE)

2008-11-04 Thread Martino Dell'Ambrogio
On Tue, 04 Nov 2008 11:37:15 +, Richard Heyes wrote: The question here is: why a PHP script called via 'wget --spider' through Apache/2 gets killed as soon as the HTTP reply code is sent, even if ignore_user_abort() is set? A script ending naturally is not the same as a user aborting.

Re: [PHP] wget --spider and ignore_user_abort(TRUE)

2008-11-04 Thread Jochem Maas
Martino Dell'Ambrogio schreef: On Tue, 04 Nov 2008 11:59:20 +, Richard Heyes wrote: I need the PHP script to keep running until the end) Until the end of what? Time? Until the end of the script. If you want your HTTP request to finish and a script to continue regardless then use the

[PHP] php wget: Return an empty file

2005-04-08 Thread Chris Blake
Greetings PHP(eople), I have a wget process that runs to download a file from a web site, however, if no file exists at the location I`m pulsing, how do I get it to abort ? Here is the code : ?php $getfile = 'wget -dv -o log.txt http://www.somesite.co.za/somefile.php'; $get =

Re: [PHP] php wget: Return an empty file [Solved]

2005-04-08 Thread Chris Blake
On Fri, 2005-04-08 at 09:47, Chris Blake wrote: Greetings PHP(eople), I have a wget process that runs to download a file from a web site, however, if no file exists at the location I`m pulsing, how do I get it to abort ? Here is the code : ?php $getfile = 'wget -dv -o log.txt

Re: [PHP] php wget: Return an empty file

2005-04-08 Thread Josip Dzolonga
Chris Blake wrote: Greetings PHP(eople), I have a wget process that runs to download a file from a web site, Why would you do that ? There're bultin functions in PHP for doing it. -- Josip Dzolonga http://josip.dotgeek.org jdzolonga[at]gmail.com -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] php wget: Return an empty file

2005-04-08 Thread Chris Blake
On Fri, 2005-04-08 at 13:52, Josip Dzolonga wrote: Chris Blake wrote: Greetings PHP(eople), I have a wget process that runs to download a file from a web site, Why would you do that ? There're bultin functions in PHP for doing it. wget was the first thing I thought of :) -- Chris

Re: [PHP] php wget: Return an empty file

2005-04-08 Thread Josip Dzolonga
Chris Blake wrote: wget was the first thing I thought of :) You thought wrong :-) Are you are going to parse the file after you've downloaded it ? See this function, http://www.php.net/file_get_contents , if allow_url_fopen is set to TRUE in your php.ini, there will be no problems opening a

[PHP] wget

2001-08-24 Thread Augusto Cesar Castoldi
Hi. I'm using wget -q -o /home/httpd/html/temp/logs.txt http://localhost/script.php; to run a php script from shell. But 'wget' always create a log file with same name of the script that wget are running in /home/httpd/html/. why he doesn't put the logs in logs.txt? thanks. Augusto

RE: [PHP] Wget and PHP

2001-07-16 Thread Ben Bleything
PROTECTED]] Sent: Sunday, July 15, 2001 9:59 AM To: [EMAIL PROTECTED] Subject: [PHP] Wget and PHP Is there a utility available that will get PHP based websites? Wget doesn't do it TIA! Clayton Dukes CCNA, CCDA, CCDP, CCNP Download Free Essays, Term Papers and Cisco Training from http

[PHP] Wget and PHP

2001-07-15 Thread Clayton Dukes
Is there a utility available that will get PHP based websites? Wget doesn't do it TIA! Clayton DukesCCNA, CCDA, CCDP, CCNPDownload Free Essays, Term Papers and Cisco Training from http://www.gdd.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL

Re: [PHP] Wget and PHP

2001-07-15 Thread DAve Goodrich
Wget works just fine for me here. The one problem I see is if you need to complete a form for entry, session login, then it can be a problem. I solve that by allowing a no login on our development box behind the firewall. I'm sure it could be done use a post (php has a post class I believe)

Re: [PHP] Wget and PHP

2001-07-15 Thread DAve Goodrich
on 7/15/01 9:59 AM, Clayton Dukes at [EMAIL PROTECTED] wrote: Is there a utility available that will get PHP based websites? Wget doesn't do it TIA! Clayton Dukes CCNA, CCDA, CCDP, CCNP Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net