php-general Digest 12 Oct 2007 03:21:17 - Issue 5068
Topics (messages 263107 through 263130):
Re: Filter input
263107 by: Manuel Vacelet
Re: Classes - Dumb question
263108 by: Jay Blanchard
Re: FileZilla Password Decoder --- $i think therefore $i am
263109 by: Amos
tedd wrote:
At 3:27 PM +0200 10/10/07, Per Jessen wrote:
Colin Guthrie wrote:
What do you think of this?
http://webbytedd.com/b/timed-php/
It's a combination of using both ajax and php together.
I'd say overkill for the end result (could be done in plain
Javascript without any Ajax
Hello Everyone,
I have the source code of a php application I got from someone but it is
encoded with IonCude.
I would really appreciate if someone can send me any solution for that.
Thank you,
Javed
From: [EMAIL PROTECTED]
Date: Thu, 11 Oct 2007 08:40:22 +0200
To:
Hi all,
I repeat the mantra 'filter input, escape output' every day before
writing any line of code.
About filter input I use to develop my own filter but I don't like
this solution as it's error prone (my regexp may be wrong, I don't
like to re-invent the wheel that much, ...).
I'd like to know
Howdy fellas,
okay, this is really (!) embarassing, but I have to ask:
Why would I want to use classes in PHP?
I have been using PHP for years now and writing the normal functions all
the time. I have never even bothered working with classes, but now I would
love to know what makes the
[snip]
What I was really illustrating is how interfaces are syntactic
sugar only. In my above example what I've really shown is an
implicit interface :) Since OOP is largely meant to model real
world things, ask yourself this... when a doctor sews a pig's
heart into a human, do you think there's
[snip]
I have the source code of a php application I got from someone but it is
encoded with IonCude.
I would really appreciate if someone can send me any solution for that.
[/snip]
Please do not hijack threads. If you have a new subject create a new
e-mail with said subject. This helps to
hi guys.
We've got a local system (PHP intranet) and we need to connect to a live
mySQL server get some of the tables (contents) and overwrite the same
tables in the local mySQL database. This needs to be done with PHP.
Im wondering the best to do this.
Is it to get all the information
[snip]
okay, this is really (!) embarassing, but I have to ask:
Why would I want to use classes in PHP?
I have been using PHP for years now and writing the normal functions all
the time. I have never even bothered working with classes, but now I would
love to know what makes the classes so
[snip]
We've got a local system (PHP intranet) and we need to connect to a live
mySQL server get some of the tables (contents) and overwrite the same
tables in the local mySQL database. This needs to be done with PHP.
Im wondering the best to do this.
Is it to get all the information into
Good Morning everyone,
This week, I switched from FileZilla 2 to FileZilla 3, and much to my
dismay the import function doesn't import the local and remote folders
properly.
Looking at the FZ2 and FZ3 XML files, it appears that it would be a
simple task to write a converter that does. I
thanks
thought there was something simpler
Jay Blanchard wrote:
[snip]
We've got a local system (PHP intranet) and we need to connect to a live
mySQL server get some of the tables (contents) and overwrite the same
tables in the local mySQL database. This needs to be done with PHP.
Im
On Thu, 2007-10-11 at 07:19 -0500, Jay Blanchard wrote:
[snip]
What I was really illustrating is how interfaces are syntactic
sugar only. In my above example what I've really shown is an
implicit interface :) Since OOP is largely meant to model real
world things, ask yourself this... when a
At 8:40 AM +0200 10/11/07, Per Jessen wrote:
tedd wrote:
At 3:27 PM +0200 10/10/07, Per Jessen wrote:
Colin Guthrie wrote:
What do you think of this?
http://webbytedd.com/b/timed-php/
It's a combination of using both ajax and php together.
I'd say overkill for the end result
On Thu, 2007-10-11 at 12:06 +, Javed Khan wrote:
Hello Everyone,
I have the source code of a php application I got from someone but it is
encoded with IonCude.
I would really appreciate if someone can send me any solution for that.
There's a reason it's encoded with IonCube. Someone
Amos Vryhof wrote:
Good Morning everyone,
def DecodePassword( strPass):
Decode a filezilla password
strKey = FILEZILLA1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ
nPassLen = len(strPass) / 3
nOffset = nPassLen % len(strKey)
strDecodedPass =
for i in
On Thu, 2007-10-11 at 07:36 -0500, Jay Blanchard wrote:
[snip]
okay, this is really (!) embarassing, but I have to ask:
Why would I want to use classes in PHP?
I have been using PHP for years now and writing the normal functions all
the time. I have never even bothered working with
On Oct 11, 2007, at 8:36 AM, Jay Blanchard wrote:
[snip]
okay, this is really (!) embarassing, but I have to ask:
Why would I want to use classes in PHP?
I have been using PHP for years now and writing the normal
functions all
the time. I have never even bothered working with classes, but
On 10/11/07, Javed Khan [EMAIL PROTECTED] wrote:
Hello Everyone,
I have the source code of a php application I got from someone but it is
encoded with IonCude.
I would really appreciate if someone can send me any solution for that.
Thank you,
Javed
From: [EMAIL PROTECTED]
Date: Thu,
On 10/11/07, Robert Cummings [EMAIL PROTECTED] wrote:
On Thu, 2007-10-11 at 07:19 -0500, Jay Blanchard wrote:
[snip]
What I was really illustrating is how interfaces are syntactic
sugar only. In my above example what I've really shown is an
implicit interface :) Since OOP is largely
On 10/11/07, tedd [EMAIL PROTECTED] wrote:
At 4:18 PM -0600 10/10/07, [EMAIL PROTECTED] wrote:
I disagree. I will need to see an example where the round() is
inaccurate.
You may disagree if you wish, but the php function round() is
inaccurate by definition -- all *rounding* algorithms are
At 4:18 PM -0600 10/10/07, [EMAIL PROTECTED] wrote:
I disagree. I will need to see an example where the round() is inaccurate.
You may disagree if you wish, but the php function round() is
inaccurate by definition -- all *rounding* algorithms are inaccurate.
My claim is the there are more
Manuel Vacelet wrote:
Hi all,
I repeat the mantra 'filter input, escape output' every day before
writing any line of code.
About filter input I use to develop my own filter but I don't like
this solution as it's error prone (my regexp may be wrong, I don't
like to re-invent the wheel that much,
tedd wrote:
For example: If you have a process that is taking time server-side and
want to let the user know in real time what the progress is, this is
one way to do it. That's not something (by definition) you can do with
javascript alone, right?
Correct, but it doesn't require any ajax
On 10/11/07, Jim Lucas [EMAIL PROTECTED] wrote:
What are you wanting to validate?
Do you want a package/class/function set that when called will validate
different types of input?
Email, string, int, etc...
Basically yes.
I want to validate:
- type: (string, int, float, ..)
-
Thanks!
That Helped Immensely. the final function is below (with a little
documentation)... I'll post my final converter somewhere soon... it's
done, and works.
// Decodes a FileZilla 2 password
function DecodePassword($strPass) {
// The Encryption Salt for FileZilla 2 Passwords
[snip]
Not trying to hijack the thread... Hopefully this is related enough,
if not I apologize. Would a good use of a class be to write a generic
database connection script? and then feed in the different variables,
such as customer login, database, stuff like that?
something like class
From this article
http://blogs.iis.net/bills/archive/2007/05/07/iis-vs-apache.aspx written in
May of this year, the author makes this comment about IIS and PHP:
[snippet]
If you're worried about IIS performance and reliability when running PHP
vs. running on Apache, you're concerns are
Is there a good way to detect in a script if it's called locally from
command line, or via a remote browser?
Anders.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 10/11/07, Anders Norrbring [EMAIL PROTECTED] wrote:
Is there a good way to detect in a script if it's called locally from
command line, or via a remote browser?
Anders
maybe not the best, but works for linux:
?php
if(isset($_SERVER['SHELL'])) {
echo 'cli script' . PHP_EOL;
} else {
On 10/11/07, Marcus Mueller [EMAIL PROTECTED] wrote:
Anders Norrbring wrote:
Is there a good way to detect in a script if it's called locally from
command line, or via a remote browser?
Check out http://www.php.net/manual/en/function.php-sapi-name.php.
much better:)
php echo
Anders Norrbring wrote:
Is there a good way to detect in a script if it's called locally from
command line, or via a remote browser?
Check out http://www.php.net/manual/en/function.php-sapi-name.php.
Greetings
m.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
I get correct results:
5.2.4 PHP_VERSION
round(5.555,2):5.56
toFixed(5.555,2):5.56
admin-214 wrote:
While we're entertaining algorithms, has anyone else noticed that
php's round() isn't the most accurate algorithm to round?
If you will refer to chafy's reply on 28-Feb-2007
On Thu, 2007-10-11 at 19:58 +0200, Anders Norrbring wrote:
Is there a good way to detect in a script if it's called locally from
command line, or via a remote browser?
I've always used
if( isset( $_SERVER['SERVER_PORT'] ) )
{
return 'web';
}
Cheers,
Rob.
--
Nathan Nobbe skrev:
On 10/11/07, *Marcus Mueller* [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
Anders Norrbring wrote:
Is there a good way to detect in a script if it's called locally from
command line, or via a remote browser?
Check out
well,
seems to be OS dependent:
PHP_OS:Linux (Suse 9.x 32bit) | PHP_VERSION:5.0.3
$t=1.255;
round($t,2):1.26
$t += .0001;
round($t,2):1.26
PHP_OS:WINNT (2000) | PHP_VERSION:5.2.4
$t=1.255;
round($t,2):1.25
$t += .0001;
round($t,2):1.26
--
View this message in context:
Hi all:
I'm not versed at all with Linux, and I need some help in configuring PHP
to allow me to use the dBase-related functions. From what I read in the help
files, it seems that I need to recompile PHP with the --enable-dbase command,
but I don't know how to do this.
Can someone
On 10/11/07, Jon Westcot [EMAIL PROTECTED] wrote:
Hi all:
I'm not versed at all with Linux, and I need some help in configuring
PHP to allow me to use the dBase-related functions. From what I read in the
help files, it seems that I need to recompile PHP with the --enable-dbase
command,
Hi Nathan:
I have no idea. Where would I look to find this out? Will phpinfo() give
me this? And, if so, where would I find it?
Jon
- Original Message -
From: Nathan Nobbe
To: Jon Westcot
Cc: PHP General
Sent: Thursday, October 11, 2007 5:00 PM
Subject: Re: [PHP] Need
On 10/11/07, Jon Westcot [EMAIL PROTECTED] wrote:
Hi Nathan:
I have no idea. Where would I look to find this out? Will phpinfo()
give me this? And, if so, where would I find it?
you might try
uname -a
from the command line; but theres no guarantee it will show the
distribution. it
I have tried this many way and for some reason
I cannot pull content between the 2 pattern options.
function pullchannel($document)
{
preg_match_all('/div class=channel [^]*(.*)div
class=channel [^]*/i',$document,$elements);
$match = implode(\r\n,$elements[0]);
$match
Hi again, Nathan:
I'm not certain how to get to a command line. The server is a shared
server provided by GoDaddy, if that's any help. They told me that I needed to
change something in the .htaccess file, but that didn't sound right at all.
Thanks again for your help.
Jon
On 10/11/07, Jon Westcot [EMAIL PROTECTED] wrote:
Hi again, Nathan:
I'm not certain how to get to a command line. The server is a shared
server provided by GoDaddy, if that's any help. They told me that I needed
to change something in the .htaccess file, but that didn't sound right at
Hi again:
Thanks for the info. From what I can see, GoDaddy does NOT provide access
to ssh. Any other thoughts? Or is there some way to tell me, in general
terms, how to configure PHP to allow the dbase functions to be used?
Jon
- Original Message -
From: Nathan Nobbe
To:
On 10/11/07, Jon Westcot [EMAIL PROTECTED] wrote:
Hi again:
Thanks for the info. From what I can see, GoDaddy does NOT provide
access to ssh. Any other thoughts? Or is there some way to tell me, in
general terms, how to configure PHP to allow the dbase functions to be used?
if
On 10/11/07, Nathan Nobbe [EMAIL PROTECTED] wrote:
On 10/11/07, Jon Westcot [EMAIL PROTECTED] wrote:
Hi again:
Thanks for the info. From what I can see, GoDaddy does NOT provide
access to ssh. Any other thoughts? Or is there some way to tell me, in
general terms, how to
well,
seems to be OS dependent:
PHP_OS:Linux (Suse 9.x 32bit) | PHP_VERSION:5.0.3
$t=1.255;
round($t,2):1.26
$t += .0001;
round($t,2):1.26
PHP_OS:WINNT (2000) | PHP_VERSION:5.2.4
$t=1.255;
round($t,2):1.25
$t += .0001;
round($t,2):1.26
--
View this message in
Dan wrote:
I need to retrieve a huge amount of data form a database and do so many
times. To eliminate the overhead of connecting to the database and
pulling down all that info over and over, I'm trying to pull it down
only once and stick it into a session. The problem is I get the first
[EMAIL PROTECTED] wrote:
I have tried this many way and for some reason
I cannot pull content between the 2 pattern options.
function pullchannel($document)
{
preg_match_all('/div class=channel [^]*(.*)div
class=channel [^]*/i',$document,$elements);
$match =
I have an educational web site.
I want to create an interface where my students can record their voices
client side and then save messages server side.
I thought Odeo would solve my problems. (The have their own problems
now.) Then I tried: MyChingo and Mobasoft. COme on $6,000 for a site
On Thursday 11 October 2007, Jay Blanchard wrote:
[snip]
okay, this is really (!) embarassing, but I have to ask:
Why would I want to use classes in PHP?
I have been using PHP for years now and writing the normal functions all
the time. I have never even bothered working with classes, but
51 matches
Mail list logo