Re: [PHP] JPEG info needed

2007-01-25 Thread Gerry Danen
for a JPEG). Standard computer-science function trick to return prior state when altering state, and to simply return state if the second arg is not passed in. So if you do not pass in a second arg, you should be getting the state of the JPEG. Try it. On Wed, January 24, 2007 7:20 pm, Gerry Danen

Re: [PHP] JPEG info needed

2007-01-24 Thread Gerry Danen
Richard, imageinterlace() turns the interlace bit on or off. It only returns 1 if you set it to 1 as the second parameter... Thanks Gerry On 1/24/07, Richard Lynch [EMAIL PROTECTED] wrote: On Wed, January 24, 2007 12:08 am, Gerry Danen wrote: One other possibility is to see what happens

[PHP] Removing special chars

2006-04-25 Thread Gerry Danen
I would like to replace all chars in a string that are not a-z or 0-9 with a space. I can use a series of str_replace functions, but there has to be a faster way. I know there is a solution but my chemo-brain is slowing me down today. Sorry... Any suggestions? TIA Gerry -- PHP General Mailing

Re: [PHP] Creating a Photo Album

2006-04-07 Thread Gerry Danen
Sure you can, Paul. See http://www.lily-gallery.com/h/showlily.php?id=53div=1 for an example. There are 5 thumbnails and they all link to photo.php to display the larger version. On 4/7/06, Paul Goepfert [EMAIL PROTECTED] wrote: Hi all, I am postilng pictures up on a website. So far I have a

Re: [PHP] microsoft PHP ?

2006-04-01 Thread Gerry Danen
Come on, you should have played along... ;-) Gerry On 4/1/06, Stut [EMAIL PROTECTED] wrote: Zouari Fourat wrote: here's the link http://phpro.org/articles/Microsoft-Purchases-Zend-for-$113-Million.html Seriously... consider the date. -Stut On 4/1/06, Stut [EMAIL PROTECTED] wrote:

Re: [PHP] microsoft PHP ?

2006-04-01 Thread Gerry Danen
On 4/1/06, Stut [EMAIL PROTECTED] wrote: Gerry Danen wrote: Come on, you should have played along... ;-) I'd had my fill by the time that arrived. It seems to me that people go overboard now. Slashdot used to have one a year, and it was always something that was vaguely possible, this year

Re: [PHP] microsoft PHP ?

2006-04-01 Thread Gerry Danen
On 4/1/06, Stut [EMAIL PROTECTED] wrote: Here's assuming that was a joke so I won't get into the factual errors. I wonder how Zend and the other core developers will feel about being referred to as an unorganized bunch of hobbyists. Now that is slander we don't need. Group hug with the Zend

Fwd: [PHP] private $foo

2006-03-29 Thread Gerry Danen
On 3/29/06, Philip Thompson [EMAIL PROTECTED] wrote: People have been programming since the 70's?!!?!! I didn't think it was possible until the early 90's! Wow I must be young! ;) What do you mean '70's? LOL How about Grace Murray Hopper? http://www.jamesshuggins.com/h/tek1/grace_hopper.htm

Re: [PHP] setcookie security concerns

2006-03-14 Thread Gerry Danen
Which someone could do this, is another question I have. The user? He's do something to his own computer, no? Gerry On 3/14/06, tedd [EMAIL PROTECTED] wrote: Hi: I've been using a php style switcher allowing users to change css. The code follows: Within the head tags. link

Re: [PHP] Is this password protection script secure?

2006-03-14 Thread Gerry Danen
On 3/14/06, IG [EMAIL PROTECTED] wrote: Hello. I got a password protected login script of t'internet a while back and have implemented it. I just want to make sure it is secure. I am aware that the password is stored directly in the database and I don't think this is a good thing. If the

[PHP] Displaying documents stored under web root

2006-03-10 Thread Gerry Danen
Adrian, I use something like this: ?php if ( $is_member) // global var set during login { include(/home/belowdocroot/project_a/memberprofile.php); // or whatever your page is } else { echo Sorry, members only. Please login or register.; header(location:/members/login.php ); } HTH

Re: [PHP] session handling

2006-03-09 Thread Gerry Danen
$ID is not a global, but $_SESSION[ID] would be... Gerry http://groups.yahoo.com/group/php_and_mysql/ On 3/9/06, suresh kumar [EMAIL PROTECTED] wrote: i am having one problem in session handling. I am having 2 files,login page and hame page. when user enterd user name and password in login

Re: [PHP] Re: Incremental Date Based ID

2006-03-07 Thread Gerry Danen
Kevin, You can do it with a Unix timestamp, but that would just confuse the issue. Have you considered using two fields instead of one? An article ID and and article sub-ID would be retrieved as article ID = date, and all sub-ID's descending. The first record in the list would contain the

Re: [PHP] Re: Incremental Date Based ID

2006-03-07 Thread Gerry Danen
Should have read the whole thread first, I guess... :) Gerry http://groups.yahoo.com/group/php_and_mysql/ On 3/7/06, Shaunak Kashyap [EMAIL PROTECTED] wrote: A possible solution: Make a composite primary key where the first field is the date and the second field would be of type enumeration

Re: [PHP] PHP upgrade on Go Daddy virtual server

2006-02-26 Thread Gerry Danen
Have you tried GoDaddy support? On 2/25/06, Nicolas Verhaeghe [EMAIL PROTECTED] wrote: Has anybody heard (or done it himself) how to upgrade PHP on a Go Daddy virtual server? Current version is 4.3.11 and I'd like to upgrade to 5.1.2. All I know is that this server is a Red Hat Fedora 2.

Re: [PHP] HN CAPTCHA at http://www.phpclasses.org

2006-02-19 Thread Gerry Danen
You got me. Where are you hiding it? Gerry On 2/19/06, tedd [EMAIL PROTECTED] wrote: Manuel: A good CAPTCHA must be fuzzy. If you know other fuzzy CAPTCHA besides these, it may help to sharing that knowledge. Try this: http://xn--ovg.com/no_bot The point of CAPTCHA is to provide

Re: [PHP] HN CAPTCHA at http://www.phpclasses.org

2006-02-19 Thread Gerry Danen
How would a bot find it though? On 2/19/06, comex [EMAIL PROTECTED] wrote: You got me. Where are you hiding it? In test.js: http://www.xn--ovg.com/no_bot/rpc.php?action=one Unless you hide it in a different place each time, how useful is that? -- PHP General Mailing List

Re: [PHP] ! in front of a variable?

2006-02-18 Thread Gerry Danen
! reverses a true/false input. I use it to flip a setting on or off. Gerry On 2/17/06, Jeff [EMAIL PROTECTED] wrote: Hey all, I've got some code from someone else I've inherited and need to sort out some problems with. The programmer that wrote it originally was much better than I and

Re: [PHP] Saving a BLOB image to a file (SOLVED)

2006-02-17 Thread Gerry Danen
On 2/16/06, tedd [EMAIL PROTECTED] wrote: However, after given it some thought, I would imagine that one could get a unique generated string, create a file with that string, give the file the correct permissions, then pull the image from the dB and save, do image processing, and then reload

Re: [PHP] Saving a BLOB image to a file (SOLVED)

2006-02-16 Thread Gerry Danen
What if several users try to access a different picture at the same time? Won't that render the wrong image for some? Gerry On 2/16/06, tedd [EMAIL PROTECTED] wrote: Hi gang: In a previous post (i.e., [PHP] Strange response to MySQL query) I was trying to save a BLOB as a file, namely using

Re: [PHP] Finding out DPI using GD

2006-02-15 Thread Gerry Danen
Isn't DPI a function of the output device? Has nothing to do with the image, it just has x pixels by y pixels... On 2/15/06, Kim Christensen [EMAIL PROTECTED] wrote: On 2/15/06, Karuna [EMAIL PROTECTED] wrote: Thanks. I might give the new versions a try :) IIRC, I think the unix exif

Re: [PHP] Onclick event and PHP function

2006-02-15 Thread Gerry Danen
Alain, have you tried cookies? On http://www.lily-gallery.com/ you will see 2 colored dots (bottom left) that allows for alternate page colors. Once a user chooses one, I remember his choice with a cookie. I use the cookie to control a style sheet. Gerry On 2/15/06, Alain Roger [EMAIL

Re: [PHP] Onclick event and PHP function

2006-02-15 Thread Gerry Danen
Pretty much the same technique I am using, tedd. I may have even used your example as inspiration... :) At the top of each page, I use $currentstylecolor = isset( $_COOKIE['currentstyle'] ) ? $_COOKIE['currentstyle'] : brown; // brown = default style $currentstyle = /skins/style_ .

Re: [PHP] image location hiding techniques

2006-02-09 Thread Gerry Danen
I am attempting to call a script that actually renders the image and then check for a session variable. However, the session variable does not seem to be there... ?php $fn = $_GET['id']; // filename $p = $_GET['p']; // path $img = /srv/pix/ . $p . / . $fn ; // where the photos are + path +

Re: [PHP] How to output multiple tables nicely(!) from PHP in Excel format?

2006-02-08 Thread Gerry Danen
Oli, Looks interesting enough to play with. The page mentions look at the code yet I cannot find the code. Is it available? Gerry On 2/8/06, Oli Howson [EMAIL PROTECTED] wrote: The example given outputs to two tabs, sheeta and sheetb Quoting Olaf Greve [EMAIL PROTECTED]: Hi all, I've

Re: [PHP] php.ini version changed, code broke

2006-02-08 Thread Gerry Danen
You should use $_POST... On 2/8/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello all from a newbie. We have a Nitix server (from Net Integration Technologies, Inc.) that hosts various web site. Recently they released a software upgrade, and in the release notes was this warning: A

Re: [PHP] Submitting form without JavaScript

2006-02-06 Thread Gerry Danen
You should talk to your provider. PayPal does not leave anything legible on my html page, just an encrypted string. Once you end up on PayPal's secure page, the email address is visible. I use a special account, just for that purpose. I'm afraid your provider dictates your solution... Gerry On

Re: [PHP] system('bell'); ?

2006-02-04 Thread Gerry Danen
bell is his C program... :) Outputs an ascii 7 (bell) at the machine where it runs. It basically outputs a character to stdout or stderr. He probably has that machine next to his cash drawer... Gerry On 2/4/06, tedd [EMAIL PROTECTED] wrote: I simple wrote a small C program that basically

Re: [PHP] Include after image or a way to reset header

2006-02-03 Thread Gerry Danen
Call the image rendering from another page and then let that page continue: caller.php: if ( $is_logged_in ) { echo p align=\center\img border=0 src='showimage.php?id=$get_picp=$from' alt=\Photo name: $get_pic\/p; if ( $get_name != ) echo p align=\center\$get_name/p; } showimage.php: ?php

Re: [PHP] Hide email addresses from spam bots

2006-02-02 Thread Gerry Danen
tedd, I don't find your implementation hard to read. There are implementations where zeros and Ohs are used and it typically takes several tries to get it right. http://www.nals2007.org/ shows how I just captured a single image and then hid the email address. I'd like to see a spambot reap that

Re: [PHP] How to get a network drive name

2006-02-02 Thread Gerry Danen
Please define network drive name. There are drive letters, volume labels and share names. What exactly are you looking for? Gerry On 2/2/06, Ibrahima TALL [EMAIL PROTECTED] wrote: Hi everybody ! I would need a help in php or a portable javascript solution (for several browsers). My

[PHP] Hide email addresses from spam bots

2006-02-01 Thread Gerry Danen
A user of mine insists that her email address shows on a web page. I need to protect that address from spam bots. There are lots of solutions around that I have come acros. I am looking for a clean, reusable, non-javascript solution. Any help is appreciated. Gerry -- PHP General Mailing List

Re: [PHP] Collecting info about columns in a table

2006-01-29 Thread Gerry Danen
I think Afan means they are values in an enum field. But I may be mistaken... :) Gerry On 1/29/06, tedd [EMAIL PROTECTED] wrote: Hi to all, I need to collect info about columns from a selected table. I use this: $result = mysql_query(SELECT * FROM . $TableName); $fields =

Re: [PHP] Collecting info about columns in a table

2006-01-29 Thread Gerry Danen
Afan, Here's some code that will show enum values: $q2 = describe . $tname . ;; $r2 = mysql_query($q2) or die(mysql_error()); while ( $a2 = mysql_fetch_array($r2) ) { $els = count($a2); echo br; for ($i2 = 0; $i2 $els; $i2++) { $f = $a2[$i2] ;

Re: [PHP] PHP / Apache + Error 500

2006-01-25 Thread Gerry Danen
Interestingly, I installed mod_security the other day and noticed error 500 show up. As it turns out, mod_security generates those when they block nasties. Gerry On 1/25/06, Thomas [EMAIL PROTECTED] wrote: Hi there! I am sitting with something of a mystery and was wondering if there is

Re: [PHP] Re: security of uploaded gif files

2006-01-23 Thread Gerry Danen
There's a couple of things a person can do. 1. check for .gif extention 2. see if exif_imagetype() returns type IMAGETYPE_GIF 3. see if getimagesize() returns reasonable values and not FALSE 4. check the file content for binary vs text content Gerry -- PHP General Mailing List

Re: [PHP] Adventures in Cookies

2006-01-23 Thread Gerry Danen
After some googling, it's a browser thing, not a php thing, as Austin pointed out. There are just rules (well, suggestions maybe) to be aware of. Are we flogging a dead horse here? On 1/23/06, tedd [EMAIL PROTECTED] wrote: Austin Denyer wrote: This is a function of the way cookies work, and

Re: [PHP] Str to Int

2006-01-20 Thread Gerry Danen
You probably want to do an is_int() first... After that, you know it's an int and treat it that way. Why do you need to typecast it? BTW, change $cardID = $HTTP_GET_VARS[cardID]; to $cardID = $_GET['cardID']; for PHP5 compatibility... ;-) Gerry On 1/20/06, Ron Eggler (Paykiosks) [EMAIL

[PHP] PHP mail form spam checking

2006-01-19 Thread Gerry Danen
A couple of days ago somebody posted a message with a routine to check input fields for potential spam/hacking. I believe it was on this list, but not sure. Of course I can't find that message any more... Could the original poster, please repost? Thanks. Gerry -- PHP General Mailing List

Re: [PHP] generate database driven web pages

2006-01-17 Thread Gerry Danen
Bing, I think I have implemented at http://www.arls-lilies.org/h/board.php what you are looking for. If so, let me know. On 1/17/06, Bing Du [EMAIL PROTECTED] wrote: Hello everyone, Here is what I want to accomplish. Query the backend database and generate a page listing all the staff

Re: [PHP] test variable value?

2006-01-11 Thread Gerry Danen
On 1/11/06, M. Sokolewicz [EMAIL PROTECTED] wrote: remember though that if(!$x) { echo 'nothing here'; } will also output 'nothing here' when provided with the string '0'! That's because (!$x) means ($x == false) and '0' is false... Gerry

Re: [PHP] Floating numbers truncating to two digits without rounding

2006-01-10 Thread Gerry Danen
] wrote: Can I do this all with sprintf or do I then need to convert it to a string and chop off what I don't want? -Original Message- From: Gerry Danen [mailto:[EMAIL PROTECTED] Sent: Monday, January 09, 2006 3:35 PM To: php-general@lists.php.net Subject: Re: [PHP] Floating numbers

Re: [PHP] include() problem

2006-01-09 Thread Gerry Danen
Here's a snippet of what's at the start of most of my php files: $pagetitle = Lily Articles; $pagefname = __FILE__; // for later logging $pagedocroot = $_SERVER['DOCUMENT_ROOT']; require_once ($pagedocroot/include_db/db_connect.php); require_once ($pagedocroot/include/funcs.php); Hope that

Re: [PHP] Floating numbers truncating to two digits without rounding

2006-01-09 Thread Gerry Danen
Mark, Why not use sprintf() with an arbitrary large number of decimals and then discard all but the 2 you want. I.e., format with 10 decimals and then drop the last 8. On 1/9/06, Mark Steudel [EMAIL PROTECTED] wrote: I am calculating things like tax and want to format them so they only have 2

Re: [PHP] PHP4 vs PHP5

2006-01-07 Thread Gerry Danen
] wrote: This one time, at band camp, Gerry Danen [EMAIL PROTECTED] wrote: I'm wondering if $_SERVER['HTTP_REFERER'] is no longer supported, or perhaps has a new name? still there, same name. print_r($_SERVER); Kevin -- Democracy is two wolves and a lamb voting on what to have for lunch

Re: [PHP] PHP4 vs PHP5

2006-01-07 Thread Gerry Danen
On 1/7/06, Kevin Waterson [EMAIL PROTECTED] wrote: This one time, at band camp, Gerry Danen [EMAIL PROTECTED] wrote: I'm wondering if $_SERVER['HTTP_REFERER'] is no longer supported, or perhaps has a new name? still there, same name. print_r($_SERVER); Ah, yes. It's there when

[PHP] PHP4 vs PHP5

2006-01-06 Thread Gerry Danen
I'm wondering if $_SERVER['HTTP_REFERER'] is no longer supported, or perhaps has a new name? TIA Gerry