Re: [PHP] sleep and usleep not working ??

2001-01-26 Thread Benny Nissen

Hi

Sorry - but as far as I can tell it does not work. It still have the same
strange behavior.
When using sleep I have no output. Usleep has no wait time (or it may delay
output a bit but not program execution) ?

Benny


""Daniel Grace"" [EMAIL PROTECTED] skrev i en meddelelse
94m72k$qd9$[EMAIL PROTECTED]">news:94m72k$qd9$[EMAIL PROTECTED]...
 ""Benny Nissen"" [EMAIL PROTECTED] wrote in message
 94k0ql$em$[EMAIL PROTECTED]">news:94k0ql$em$[EMAIL PROTECTED]...
  Hi All
 
  I have tried to get this to work but it does not produce any output in
the
  browser - why
 
  $i = 1;
  while ($i)
  {
   if(connection_aborted())
break;
 
   echo $i;
   echo "BR";
  $i++;
 
   sleep(1);
  //usleep(1000);
  }
 

 If you're trying to get a delayed output affect (which isn't recommended,
 but would probably work in this case as long as you're not inside a
table),
 you'll either need to do:

 ob_implicit_flush(1);
 // at the beginning of the script (use 0 to turn it back off)

 or:
 flush(); // after the echo and before the sleep.



 Side note: When you're using PHP for shell scripts (Don't look at me like
 that) and the like, ob_implicit_flush is your friend.

 --
  - Daniel Grace http://dewin.oldbattery.com/

   "Space may be the final frontier but its made in a Hollywood basement."
 - Red Hot Chili Peppers - Californication




 --
 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] sleep and usleep not working ??

2001-01-23 Thread Benny Nissen

I have to add that I am using the latest PHP version.
It was Windows and Linux servers I was talking about.
usleep work in the way that it return right away without any sleep time.

Benny

""Benny Nissen"" [EMAIL PROTECTED] skrev i en meddelelse
94k0ql$em$[EMAIL PROTECTED]">news:94k0ql$em$[EMAIL PROTECTED]...
 Hi All

 I have tried to get this to work but it does not produce any output in the
 browser - why

 $i = 1;
 while ($i)
 {
  if(connection_aborted())
   break;

  echo $i;
  echo "BR";
 $i++;

  sleep(1);
 //usleep(1000);
 }

 It turns out that the sleep and usleep does not return as far as I can
tell.
 If I use usleep the wait time parameter have no affect on program
execution
 ??
 Tried this on both Windows and Linux.

 Benny



 --
 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]




[PHP] How can I download information (file) without standard save as dialog ??

2001-01-16 Thread Benny Nissen

Hi All

I am unable to find the correct solution (where to start) with this 
problem. We are an Open Source group developing an ECC based 
(elliptic curve) public key cryptography alternative to PGP. For this 
project we need a public database to store the public keys in with 
search facilities and the possibility to import the selected records 
to a local private database. We have tried to keep all things very 
open and extendable and I have tried to define an interface to the 
shared database that will allow it to be independent from the actual 
application (the database can be replaced without any changes to 
the database protocol). I will use MySQL and PHP for the server  
side work.

For more information please see:
http://www.egroups.com/group/pegwit
or
http://www.pegwit.org (not working yet)

To download the current GUI front-end download:
http://www.egroups.com/files/pegwit/Contributions/GUIBeast6.zip

I have come to the conclusion to base it on a standard protocol like 
the one used in HTML and URL with web browsers. This is mainly 
because I then can simplify the shared database protocol to 2 
basic actions (export a key(s) and import keys). All selection etc. 
is a job for the browser and not for the local application. The 
protocol is also very portable and will be easy to implement on 
many platforms.

It is easy to export a public key record to the web server with a 
search URL like: (http://site.xx/?name1=value1name2=value2 
etc.)

My main problem is to find a way to export the selected records 
from the browser and import them into the local database (you may 
have a solution). The only solution I have found is to pass the IP 
address and port with the URL when the browser is initialized and 
start a IP server in the local application that will wait and receive the
selected records from the web server when the end user press a 
specific button in the selection web page (server then act as a IP 
client and connect to the local server to deliver the selected 
records)

A more simple and also portable solution is to download a file with 
the selections made. My main problem with this approach is the 
"save as" dialog that will come up in all cases (you may have a 
workaround this problem). If the dialog is not shown up the 
download destination (directory) need to be passed to the server 
when the session is initialized so that the web browser knows 
where to save the information. Is this possible with PHP ???

Thanks in advance.
Benny

-- 
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]