[PHP] Image Functions

2003-12-10 Thread David O'Brien
Is there an equivalent way of doing a ImageMagick

"composite file1.png file2.png file3.png"

using the builtin GD functions?

-Dave



David G. O'Brien
Web Services Coordinator / Systems Administrator
NACCRRA
The Nation's Network of Child Care Resource & Referral
1319 F Street NW, Suite 500
Washington, DC 20004
(202) 393-5501 ext. 113
(202) 393-1109 fax


Re: [PHP] Re: Write on image in faint color

2003-12-10 Thread David O'Brien
I just did something similar to what you are asking to do
I created a mask.png in photoshop with white text at 50% opacity saying 
what I wanted
Then I used the ImageMagick composite command line program thru a system call
"composite mask.png image.png image.png" to make the new watermarked images.

http://www.naccrraware.net/cluster/totals.php

Really not that hard to do

-Dave





At 11:22 AM 12/10/2003, David T-G wrote:
Ryan, et al --

...and then Ryan A said...
%
% I did want to check out what Al wrote but got scared as he mentioned "steep
% learning curve"
1) He actually meant shallow; there is, indeed, a lot to learn with IM.

2) IM is truly fantastic, and we use it for our gallery application; we
generate thumbnails as needed but cache them for future use.  Our load
isn't too bad as a result.
3) I'm going to soon be adding watermarking (some sort of copyright or
other text, either large and transparent or small and opaque) and
splashing (like "SOLD!" or such, large and fairly or completely opaque)
to my app, and I'll either mogrify the original image (and so thumbs
won't need any extra attention) or add the text to the thumb at gen time
(and so the "view original" will actually look at a full-sized splashed
'thumbnail'), respectively.  It should be quite straightforward but I'd
also love to see anyone's examples :-)
4) I'd love to see a PEAR IM module a la PerlMagick (but I haven't even
looked yet, so please don't flame me for missing something obvious).  One
of these days I'll have The Great Rewrite and that will go in then.  I'd
love to be rid of the system() calls to convert and mogrify.
%
% Cheers,
% -Ryan
%
% http://Bestwebhosters.com
HTH & HAND

:-D
--
David T-G  * There is too much animal courage in
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!


David G. O'Brien
Web Services Coordinator / Systems Administrator
NACCRRA
The Nation's Network of Child Care Resource & Referral
1319 F Street NW, Suite 500
Washington, DC 20004
(202) 393-5501 ext. 113
(202) 393-1109 fax


Re: [PHP] Current Month Only ?

2004-01-05 Thread David O'Brien
$current = getdate();
if ($current["mday"] < 10) {
   $current["mday"] = "0" . $current["mday"];
}
if ($current["mon"] < 10) {
   $current["mon"] = "0" . $current["mday"];
}
$sql = "SELECT * FROM yourtable WHERE datefield BETWEEN " . 
$current["year"] . $current"month"] . $current["mday"] - ($current["mday"] 
- 1) . " and " . $current["year"] . $current"month"] . $current["mday"] . " "



At 10:29 AM 1/5/2004, you wrote:
Dave Carrera wrote:

> How do I return from a MySql db, rows which only contain data for the
> CURRENT Month / Year ?
>
> So this month would currently return 5 days worth of data since it’s 
the 5th
> of Jan 2004.
>
> Thank you in advance for any examples, pointers or urls that may help with
> this.

What is your table structure?

--
Seks, seksiæ, seksolatki... news:pl.soc.seks.moderowana
http://hyperreal.info  { iWanToDie }   WiNoNa)   (
http://szatanowskie-ladacznice.0-700.pl  foReVeR(  *  )
Poznaj jej zwiewne kszta³ty... http://www.opera.com 007


David G. O'Brien
Web Services Coordinator / Systems Administrator
NACCRRA
The Nation's Network of Child Care Resource & Referral
1319 F Street NW, Suite 500
Washington, DC 20004
(202) 393-5501 ext. 113
(202) 393-1109 fax


Re: [PHP] Spell checker in PHP

2004-01-09 Thread David O'Brien
I used system call to a dos spell checker program from here
http://fmg-www.cs.ucla.edu/fmg-members/geoff/ispell.html#ftp-sites
using the places2k.txt file from the US census as the dictionary

http://www.census.gov/geo/www/gazetteer/places2k.html

-Dave



At 02:57 PM 1/9/2004, Robin Kopetzky wrote:
Good afternoon!

I know aspell and pspell are available but pspell won't work in my Windows
environment. Does anyone know how to tie into Word's spell checker using php
or another spell check option? What I need is a way to check spelling on
city/state names and select the most appropriate if the user mangles the
words.
Robin 'Sparky' Kopetzky
Black Mesa Computers/Internet Service
Grants, NM 87020
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


David G. O'Brien
Web Services Coordinator / Systems Administrator
NACCRRA
The Nation's Network of Child Care Resource & Referral
1319 F Street NW, Suite 500
Washington, DC 20004
(202) 393-5501 ext. 113
(202) 393-1109 fax


Re: [PHP] ADOdb SQL Updates

2004-04-21 Thread David O'Brien
At 11:01 AM 4/21/2004, you wrote:
Here's another version of the SQL statement and I get  a different
error now.  When I copy and paste this exact same SQL statement into an
update query in Access it works fine.  When I try to use it in my PHP
code, I get the following error:
SQL Statement:
UPDATE tblFAQ_Book SET fldTitle = 'one more test' WHERE (autoBookID= 1);
Error Message:
Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access
Driver] Operation must use an updateable query., SQL state S1000 in
SQLExecDirect in d:\adodb\drivers\adodb-odbc.inc.php on line 504
S1000: [Microsoft][ODBC Microsoft Access Driver] Operation must use an
updateable query.
this sounds like your are updating the table with exactly the same values 
that are already present?

Have you tried it on different values to see if it works or just the ones 
you paste into access?

-Dave


Thanks

Curt Zirzow wrote:

* Thus wrote Gabe ([EMAIL PROTECTED]):

...
(access): UPDATE tblFAQ_Book SET tblFAQ_Book.fldTitle = "one more test" 
WHERE (tblFAQ_Book.autoBookID = 1)

Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access 
Driver] Too few parameters. Expected 1., SQL state 07001 in 
SQLExecDirect in \adodb\drivers\adodb-odbc.inc.php on line 504
07001: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. 
Expected 1.
Recheck the spelling of column names and table names.
Curt
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


David G. O'Brien
Web Services Coordinator / Systems Administrator
NACCRRA
The Nation's Network of Child Care Resource & Referral
1319 F Street NW, Suite 500
Washington, DC 20004
(202) 393-5501 ext. 113
(202) 393-1109 fax
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] ADOdb SQL Updates

2004-04-21 Thread David O'Brien
After googling the error message for you, I found about a zillion pages
which all basically say the same thing.
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q175168

-Dave

At 11:01 AM 4/21/2004, Gabe wrote:
Here's another version of the SQL statement and I get  a different
error now.  When I copy and paste this exact same SQL statement into an
update query in Access it works fine.  When I try to use it in my PHP
code, I get the following error:
SQL Statement:
UPDATE tblFAQ_Book SET fldTitle = 'one more test' WHERE (autoBookID= 1);
Error Message:
Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access
Driver] Operation must use an updateable query., SQL state S1000 in
SQLExecDirect in d:\adodb\drivers\adodb-odbc.inc.php on line 504
S1000: [Microsoft][ODBC Microsoft Access Driver] Operation must use an
updateable query.
Thanks

Curt Zirzow wrote:

* Thus wrote Gabe ([EMAIL PROTECTED]):

...
(access): UPDATE tblFAQ_Book SET tblFAQ_Book.fldTitle = "one more test" 
WHERE (tblFAQ_Book.autoBookID = 1)

Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access 
Driver] Too few parameters. Expected 1., SQL state 07001 in 
SQLExecDirect in \adodb\drivers\adodb-odbc.inc.php on line 504
07001: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. 
Expected 1.
Recheck the spelling of column names and table names.
Curt
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


David G. O'Brien
Web Services Coordinator / Systems Administrator
NACCRRA
The Nation's Network of Child Care Resource & Referral
1319 F Street NW, Suite 500
Washington, DC 20004
(202) 393-5501 ext. 113
(202) 393-1109 fax


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


Re: [PHP] SMTP and GroupWise

2004-04-22 Thread David O'Brien
That's just basic pop before smtp. A common way of authenticating.
Just make a connection to the pop server after the hello and  before
sending the email. Most mail servers cache this info for a certain
amount of time so you may not have to do it every time you send.
I know that http://phpmailer.sourceforge.net/docs/ supports this
you may want to look at their code.
-Dave

At 02:47 PM 4/22/2004, Todd Cary wrote:
My client is using GroupWise to relay *without* having relay turned on and 
it needs/uses an authenication that is different from the regular 
SMTP.  Here is a trace of a message that went through:

02/11/2004 06:55:27 SMTP to rcpt: Al Smith <[EMAIL PROTECTED]>
02/11/2004 06:55:29 < +OK GroupWise POP3 server ready
02/11/2004 06:55:29 > USER scan01
02/11/2004 06:55:29 < +OK
02/11/2004 06:55:29 > PASS ***
02/11/2004 06:55:29 < +OK
02/11/2004 06:55:29 > QUIT
02/11/2004 06:55:29 < +OK GroupWise POP3 server signing off
02/11/2004 06:55:29 Authenticated at POP Host: mailman.cd-hq.com
02/11/2004 06:55:31 < 220 mailman.cd-hq.com GroupWise Internet Agent
6.5.1  Copyright (c) 1993-2003 Novell, Inc.  All rights reserved.
Ready
02/11/2004 06:55:31 > HELO FDM
02/11/2004 06:55:31 < 250 mailman.cd-hq.com Ok
02/11/2004 06:55:31 > MAIL FROM:<[EMAIL PROTECTED]>
02/11/2004 06:55:31 < 250 Ok
02/11/2004 06:55:31 > RCPT TO:<[EMAIL PROTECTED]>
02/11/2004 06:55:31 < 250 Ok
02/11/2004 06:55:31 > DATA
02/11/2004 06:55:31 < 354 Enter mail, end with "." on a line by itself
02/11/2004 06:55:31 > .
02/11/2004 06:55:31 < 250 Ok
02/11/2004 06:55:31 Rcpt: Al Smith ([EMAIL PROTECTED]) 1 file(s)
sent
02/11/2004 06:55:31 > QUIT
02/11/2004 06:55:31 < 221 mailman.cd-hq.com Closing transmission
channel
Does anyone know of a class that can provide this type of authenication?

Todd

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


David G. O'Brien
Web Services Coordinator / Systems Administrator
NACCRRA
The Nation's Network of Child Care Resource & Referral
1319 F Street NW, Suite 500
Washington, DC 20004
(202) 393-5501 ext. 113
(202) 393-1109 fax
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] handling .zip and .sit files

2004-01-27 Thread David O'Brien
At 12:39 PM 1/27/2004, John Nichel wrote:
Joey Manley wrote:

I'm working on an application which allows cartoonists to upload and
schedule comic strips at webcomicsnation.com.
this for me?
Zip files are a breeze if php is compiled with "--with-zip".  However, I 
don't know of any way to handle .sit (and would be real interested to know 
if it can be done).

http://us4.php.net/zip


Looking around I found this:

http://www.stuffit.com/win/sdk/

maybe someone could make an extension out of it or at least
you could system() their linux version and then manipulate the
extracted files.
-Dave


David G. O'Brien
Web Services Coordinator / Systems Administrator
NACCRRA
The Nation's Network of Child Care Resource & Referral
1319 F Street NW, Suite 500
Washington, DC 20004
(202) 393-5501 ext. 113
(202) 393-1109 fax
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Why doesn't PHP see my MySQL upgrade?

2004-02-17 Thread David O'Brien
You are using built-in mysql support. It uses that version of the API
you would have to compile with your own version of mysql to change that number
-Dave
At 11:26 AM 2/17/2004, Donpro wrote:
Hi,

Just installed a new RedHat 7.3 system.

1. I upgraded to PHP 4.3.4
2. I upgraded to MySQL 4.0.17
3. Restarted Apache; I even rebooted!
When I run phpinfo() in my web browser, it shows:

Client API version: 3.23.58

What's going on ???

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


David G. O'Brien
Web Services Coordinator / Systems Administrator
NACCRRA
The Nation's Network of Child Care Resource & Referral
1319 F Street NW, Suite 500
Washington, DC 20004
(202) 393-5501 ext. 113
(202) 393-1109 fax
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] confused about logic

2004-03-19 Thread David O'Brien
At 10:45 AM 3/19/2004, you wrote:
Hi All,

I have input for where users can enter order numbers in which to search
the database to find results matching their entry.
To enter multiple order numbers they can comma separate like:
1,34,21,34,54
Let's say you place these in the following variable



$ordernum = "1,34,21,34,54";

$orderarr = explode(",", $ordernum);

$count = 0;
foreach ($orderarr as $id) {
if ($count == 0) {
$orderstr = $orderstr . " '" . $id . "' ";
} else {
$orderstr = $orderstr . ", '" . $id . "' ";
}
$count++;
}
$query = "(cart_id in($orderstr) OR id in($orderstr))";
echo $query;

?>

What I need to do is take those numbers and make a query that would like
like:
(cart_id in('1','34','21','34','54') OR id in('1','34','21','34','54'))

ANY idea how I can accomplish this?

Thanks all!

Aaron



David G. O'Brien
Web Services Coordinator / Systems Administrator
NACCRRA
The Nation's Network of Child Care Resource & Referral
1319 F Street NW, Suite 500
Washington, DC 20004
(202) 393-5501 ext. 113
(202) 393-1109 fax
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php