php-general Digest 22 May 2005 01:26:23 -0000 Issue 3468
Topics (messages 215696 through 215709):
Re: Image Verification - Problems in Safari, Mac OS X
215696 by: Ryan A
215698 by: Marek Kilimajer
SMarty and commercial php (a little 0t)
215697 by: Ryan A
215699 by: Rory Browne
215700 by: Ryan A
215704 by: Rory Browne
SWF duration time
215701 by: Ahmed Abdel-Aliem
215707 by: Richard Lynch
215709 by: M Saleh EG
Re: ZEND Certification
215702 by: Martin Zvarik
215705 by: Rory Browne
Re: Strange comparison behaviour
215703 by: Martin Zvarik
Search problem
215706 by: virtualsoftware.gmail.com
test
215708 by: shimuqiheb.abchina.com
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
Hey,
used to have the same problem, solved it by having a random string in the
img calling part.
eg:
first have a function to generate a modest random string (I use 8 chars)
then in the image calling part call it something like this:
<img src='<?php echo $your_image_gets_called_here; ?>?<?php echo
$the_rand_string; ?>'>
as you can see above, its an over simplified version, but you can tune it as
you go along...works
everytime for me.
Cheers,
Ryan
On 5/21/2005 4:04:00 AM, Richard Lynch ([EMAIL PROTECTED]) wrote:
> On Thu, May 19, 2005 6:05 am, Rahul S. Johari said:
> > I did actually remove the Header which declared it as a Image/PNG and
> > everything seemed to work in both the browsers.
>
> Great. Now it works in 2 browsers, and breaks in 237.
>
> You MUST separate the two.
>
> Period.
>
> > Here's my situation though... I can't separate out these two files
> because
> > when a user is on the verification page, where the Image exists, in
> case
> > he
> > "reloads" or "refreshes" the page, a new image should be generated and
> > displayed, so that the verification code is different each time you
> reach
> > the verification page. If I was to keep the image code in a
> different
> > page,
> > the verification page will pick up the same PNG image and display the
> same
> > security code over and over without changing it.
>
> So you need some kind of "secret token" buried in the HTML which you can
> decode in the image and in their submit to see if they actually used
> human
> eyeballs to see the image.
>
> There are dozens of scripts out there that do this -- Perhaps you should
> review them to see how they work.
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.322 / Virus Database: 266.11.14 - Release Date: 5/20/2005
--- End Message ---
--- Begin Message ---
Richard Lynch wrote:
On Thu, May 19, 2005 6:05 am, Rahul S. Johari said:
I did actually remove the Header which declared it as a Image/PNG and
everything seemed to work in both the browsers.
Great. Now it works in 2 browsers, and breaks in 237.
You MUST separate the two.
Actualy he always did:
ImagePNG($im, "verify.png");
This saved the image, not output.
--- End Message ---
--- Begin Message ---
Hey,
This may belong more on the smarty list, but I thought i'll ask it here
because
in another way I need your opinion more than smarty advise.
Like a lot of people on this list, I use a templating system (Smarty and
another...
mostly Smarty) when I am working on a project for a client...
Reason: when he wants to make a design change..I dont kill him...or his
family :-)
Now I am faced with another situatation, I have been assigned a project
(working
freelance) to make a pretty simple piece of software which also includes 2
"admin panels"
(one for client and one for admin)
He wants to be able to "skin" the admin panel at will, which means, easiest
solution:
Template the sod.
I was wondering if its a good idea to template via smarty and include smarty
with my code?
also instructions to setup smarty when setting up the application i made?
Searching google I found this very nice place discussing PHP templating (you
might also want to
read up on how many there are!)
http://www.sitepoint.com/forums/showthread.php?t=123769&page=1&pp=25
but no discussion of including any of these with commercial software for the
client to setup and
their results.
Thanks,
Ryan
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.322 / Virus Database: 266.11.14 - Release Date: 5/20/2005
--- End Message ---
--- Begin Message ---
> I was wondering if its a good idea to template via smarty and include smarty
> with my code?
> also instructions to setup smarty when setting up the application i made?
Good idea compared to what? Compared to a different templating
library, compared to writing your own templating library, or compared
to having them download/install smarty themselves as a dependency?
> Searching google I found this very nice place discussing PHP templating (you
> might also want to read up on how many there are!)
> http://www.sitepoint.com/forums/showthread.php?t=123769&page=1&pp=25
> but no discussion of including any of these with commercial software for the
> client to setup and their results.
Smarty is licensed under the LGPL. I've never read the LGPL, but
TTBOMK that means you can use it in commercial/propriatory software,
which I'm assuming is what you're refering to.
>
> Thanks,
> Ryan
>
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.322 / Virus Database: 266.11.14 - Release Date: 5/20/2005
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Hey,
> > I was wondering if its a good idea to template via smarty and include
> smarty
> > with my code?
> > also instructions to setup smarty when setting up the application i
> made?
>
> Good idea compared to what? Compared to a different templating
> library, compared to writing your own templating library, or compared
> to having them download/install smarty themselves as a dependency?
Yep, left myself quite open there...should have been more specific.
I will not write a templating library myself because there are sooooo many
out there,
it would be a learning experience of course but other than that I think it
would be
rarely needed.
I meant bundling it along with the rest of the scripts, (which would add
around 500kb to the
size) and then giving instructions on how to do a basic configuration for
smarty.
> > Searching google I found this very nice place discussing PHP templating
> (you
> > might also want to read up on how many there are!)
> > http://www.sitepoint.com/forums/showthread.php?t=123769&page=1&pp=25
> > but no discussion of including any of these with commercial software for
> the
> > client to setup and their results.
>
> Smarty is licensed under the LGPL.
> I've never read the LGPL, but
> TTBOMK that means you can use it in commercial/propriatory software,
> which I'm
> assuming is what you're refering to.
Nope, sorry, I should have been more specific here too.
I meant what I said above...nobody has discussed what experience they have
had if they
bundled smarty along with their scripts and then told the client how to
configure smarty
or if the clients had any problem configuring smarty etc.
Cheers,
Ryan
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.322 / Virus Database: 266.11.14 - Release Date: 5/20/2005
--- End Message ---
--- Begin Message ---
> Yep, left myself quite open there...should have been more specific.
> I will not write a templating library myself because there are sooooo many
> out there,
> it would be a learning experience of course but other than that I think it
> would be
> rarely needed.
> I meant bundling it along with the rest of the scripts, (which would add
> around 500kb to the
> size) and then giving instructions on how to do a basic configuration for
> smarty.
I've never done it personally, but if this is for one specific client,
isn't 500k pretty much insignificant? If it's a problem though,
perhaps you could use a smaller template system, that maybe required
less configuration. Having that said, I've never used Smarty so I
don't know what configuration is involved. Perhaps an auto-config
script could be made?
>
>
>
> > > Searching google I found this very nice place discussing PHP templating
> > (you
> > > might also want to read up on how many there are!)
> > > http://www.sitepoint.com/forums/showthread.php?t=123769&page=1&pp=25
> > > but no discussion of including any of these with commercial software for
> > the
> > > client to setup and their results.
> >
> > Smarty is licensed under the LGPL.
> > I've never read the LGPL, but
> > TTBOMK that means you can use it in commercial/propriatory software,
> > which I'm
> > assuming is what you're refering to.
>
> Nope, sorry, I should have been more specific here too.
> I meant what I said above...nobody has discussed what experience they have
> had if they
> bundled smarty along with their scripts and then told the client how to
> configure smarty
> or if the clients had any problem configuring smarty etc.
>
> Cheers,
> Ryan
>
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.322 / Virus Database: 266.11.14 - Release Date: 5/20/2005
>
>
--- End Message ---
--- Begin Message ---
hi,
i have a question,
is there a function to detect SWF files play duration ??
any help would be appreciated
thanks,
--
Ahmed Abdel-Aliem
Web Developer
www.ApexScript.com
0101108551
registered Linux user number 382789
--- End Message ---
--- Begin Message ---
On Sat, May 21, 2005 10:18 am, Ahmed Abdel-Aliem said:
> is there a function to detect SWF files play duration ??
They all play forever.
Except the ones that crash my machine. Those last a few minutes, at best.
:-)
Including the one (not built by me) on my client's site that I have to
deal with every time he wants a change. :-( :-( :-(
Seriously, though, given that an SWF could easily have user interaction
and branching logic, how could one possibly even begin to computer "play
duration"?
You could maybe, for simple ones, dig into them and work out the twips
setting and number of frames and divide and get an estimate on what it
would be if it's a simple straight-line play-through animation, but you'd
be wrong more often than you were right, so why do that?
--
Like Music?
http://l-i-e.com/artists.htm
--- End Message ---
--- Begin Message ---
here are the steps for a logical playtime duration of an SWF movie.
The length/ duration of the movie is calculated by dividing the number of
frames by the frame rate speed.
Now that was the main time line... what about the other movies nesting
inside the _root and its successors?
run a tree calculation if possible and then just calculate the acumelative
duration. That's just one theory .. not even practical to force a huge
overhead on the clients web browser for such a think... or even the
serverside script and banging your server.
If you could give abit more details about what you want to do... and why
you need the duration for... it could be easier to answer rather than
general answers. HTH.
M.Saleh.E.G
Web Developer
Login Innovations U.A.E
97150-4779817
--- End Message ---
--- Begin Message ---
Ok, what should I expect from the certification then?
Was there any question you didn't expect or anything you didn't know?? If
yes, what was it?
It seems like not many people took it as I am reading some emails here...
like "How to get variable after the form is sent" etc...
I have looked at yellow pages, seems like you're not there either, Rory
Browne...
If many people here have taken it, can someone please answer my questions
above? Thank you!
Martin
-----Original Message-----
From: Rory Browne [mailto:[EMAIL PROTECTED]
Sent: Friday, May 20, 2005 1:31 PM
To: Martin Zvarik
Cc: [email protected]
Subject: Re: [PHP] ZEND Certification
On 5/20/05, Martin Zvarik <[EMAIL PROTECTED]> wrote:
> Hi,
>
> anyone has taken ZEND PHP Certification Exam???
Yes. Loads of people here have taken it. Loads of other people here
set the questions.
> Please can you give me some information about it?
I'm sure you'll get lots of useful and encourageing information about
it. In the meantime you might want to search the archives.
>
> Thank you,
>
> Martin
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
On 5/21/05, Martin Zvarik <[EMAIL PROTECTED]> wrote:
> Ok, what should I expect from the certification then?
> Was there any question you didn't expect or anything you didn't know?? If
> yes, what was it?
>
> It seems like not many people took it as I am reading some emails here...
> like "How to get variable after the form is sent" etc...
There are new users on this list, but there are also some very
experienced programmers here. You'll note that questions such as "How
to get variable after the form is sent", as well as much more
complicated questions are usually answered here.
All quoting the above sentence indicates is that not everyone here is
experienced. Everyone has to start somewhere, and this list encourages
learning, as well as black-voodoo-magic-trick swapping.
>
> I have looked at yellow pages, seems like you're not there either, Rory
> Browne...
That might have something to do with the fact that I've never done the
exam. However I'm well capable of dealing with forms and variables, as
well as pretty much almost anything else PHP related. I've also read
many threads here over time in which people outlined their opinions,
and offered help on the matter. Forgive me if this seems a bit
defensive, but I don't know what you're getting at.
> If many people here have taken it, can someone please answer my questions
> above? Thank you!
Your questions are very broad, so nobody can give more than generic
answers. Check out
http://marc.theaimsgroup.com/?l=php-general&w=2&r=1&s=zend+certification&q=b
for some answers in the archives.
>
> Martin
>
>
> -----Original Message-----
> From: Rory Browne [mailto:[EMAIL PROTECTED]
> Sent: Friday, May 20, 2005 1:31 PM
> To: Martin Zvarik
> Cc: [email protected]
> Subject: Re: [PHP] ZEND Certification
>
> On 5/20/05, Martin Zvarik <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > anyone has taken ZEND PHP Certification Exam???
> Yes. Loads of people here have taken it. Loads of other people here
> set the questions.
>
>
> > Please can you give me some information about it?
> I'm sure you'll get lots of useful and encourageing information about
> it. In the meantime you might want to search the archives.
>
> >
> > Thank you,
> >
> > Martin
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
--- End Message ---
--- Begin Message ---
String "info" is converted to integer, which is 0...
a)
if("info" == "0")
b)
if("info" === 0)
c)
if("info" == (string)0)
Or use strcmp()
Cya...
Read a book "PHP for beginners"
-----Original Message-----
From: Bogdan Stancescu [mailto:[EMAIL PROTECTED]
Sent: Friday, May 13, 2005 5:13 AM
To: [email protected]
Subject: [PHP] Re: Strange comparison behaviour
You probably mis-typed something:
[EMAIL PROTECTED] ~]$ php
<?
if ("info" == 0) echo "is 0\n"; else echo "not 0\n";
?>
Content-type: text/html
X-Powered-By: PHP/4.3.11
is 0
Cheers,
Bogdan
Erwin Kerk wrote:
> Hi All,
>
> Can anyone explain me why the following code:
>
> if ("info" == 0) echo "is 0\n"; else echo "not 0\n";
>
> Results in: not 0
>
>
> Whereas:
>
> if ("inf" == 0) echo "is 0\n"; else echo "not 0\n";
>
> Results in: is 0
>
>
>
> Notice the difference: info in the first sample, inf in the second sample.
>
>
> The used PHP version is PHP 4.1.2 (CLI version)
>
>
> Erwin Kerk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi,
I need to build up a search module for a shop. If I make a basic search
(product title for example) it is ok.
$query = "SELECT product_id FROM products WHERE title LIKE '%$title%'";
But i need an advance search for more than one field (title, description,
price, weight)
The problem is that i don't know which field is filled in by the user (title,
description, price or weight)
I mean, the user can fill in all fields, or only price field, or title and
weight etc
How can i do the search?
Thanks
--- End Message ---
--- Begin Message ---
≡∞∝∷∷?↑↓?⊙
[EMAIL PROTECTED]
Tel:)[EMAIL PROTECTED]
--- End Message ---