Re: [PHP] How to generate thumbnail ?

2002-12-23 Thread Gil Disatnik
Use convert (a part of ImageMagic), it's almost a standard on any unix 
machine and if not you can always compile it even as a user on a shared server.

At 03:38 AM 12/23/2002 +0800, j wrote:
Hi all ,

i want to generate the thumbnail of an image but I want my php to be
portable. So how can I generate thumbnail without depending on php host
configuration (like --with-gd) ?

Thanks .

Perseus



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



Regards

Gil Disatnik
UNIX system/security administrator.

GibsonLP@EFnet
http://www.disatnik.com
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Windows NT has detected mouse movement, you MUST restart
your computer before the new settings will take effect, [ OK ]

Windows is a 32 bit patch to a 16 bit GUI based on a 8 bit operating
system, written for a 4 bit processor by a 2 bit company which can
not stand 1 bit of competition.
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- 


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



[PHP] pspell and html tags

2002-12-21 Thread Gil Disatnik
Hello,
I am looking for a way to tell pspell_check() to ignore html tags, I tried 
adding a few html tags using pspell_add_to_session() but it said it won't 
accept words starting with ...

Any idea?

Thanks.


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



[PHP] pspell and html tags

2002-12-21 Thread Gil Disatnik
Hello,
I am looking for a way to tell pspell_check() to ignore html tags, I tried 
adding a few html tags using pspell_add_to_session() but it said it won't 
accept words starting with ...

Any ideas?

Thanks.


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



[PHP] Sorry

2002-12-21 Thread Gil Disatnik
Hey there,
Sorry for sending my question twice, I got a strange error saying:

Sorry. Your message could not be delivered to:

php-list,emc (The name was not found at the remote site. Check that the
name has been entered correctly.)
--
So I assumed it didn't make it (so I registered to the list and tried again...)



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




Re: [PHP] Mass Mailing

2002-12-21 Thread Gil Disatnik
I have written a few useful php functions that put the email addresses on 
one file and the message on another file.
I have a crontabbed script that runs every min looking for these files and 
then using qmail-inject to send them (sendmail is bad, replace it ;))
It's very good for sending a few thousands emails every time as the php 
script execution finishes in a second and you don't have to deal with max 
execution time and everything.

If you wish I could send you the scripts.

At 05:10 PM 12/21/2002 -0500, you wrote:
An upcoming project I'm working and spec'ing out is a mass mailing
application. Initially, I was looking at Mailman which was written in Python
since it looks like it handles delivering emails efficiently without killing
the server. We have 1 client able to send 110,000 emails at 6.5K avg per
week on PIII 800 with 128 MB RAM using Mailman. The inteface however is very
bad and we'd like to develop other features like text ads, tracking,
templates, etc. This would require writing a wrapper around Mailman in PHP.
I was considering of writing the mass mailing application in PHP instead
though.

If anyone has eperience writing such applications with this amount of
emails, I'd like to know what you've done.

I'm thinking of coding the front end in PHP that will put the email into a
queue table that will force a command line PHP script listening on a
particular port to scan the database for this new task in queue. Once it
picks up the task, the timeout for this application to run will be set to
infinite. It'll establish a SMTP socket either to a really beefed up mailing
list server or the localhost SMTP server to begin blasting out these emails.

From what I understand, it's better to blast emails via an open socket
connection to SMTP rather than looping through Sendmail. Is this the right
thing todo?

I've also heard that PHP is not good for writing mailing lists application,
but Mailman is written in Python and it's able to send thousands of email
just fine. Any thoughts on this?



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



Regards

Gil Disatnik
UNIX system/security administrator.

GibsonLP@EFnet
http://www.disatnik.com
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Windows NT has detected mouse movement, you MUST restart
your computer before the new settings will take effect, [ OK ]

Windows is a 32 bit patch to a 16 bit GUI based on a 8 bit operating
system, written for a 4 bit processor by a 2 bit company which can
not stand 1 bit of competition.
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- 


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



[PHP] Taking the last word out of a string

2002-04-12 Thread Gil Disatnik

Hello there,
I have a string that comes in various sizes and word numbers, I wish to 
extract the last word from this string, how can I do it?
I have already looked at substr() and strrpos() man pages looking for the 
answer... couldn't find it though...

Thank you!



Regards

Gil Disatnik
Rockfour's webmaster
GibsonLP@EFnet

_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Windows NT has detected mouse movement, you MUST restart
your computer before the new settings will take effect, [ OK ]

Windows is a 32 bit patch to a 16 bit GUI based on a 8 bit operating
system, written for a 4 bit processor by a 2 bit company which can
not stand 1 bit of competition.

www.technohac.com/webmaster - Homepage
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-


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




[PHP] strlen() gives a wrong count

2002-03-19 Thread Gil Disatnik

Hello there,

I have a 98 characters string (including spaces), wc -c says it's 98 
characters and a file containing this string is 98 bytes as well.

For some reason - strlen() says it's more... it says it's a 104 characters 
strings, when I removed the spaces (using sed on the shell and using 
str_replace on php) - wc said it's 83 characters and strlen() said it's 89...

How could that be? is there another way to get the exact number of 
characters in a string?

Thanks.



Regards

Gil Disatnik
UNIX system/security administrator.

GibsonLP@EFnet

_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Windows NT has detected mouse movement, you MUST restart
your computer before the new settings will take effect, [ OK ]

Windows is a 32 bit patch to a 16 bit GUI based on a 8 bit operating
system, written for a 4 bit processor by a 2 bit company which can
not stand 1 bit of competition.
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-



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




RE: [PHP] strlen() gives a wrong count

2002-03-19 Thread Gil Disatnik

Of course.
Following is a part Hebrew part English text I have in my phorum, it 
probably won't look good on a system without Hebrew support.

String on a file:
---snip---
îé ùøåöä îåæîð/ú ìëúåá àú ùìå...(àí éù).

370304 - DooG

îäçìåöéí P-:


NP - King Crimson - Beat
---snip---

wc -c testfile says it's 98
sed 's/\ //g' testfile | wc -c says it's 83



The same string on a php variable:
---snip---
$chars=îé ùøåöä îåæîð/ú ìëúåá àú ùìå...(àí éù).

370304 - DooG

îäçìåöéí P-:


NP - King Crimson - Beat;
---snip---
strlen($chars); says 104
strlen(str_replace( ,,$chars)); says 89...


Thank you for the help!


At 13:19 19/03/2002 -0700, Darren Gamble wrote:
Good day,

Could you post this mystery string so that we could help you?


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-Original Message-
From: Gil Disatnik [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 19, 2002 1:12 PM
To: [EMAIL PROTECTED]
Subject: [PHP] strlen() gives a wrong count


Hello there,

I have a 98 characters string (including spaces), wc -c says it's 98
characters and a file containing this string is 98 bytes as well.

For some reason - strlen() says it's more... it says it's a 104 characters
strings, when I removed the spaces (using sed on the shell and using
str_replace on php) - wc said it's 83 characters and strlen() said it's
89...

How could that be? is there another way to get the exact number of
characters in a string?

Thanks.



Regards

Gil Disatnik
UNIX system/security administrator.

GibsonLP@EFnet

_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Windows NT has detected mouse movement, you MUST restart
your computer before the new settings will take effect, [ OK ]

Windows is a 32 bit patch to a 16 bit GUI based on a 8 bit operating
system, written for a 4 bit processor by a 2 bit company which can
not stand 1 bit of competition.
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-



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


Regards

Gil Disatnik
UNIX system/security administrator.

GibsonLP@EFnet

_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Windows NT has detected mouse movement, you MUST restart
your computer before the new settings will take effect, [ OK ]

Windows is a 32 bit patch to a 16 bit GUI based on a 8 bit operating
system, written for a 4 bit processor by a 2 bit company which can
not stand 1 bit of competition.
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-


[PHP] substr_count() and regex

2002-03-17 Thread Gil Disatnik

Hello there,
I am trying to use substr_count() to count the number of Hebrew characters 
in a string,
I tried substr_count($test, /[à-ú]/), but it returns 0 as if it can't 
match the regex I have inserted there, I hoped it will work the same as 
preg_match() that works great (preg_match(/[à-ú]/, $test)) for example 
works just fine, but I guess substr_count() is a bit different...

Is there a way for me to do that? maybe with another similar function? (If 
not I will have to solve it in an ugly while loop that searches for Hebrew 
characters one by one...)

Thank you.



Regards

Gil Disatnik
UNIX system/security administrator.

GibsonLP@EFnet

_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Windows NT has detected mouse movement, you MUST restart
your computer before the new settings will take effect, [ OK ]

Windows is a 32 bit patch to a 16 bit GUI based on a 8 bit operating
system, written for a 4 bit processor by a 2 bit company which can
not stand 1 bit of competition.
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-