Re: [PHP] Pixel Length of text message

2002-04-29 Thread Jan Peuker

Font-size is the height of text, the width is changing w/ every font (e.g. i
and m).
If you use exactly one font, you may use an array of widths(which you
measured before), but that's not really exact.
Perhaps, a way would be to use temporarly gd (ttfbox and/or imagefontwidth),
but I don't know how exactly, it's just an idea,
regards,

jan


- Original Message -
From: District Webmaster [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 29, 2002 6:17 PM
Subject: [PHP] Pixel Length of text message


 In html/css you can set a font size in pixels -- in my experience this
 means a letter takes the same number of pixels, regardless of
 resolution. With php, can I use string length and font pixel size to
 determine the length of a given string on a screen? Does anyone know an
 algorithm for this that works for any/every font?

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



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




[PHP] In Addition to [PHP] PHP Security

2002-04-29 Thread Jan Peuker

Sorry for answering with a new question.
But, what's if, say, the PHP-Parser crashes (or a filename is changed) and
Apache returns the source. How is it simply possible to store passwords
somewhere a httpd-users won't see it? (e.g. in the includes-Folder, am I
right?)
And are session-variables send per post or does the next script reads it
from the session-file so nobody can't read them?
Regars,

Jan Peuker

- Original Message -
From: Miguel Cruz [EMAIL PROTECTED]
To: Jay Fitzgerald [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, April 29, 2002 8:33 PM
Subject: Re: [PHP] PHP Security


 On Mon, 29 Apr 2002, Jay Fitzgerald wrote:
  Can someone point me in the right direction in determining just how
secure
  PHP really is?

 What are you actually trying to find out?

 As far as actual security problems in PHP, where the interpreter behaves
 contrary to documentation when provided with extraordinary inputs, the
 team has been very responsive with fixes (in contrast with, say,
 Microsoft).

 If you are wondering about the security of any given application developed
 in PHP, well, that's up to the developers of that application.

 miguel


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



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




[PHP] Stop to fast caching/parsing

2002-04-27 Thread Jan Peuker

Hi List,

my Problem is, on the second line of my script I validate a session. If it's
false, it dies. But in the first line, I require a header(html,body,title
etc.). Now, if a session fails, my die-Message ends in a script-Part, so
nobody sees it but gets an error by JS. Is there any way to stop parsing PHP
before flushing out required headers?
Thanks,

Jan


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




Re: [PHP] Stop to fast caching/parsing

2002-04-27 Thread Jan Peuker

But I WANT to do something else, loading other code!
But ok, I will check at first, then include a short header before dying.
This runs, but isn't beautiful. Thanks.

Jan

- Original Message -
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, April 27, 2002 4:56 PM
Subject: Re: [PHP] Stop to fast caching/parsing


 On Saturday 27 April 2002 22:49, Jan Peuker wrote:
  Hi List,
 
  my Problem is, on the second line of my script I validate a session. If
  it's false, it dies. But in the first line, I require a
  header(html,body,title etc.). Now, if a session fails, my die-Message
ends
  in a script-Part, so nobody sees it but gets an error by JS. Is
there
  any way to stop parsing PHP before flushing out required headers?

 Can't you change the order of your code so that it validates the session
 before doing anything else?

 --
 Jason Wong - Gremlins Associates - www.gremlins.com.hk
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *

 /*
 Put a rogue in the limelight and he will act like an honest man.
 -- Napoleon Bonaparte, Maxims
 */

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



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




Re: [PHP] sessions

2002-04-26 Thread Jan Peuker

If you use files you might get the contens of the folder where sessions
stored and just count.

Jan
- Original Message -
From: Fifield, Mike [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, April 26, 2002 5:57 PM
Subject: [PHP] sessions


 Is there a way to return the total number of sessions currently registered
 on a server?





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




[PHP] Display large text fields in html

2002-04-23 Thread Jan Peuker

Hi List,

I want to display large text fields if a user changes wants to, like a
dictionary. for example, a php-database generated page hosts a combobox
filled with ids, if a user changes it, a text otherwhere changes. Simple
Javascript would you say, but what's if this combobox has about 1000
entries(every entry about 10lines of text)? The page loads and runs very
slow. But I don't want to reload the page everytime the user changes the
field. Do you know any solution?
I know a few: a) As is said, a 2nd textbox filled with value coming from
array.
b) The box is filled by a set of textfiles which are generated before
c) above but w/ layer
d) no box but an image, b/w-gif generated by php
e) inline-frameset which is reloaded
f) an applett which get its resource by getURL
g) ...
As I said, do you know which would be the best?
Thanks a lot,

Jan

PS. Yes, I think this is rather a PHP question.


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




Re: [PHP] Re: Display large text fields in html

2002-04-23 Thread Jan Peuker

Ok, but true frames load very slow - not on an intra, but on internet.
The select is not the problem, I use cursors to output every line. At first
I did an implementation like yours but users said it's to uncomfortable
(they like static VB-Tools). Then I asked JS to reload a frameset using a
LIMIT-query from 50 +/- of selectedIndex and then just reload if a new index
is out of this range, but for me there is no ability to hide/show these
fields from JS. So i think i would have to use an Applett?

Jan

- Original Message -
From: Julio Nobrega Trabalhando [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 23, 2002 11:05 PM
Subject: [PHP] Re: Display large text fields in html


   If you have over 1000 entries, each one with ~10 lines of text, I would
go
 with frames. Not inline-frames, but a true frames. So each change can load
 the frame and show the information.

   Also, a select with 1000 entries? Break it apart. For example make one
 with (imagine this is a select in your browser):

 /--\
 Abba  Bee Gees|V|
 Beethoven  Coolio|
 ManyOptions  ZillionOptions |
 \---/

   It's an interval of choices, first the user selects the interval, which
 loads another select with only these in between entries.



 --

 Julio Nobrega.

 Um dia eu chego lá:
 http://sourceforge.net/projects/toca

 Ajudei? Salvei? Que tal um presentinho?
 http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884


 Jan Peuker [EMAIL PROTECTED] wrote in message
 006c01c1eb07$28d79500$7ca990d4@toshiba">news:006c01c1eb07$28d79500$7ca990d4@toshiba...
  Hi List,
 
  I want to display large text fields if a user changes wants to, like a
  dictionary. for example, a php-database generated page hosts a combobox
  filled with ids, if a user changes it, a text otherwhere changes. Simple
  Javascript would you say, but what's if this combobox has about 1000
  entries(every entry about 10lines of text)? The page loads and runs very
  slow. But I don't want to reload the page everytime the user changes the
  field. Do you know any solution?
  I know a few: a) As is said, a 2nd textbox filled with value coming from
  array.
  b) The box is filled by a set of textfiles which are generated before
  c) above but w/ layer
  d) no box but an image, b/w-gif generated by php
  e) inline-frameset which is reloaded
  f) an applett which get its resource by getURL
  g) ...
  As I said, do you know which would be the best?
  Thanks a lot,
 
  Jan
 
  PS. Yes, I think this is rather a PHP question.
 



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



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




Re: [PHP] Why my gd can not work?help please!!!

2002-04-19 Thread Jan Peuker

GIF is licensed by Unisys(it is a compuserve format). This is very
expensive, so it has been cut out of php. Solution: a) use PNG b) get an old
version of php.

regars,

Jan Peuker

P.S.: In future, please don't post 3 times using courier-extrabig.


- Original Message -
From: zhaoxd [EMAIL PROTECTED]
To: php mailling list [EMAIL PROTECTED]
Sent: Friday, April 19, 2002 9:06 AM
Subject: [PHP] Why my gd can not work?help please!!!


 I have installed gd-1.8.4 in apache server without any problems.To check
if the gd can work,I write some codes in php like this:
 ?
 Header(Content-type: image/gif);
 $im = imagecreate(40,30);
 $black = ImageColorAllocate($im, 0,0,0);
 $white = ImageColorAllocate($im, 255,255,255);
 imageline($im, 1, 1, 350, 25, $black);
 imagearc($im, 200, 15, 20, 20, 35, 190, $white1);
 imagestring($im, 5, 4, 10, Graph TEST!!, $white);
 ImageGif($im);
 ImageDestroy($im);
 ?.
 However,the output in IE is the warning message: bWarning/b:
ImageGif: No GIF create support in this PHP build in
b/usr/local/apache/htdocs/index.php/b on line b9/bbr.why??

 when I add comment to the line of ImageGif($im),nothing is displayed,why??

 ps:my php work very well in this server.

 help,please!!








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