Re: [PHP] So many functions!

2003-04-02 Thread Matt Vos
Try $languages = array_keys($lang); This will create an array $languages = array("english","francais"); Matt - Original Message - From: Vincent M. <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 02, 2003 4:58 PM Subject: [PHP] So many functions! > Hello, > > There so

Re: [PHP] RSA implementation

2003-02-20 Thread Matt Vos
So forward the ports (80,443) to a box that u can run a webserver on, then you can user SSL. Matt - Original Message - From: José León Serna <[EMAIL PROTECTED]> To: Matt Vos <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, February 20, 2003 5:28 AM Subj

Re: [PHP] RSA implementation

2003-02-17 Thread Matt Vos
I don't care what you say, all you need is Secure-Socket-Layer contrary to what you may believe, you don't need a beefy server to implement it. I had apache+ssl+php+mysql running quite well on a 486 DX4/100 with 64MB ram. Decrypting is worse than you think. Anything you can decrypt, so can someone

Re: [PHP] RSA implementation

2003-02-12 Thread Matt Vos
Why not try this: Store the plaintext password in your DB, or hash with a permanent key (same key for all users) Send a well-salted key to the browser @ your login page, each time the user logs in Have the user enter the password, have javascript hash it and send it to you (if you're storing a has

Re: [PHP] download script

2003-01-21 Thread Matt Vos
Instead, find out exactly what headers it is that Getright sends. Store the resume point in $resume_bytecount Then, have your script do something like this: /** Send the appropriate HTML headers **/ /** Do this instead of the fpassthru **/ $filesize = size($filename); $fp = fopen('$filename','r');

Re: [PHP] Re: EOF: how to generate one in a string

2003-01-08 Thread Matt Vos
What is the ASCII value of an EOF? Find that and use Matt - Original Message - From: Jean-Christian Imbeault <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 08, 2003 5:24 AM Subject: [PHP] Re: EOF: how to generate one in a string > I'm at wits end ... I've tried eve

Re: [PHP] progress page

2003-01-06 Thread Matt Vos
Is bandwidth an issue? If not, you could have a at the top of your page, flush it before beginning your data parsing, and update it with a table with two columns, 1 with a bgcolor of some color, the other with no bgcolor, and have the width of the columns change as the javascript updates it. i.e

Re: [PHP] Continued story on : PHP includes without access to the default directory//Tom Rogers//

2002-12-30 Thread Matt Vos
Just use absolute paths. If your webserver is looking at the root directory, /index.phtml and index.phtml are the same file Matt - Original Message - From: WMB <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, December 30, 2002 12:03 PM Subject: [PHP] Continued story on : PHP inclu

Re: [PHP] readdir() output question

2002-12-13 Thread Matt Vos
$img_count = 0; echo(" My Images"): (loop through filenames) { if (($img_count % 5) == 0) echo(" "); echo(" "); $img_count = $img_count + 1; } while (($img_count % 5) != 0) { echo("  "); } echo(" ") Matt RClark <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EM

Re: [PHP] Automatic include of files containing functions

2002-12-11 Thread Matt Vos
To your first question, I'm sure it can only increase efficiency. To the second, think the other way around possibly... Within your script, do the following (or something along these lines): Pull a list of your includes directory into an array ($all_functions in my example) /** $file is the scrip

Re: [PHP] Flushing Output

2002-12-11 Thread Matt Vos
Try flush() Matt - Original Message - From: Richard Baskett <[EMAIL PROTECTED]> To: PHP General <[EMAIL PROTECTED]> Sent: Tuesday, December 10, 2002 7:27 PM Subject: [PHP] Flushing Output > Is there a way of flushing output to the browser. So for example, I have a > script that checks t

Re: [PHP] String to an Array

2002-12-06 Thread Matt Vos
A string is an array of characters. In your example, $str[4] == "h". Matt - Original Message - From: Rodrigo de Oliveira Costa <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 05, 2002 1:50 PM Subject: [PHP] String to an Array > Hi guys, I got a string that I need to

Re: [PHP] XML-RPC, is this the best approach for something like this?

2002-12-01 Thread Matt Vos
- Original Message - From: Jonathan Chum <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, December 01, 2002 3:27 PM Subject: [PHP] XML-RPC, is this the best approach for something like this? > Hi guys! > > I'm wrapping up a web hosting control panel written in PHP that fills up

Re: [PHP] Multidimensional arrays (more and more...)

2002-11-28 Thread Matt Vos
You don't need sequential numbers as your key. Take this example: /*** define some values ***/ $fruits['apple']['color']=$color; $fruits['apple']['diameter']=$x; $fruits['orange']['color']=$color; $fruits['orange']['diameter']=$x; $fruits['grape']['color']=$color; $fruits['grape']['diameter']=$x;

Re: [PHP] **** Converting dynamic webpages into static HTML pages

2002-11-27 Thread Matt Vos
p friendly. The other alternative is to have a script require() the php file, just set your variables in the script, then require('catalog.php'); All code will be executed as if it were part of the script. Matt - Original Message - From: Ron Stagg <[EMAIL PROTECTED]> To:

Re: [PHP] **** Converting dynamic webpages into static HTML pages

2002-11-27 Thread Matt Vos
Compile php as a static binary (CGI execution mode?) and add something liek the following to your code at the top: #!/usr/local/bin/php $arg_count = 1; while ($arg_count < count($argv)) { $argument = $argv[$arg_count]; $arg_split = split("=",$argument); $variable = trim($arg_split[0]);

Re: [PHP] Upload problem - PC, *nix, and Max EOL characters

2002-11-26 Thread Matt Vos
m - PC, *nix, and Max EOL characters > > Hi, > > Thanks for the reply. I appreciate your help. fgets() reads to the EOF; not the > EOL. Is there something similar to fgets() that I can use? Perhaps where I can > state explicity read the file until you encounter and EOL char? > &

Re: [PHP] Upload problem - PC, *nix, and Max EOL characters

2002-11-26 Thread Matt Vos
Loop an fgets() i.e. $fp = fopen($file) while ($filerow = fgets($fp,1024)) /* Read 1024 bytes or to EOL, whichever is first) */ { $filerow = str_replace("; ","", $filerow); $filerow = str_replace("# ","", $filerow); $filerow = str_replace("\r","", $filerow); $size = strlen($fil

Re: [PHP] decimal places

2002-11-26 Thread Matt Vos
As an addition to that, if you don't want the thousands separator to be ','; do the following: $amount = 1234.567 $fmt1 = number_format($amount,2); $fmt2 = number_format($amount,2,'.',''); echo("$fmt1\n$fmt2"); This will output: 1,234.56 1234.56 Matt - Original Message - From: Van Andel,

Re: [PHP] re-writing to the same socket

2002-11-26 Thread Matt Vos
This happens because the Resource ID is a pointer to the socket, not the socket itself. You are storing the value of the resource ID (i.e. '1') in the database. However, when you are pulling it out, you are pulling it out as an int, and not a socket identifier. Keep the socket identifier as a globa

Re: [PHP] FTP'ing with function

2002-11-25 Thread Matt Vos
Are you sure you are using the ASCII/Binary flag properly? Also, in your script, are you opening the file with fopen() then reading with fgets/fread to write to a file on the ftp? or are you using ftp_put()? I know if there is binary data in a file you are attempting to send ascii, it will truncat