[PHP] More thoughts about PHP: Taglibs

2001-09-10 Thread Dr. Evil
It seems to me that one of the problems with PHP is that you have to include code in your HTML pages. Even with the cleanest design, you end up with HTML that looks like this: html Hello, ?php showusername(); ?. Your last login was ?php showlastlogin(); ?.p /html This is ok, but it seems to

[PHP] Using mcrypt in PHP

2001-08-19 Thread Dr. Evil
There seems to be no reliable information in the manual about how to do this. I'm trying to use mcrypt 2.4 with php4.06, which should be a compatible combination. So far, I have gotten it to work like this: $cypher = MCRYPT_RIJNDAEL_128; $encrypted = mcrypt_encrypt($cypher, $key, $plaintext,

Re: [PHP] SSL encryption type in PHP?

2001-08-08 Thread Dr. Evil
You can tell it using the variables from the server. Using Apache you can access the variables specs at: http://www.apache-ssl.org/docs.html With Apache SSL is SSL_CIPHER returns the variable about SSL/TLS ciphersuite. Do you know how I would access that variable from PHP? Is that

[PHP] SSL encryption type in PHP?

2001-08-06 Thread Dr. Evil
Is there a function in PHP which can tell me the encryption strength being used by the browser? I want to be able to put a little message on the page saying, You are using strong encryption or Warning: you should upgrade your browser to one which supports 128bit crypto. Thanks -- PHP General

[PHP] Making graphs from within PHP?

2001-07-30 Thread Dr. Evil
I have a PHP application, and I need to display some dynamic data as a simple line graph (a gif or png). Is there a simple way to do this? Maybe something I can compile in to PHP? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For

[PHP] Credit card number checker?

2001-07-16 Thread Dr. Evil
I know that credit cards have standard formats: There's a standard number of digits, and whether the card is Visa, MC, Amex, etc is encoded in the number, and there is some kind of checksum, and I think the expiration is also encoded in the number. All of this is obvious stuff that anyone

[PHP] Updated credit card number checker

2001-07-16 Thread Dr. Evil
written # for Visual Basic, on which Allen Browne and Rico Zschau assisted. # Neil Fraser helped prune down the OnlyNumericSolution() for Perl. // modified by Dr. Evil to handle a bunch of other card types function getcctype($Number) { # 1) Get rid of spaces and non-numeric characters

[PHP] Strong typing?

2001-07-12 Thread Dr. Evil
PHP is a great language. It makes it fast and easy to create web pages. However, one feature which is critical for doing rock-solid stable websites is strong typing. The reason for this is that you're dealing with untrusted user input. Strong typing helps because if you are expecting an INT,

Re: [PHP] Strong typing?

2001-07-12 Thread Dr. Evil
U... you could write a fuction like function CheckInputAgainstRE( $val, $re ) { if ( ! ereg( $re, $val ) ) { ( ... some kind of code that writes out an error message and dies ... ) } return $val; } That's what I've done. I have a huge file full of

[PHP] The need for strong typing...

2001-07-12 Thread Dr. Evil
As you know, gases such as oxygen and acetylene are distributed to welders in pressurized containers. As you can guess, it is very important to put the right stuff in the right container. Let's say you have a container of acetylene, and you accidentally top it up with some pure oxygen. This

Re: [PHP] The need for strong typing...

2001-07-12 Thread Dr. Evil
The one problem with all your musings is that there is no such thing as an integer when it comes to transferring data over http. Everything comes as a string. What is done with these strings when they get to the application is what matters. It's not like there is an HTML form element like

Re: [PHP] The need for strong typing...

2001-07-12 Thread Dr. Evil
I was going to write a whole diatribe, venting rage, trying to prove you wrong etc, etc... and then I got to the last paragraph and realised we probably actually agreed: Yes, I think so too. Different languages for different things. Even COBOL has a valid reason for existing. In fact, most