Re: [PHP] how to time an http request

2002-09-19 Thread Petr Tomenendál

If you want a tool to test HTTP server responses, then i can recommend
Siege. You can specify number of simultaneous requests and 
URL/URLs to be tested. For more info look at: 
http://www.joedog.org/siege/index.shtml

P.


On Thu, 2002-09-19 at 01:12, Lee Doolan wrote:
 
 
 is there a program which i can run in a unix environment (FreeBSD or
 redhat) which can run, say, 100 requests on a url and then report the
 total time spent on the requests?  i know that i could run curl or
 wget in a loop, but i would have to account for the fork-exec time
 somehow.  i hope that the question is clear.
 
 
 -- 
 Flowers of morning glory.  +-+
 The sky above this street  |donate to causes I care about:   |
 Begins to overcast.|  http://svcs.affero.net/rm.php?r=leed_25|
--Sugita+-+
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Unserialize stopped working after php db upgrade

2002-09-19 Thread Martin Towell

If you've seen a serialised variable a few times, you get to know how one is
set up and how to interpret it. If you're using serialised variables, I'd
suggest serialising a few simple ones and see what the output looks like so
that you can see when things are going amiss.

This is one way that I debug things. Instead of var_dump()ing or
print_r()ing something, I'll echo serialize(...). It's more compact than
var_dump/print_r

Martin

-Original Message-
From: Geoff Caplan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 19, 2002 3:36 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Unserialize stopped working after php  db upgrade


Paul,

PN It looks like that string has been serialized multiple times

Many thanks - that is the problem! I think that this qualifies as one
of my more creative bugs...

Can I ask you how you spotted this? Pretty impressive, considering you
only had the string itself to go on.

Thanks again,

-- 
Geoff Caplan
Advantae Ltd

mailto:[EMAIL PROTECTED]
http://www.advantae.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Encrypting/Decrypting Data

2002-09-19 Thread [-^-!-%-


Hello.

How do you decrypt a data that's encrypted with crypt($data).

Now, the php documents says crypt() is a one-way crypting function, so
there is no decrypt() function. I was wondering if someone could shed some
light on alternative ways to encrypt  decrypt data.

I've looked at mcrypt_generic and mdecrypt_generic, but am confused by the
'resource td' parameter. Perhaps, someone can explain that as well.

Any help is greatly apprciated.

-john

=P e p i e  D e s i g n s=
 www.pepiedesigns.com
 Providing Solutions That Increase Productivity

 Web Developement. Database. Hosting. Multimedia.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Simultaneous system(),passthru()... commands. HELP PLEASE !!!

2002-09-19 Thread Jean-Marc Godart

Hello everyone,


I am using PHP with Windows XP. I am trying to have a .exe program (written and 
compiled in C) launched by my PHP script, using either system(), passthru()... That 
works great ... as long as I only have one request at a time. When I have two (or more 
request) at the same time (coming from different browser sessions), the execution of 
the .exe program seems to be aborted for all sessions as soon as it is finished for 
one of the sessions. Therefore only the first finishing session gets the good result, 
the other sessions keeping waiting for an output that will never come. 

The same problem arises if those are different .exe programs that are launched at the 
same time, for example program1.exe, program2.exe and program3.exe ; if program1.exe 
ends first, program2.exe and program3.exe get aborted ... How come ? How can I avoid 
that ? 

By advance, thank you for your help and comments ...

Best regards from Belgium,


Jean-Marc




[PHP] parallel connections with php

2002-09-19 Thread Jens

i programmed a metasearchengine with php - it works but it is to slow.

does someone know how to do parallel connections to searchengines ?

Let s say i have 4 php scripts - each script gets data from a
searchengine. I have included those 4 script in my  resutl html page
(via include..) - but i have the feeling that php includes the first
script (which connect to searchengine 1)  and after it got all
data it includes the second script - gets the data and include then
scritp 3..:::

Does someone know hot to connect those 4 scripts parallel to the
searchengines and not seriell?

greetings

Jens


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Return array from extension

2002-09-19 Thread Ole Stakemann

Hi

This is probably a stupid question, but I can't figure it out. I've 
been trying to search the PHP site for an answer without luck.

I want to return results in an array from an extension. The array may 
or may not be defined. The array may or may not contain values. The 
PHP function could be something like

function modarray($inoutarray)
{
if (!isset($inoutarray))
{
$inoutarray = array();
}
$inoutarray[] = newval1;
$inoutarray[] = newval2;
}

How do I do that in an extension? I want to adhere to the 
recommendation that allow_call_time_pass_reference should be off.

-Ole
-- 
__
Konsulentfirmaet Ole Stakemann ApS
Fortunvej 55
DK-2920  Charlottenlund
Denmark

e-mail: [EMAIL PROTECTED]
Phone: +45 39 64 10 68
Fax: +45 39 64 10 67

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Fw: [PHP-DEV] and so... there is a security problem.

2002-09-19 Thread Vergoz Michael \(SYSDOOR\)


- Original Message -
From: Vergoz Michael (SYSDOOR) [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 19, 2002 12:38 PM
Subject: [PHP-DEV] and so... there is a security problem.


Hi list,

i think that you have to return a _s64 per default, cuz for exemple i'm
using some identification coded on _s64 if i jump 21 474 836 47, intval()
will return to me a wrong number (normal) but i _can't_ know if that that
number is a valid _s64 (_s64) and there can have some big security problems

Exemple:

$id = intval($_GET['id']);
$query = 
SELECT
\proute\
FORM
\polom\
WHERE
id = $id
;

Best regards,
Vergoz Michael
SYSDOOR



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




php-general Digest 19 Sep 2002 11:01:14 -0000 Issue 1594

2002-09-19 Thread php-general-digest-help


php-general Digest 19 Sep 2002 11:01:14 - Issue 1594

Topics (messages 116803 through 116856):

How to approach a new project?
116803 by: Wm

Re: Join in MySQL-select doesn't work
116804 by: David Robley

mysql_query w/ JOIN results giving unexpected results w/ PHP (not regular SQL though)
116805 by: Thoenen, Peter  Mr.  EPS

Re: Loop through POST-result
116806 by: David Robley

how to time an http request
116807 by: Lee Doolan
116842 by: Jason Morehouse
116850 by: Petr Tomenendál

linux install error
116808 by: :B nerdy

Re: Sessions /Cross Domain
116809 by: Chris Shiflett

Re: header() and POST
116810 by: Chris Shiflett
116843 by: Chris Shiflett

Re: Date-format
116811 by: Support . Fourthrealm.com

Re: Need some help please.
116812 by: David Freeman
116834 by: Simon Angell
116849 by: David Freeman

use of mysql_free_result (was Re: [PHP] Efficiency)
116813 by: Support . Fourthrealm.com
116815 by: Chris Shiflett

Re: COOKIE Question.
116814 by: Tom Ray

reuse database connections
116816 by: Support . Fourthrealm.com
116817 by: Kumar Lakshminarayanan
116832 by: olinux

include_path? programmatically
116818 by: Christian Calloway
116819 by: Matt Wiseman

can you recommend PHP shopping cart
116820 by: Peter J. Schoenster
116822 by: olinux
116831 by: Nicole Lallande

SELECT dropdown from a db query?
116821 by: Andre Dubuc
116824 by: Sascha Cunz
116826 by: Andre Dubuc
116827 by: Jacob Miller
116829 by: Andre Dubuc

Re: Auto-increment value
116823 by: Faisal Abdullah

Weird problem with Windows XP and IE6
116825 by: Jason
116828 by: Jason

Re: Friend of function??
116830 by: Sascha Cunz

Re: numeric to word function
116833 by: Tom Rogers

Strange submission problem
116835 by: Jesse Lawrence
116836 by: Jacob Miller
116838 by: Jesse Lawrence

inheriting default constructor behavior?
116837 by: Monique Y. Herman
116841 by: Jason Morehouse

pardon the previous mis-topic
116839 by: Monique Y. Herman

compiling a regexp
116840 by: David T-G

redefining a function
116844 by: David T-G

Good OO PHP resources? Open Source APIs?
116845 by: Michael Zornek
116846 by: Manuel Lemos

New problem - preg_match?
116847 by: Chad Winger

Unserialize stopped working after php  db upgrade
116848 by: Geoff Caplan
116851 by: Martin Towell

Encrypting/Decrypting Data
116852 by: [-^-!-%-

Simultaneous system(),passthru()... commands. HELP PLEASE !!!
116853 by: Jean-Marc Godart

parallel connections with php
116854 by: Jens

Return array from extension
116855 by: Ole Stakemann

Re: [PHP-DEV] and so... there is a security problem.
116856 by: Vergoz Michael \(SYSDOOR\)

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]


--

---BeginMessage---

I'm trying to work out the best way to approach a new project, and would
appreciate any suggestions/beware ofs from the experienced PHPers out
there.  I want to build a project where I can enter data from a gym routine
online and generate graphs of the data.  I'm not familiar with GDLIB, but is
this something that can help generate a graph from mySQL data?  Is this
project feasible/realistic for a new PHP programmer?

Also, any suggestions on the structure of the mySQL database would be
appreciated.  The general data that would need to be input would be:

Date
Group
Exercise1
Ex1Weight
Ex1Reps
Ex2Weight
Ex2Reps
Ex3Weight
Ex3Reps
Exercise2
Ex1Weight
Ex1Reps
Ex2Weight
Ex2Reps
Ex3Weight
Ex3Reps
etc...

Plus several calculations would need to be made, which I could presumably do
with PHP when I extract the data.

Any/all suggestions on how to plan this process would be greatly
appreciated!  I'm hoping to have a sound game plan for beginning this
process.

Thanx!
Wm
luvs2shootAThotmailDOTcom





---End Message---
---BeginMessage---

In article [EMAIL PROTECTED], [EMAIL PROTECTED] 
says...
 Hello
 I'm using PHP4 and MySQL on Apache webserver.
 I have a table valled liste with names of some people, and a table 
 called postnummer with zip-codes and citynames.
 My select should join the adress and zip from one table with the 
 cityname from the other table.
 But my join-line does not work.   =:(
 
 My code results in this line:
 
 Warning: Supplied argument is not a valid MySQL result resource in 
 /var/www/html/find/resultat.php on line 27
 
 The code is:
 mysql_select_db(adresser);
 $query = (SELECT fornavn, efternavn, gade, postnummer.postnummer, 
 

[PHP] Messaging Solution Please Advice

2002-09-19 Thread karthikeyan

Hi All,

  I posted this question before but didn't get proper response may be I didn't explain 
it properly.

  This is what is our clients requirement.  Guide me through this as to how to 
accomplish this in PHP.

The first part that will need to have a direct interaction with SYSTEM
must be represented as a stand-alone PHP4 script. The task of this script
is upon external HTTP requests to grant access to contents and attributes of
mail messages within SYSTEM.

Input data for this script are:

Mandatory Temporal message ID in hashed form.

Code of command.
Optional Command specific argument.

Script must provide at least the following interface functions for every
message that is pointed at:

Code of command Description of command Command specific argument

1) Send a number of parts that multipart message comprises of (solid
   i.e. pure text message should be considered as formed by single part). 
   Not used.

2) Send value of message's specific property, for instance, sender
   address, credits of recipients, date and time of message's dispatch,
   subject of message, size of message etc. Number, encodes index for
   specific property of message.

3) Send value of specific property of specific part of multipart
   message, for example, recommended content's name, part's size, 
   part's description. Number, encodes index for specific property 
   of message's part.

4) Send contents of specific message's part. Number, defines an offset
   from which transfer should be started. 

5) Send value of specific property of «bearer» (full description for
   «bearer» is provided in the third part of this document). Number, 
   encodes index for specific property of «bearer».

6) Send «bearer»'s binary code. Number, defines an offset from which
   transfer should be started.

7) Send text of standard terms and conditions to be agreed by user.
   Number, defines an offset from which transfer should be started.



  Any help regarding this would be greatly appreciated.

karthikeyan.






[PHP] British Pound

2002-09-19 Thread karthikeyan

Hi all,

  How do i display British Pound through PHP.

  I can right now display Dollar Symbol but how do i display British Pound.

karthikeyan.



[PHP] about $_post

2002-09-19 Thread Meltem Demirkus

Hi,
I just want to learn if there is any differen between

$_POST[ID]   and  $_POST['ID']  ..If there is.. does it cause a
problem ?..

thanks

meltem


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] RE: How to approach a new project?

2002-09-19 Thread Tim Ward

first thing is get the data structure right - third normal 
form at least.

table1:
date
group

table2:
group
exercise
weight
reps

or something like that.
get the data model right and reports and input forms write 
themselves, get the structure wrong and everything becomes 
really difficult.

there's lots of stuff out there for graphs in gdlib using 
php (providing you've got it installed).

I think this is a pretty good sort of project to start with, 
but are you new to PHP or programming? If you're relatively 
new to programming then that will be the thing you need to
learn - not PHP.

Tim Ward
www.chessish.com



 -Original Message-
 From: Wm [mailto:[EMAIL PROTECTED]]
 Sent: 18 September 2002 23:25
 To: [EMAIL PROTECTED]
 Subject: How to approach a new project?
 
 
 I'm trying to work out the best way to approach a new 
 project, and would
 appreciate any suggestions/beware ofs from the experienced 
 PHPers out
 there.  I want to build a project where I can enter data from 
 a gym routine
 online and generate graphs of the data.  I'm not familiar 
 with GDLIB, but is
 this something that can help generate a graph from mySQL 
 data?  Is this
 project feasible/realistic for a new PHP programmer?
 
 Also, any suggestions on the structure of the mySQL database would be
 appreciated.  The general data that would need to be input would be:
 
 Date
 Group
 Exercise1
 Ex1Weight
 Ex1Reps
 Ex2Weight
 Ex2Reps
 Ex3Weight
 Ex3Reps
 Exercise2
 Ex1Weight
 Ex1Reps
 Ex2Weight
 Ex2Reps
 Ex3Weight
 Ex3Reps
 etc...
 
 Plus several calculations would need to be made, which I 
 could presumably do
 with PHP when I extract the data.
 
 Any/all suggestions on how to plan this process would be greatly
 appreciated!  I'm hoping to have a sound game plan for beginning this
 process.
 
 Thanx!
 Wm
 luvs2shootAThotmailDOTcom
 
 
 
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] British Pound

2002-09-19 Thread Richard Black

I assume you mean how do you display a British Pound in HTML

The escape 

pound;

Should do what you want.

HTH

Richy
==
Richard Black
Senior Developer, DataVisibility Ltd - http://www.datavisibility.com
Tel: 0141 951 3481
Email: [EMAIL PROTECTED] 

-Original Message-
From: karthikeyan [mailto:[EMAIL PROTECTED]] 
Sent: 19 September 2002 12:33
To: [EMAIL PROTECTED]
Subject: [PHP] British Pound


Hi all,

  How do i display British Pound through PHP.

  I can right now display Dollar Symbol but how do i display British
Pound.

karthikeyan.



This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] RE: use of mysql_free_result (was Re: [PHP] Efficiency)

2002-09-19 Thread Tim Ward

if your query is within a loop then it would probably help, e.g.

for ($i = 1; $i = 1000; $i++)
{   $result = mysql_query(...);
...
}

in this case as $result is a resource identifier then reusing
it doesn't release the original result.

Tim Ward
www.chessish.com


 -Original Message-
 From: Support @ Fourthrealm.com [mailto:[EMAIL PROTECTED]]
 Sent: 19 September 2002 01:18
 To: [EMAIL PROTECTED]
 Subject: use of mysql_free_result (was Re: [PHP] Efficiency)
 
 
 Rick, or anyone,
 
 Based on what you said below, can you describe for me when the 
 mysql_free_result tag should be used, and when it is not necessary?
 
 I'm fluent in other web languages (iHTML, ASP), but am fairly 
 new to PHP, 
 so I'm still learning the intricacies of the language, and 
 the best way to 
 use it
 
 Many thanks,
 Peter
 
 
 
 At 04:02 PM 9/18/2002 -0600, you wrote:
 If you aren't doing anything else in a script, 
 mysql_free_result is not needed
 in a script like this because the result set will be cleaned 
 up by PHP when
 the script ends.
 
 - - - - - - - - - - - - - - - - - - - - -
 Fourth Realm Solutions
 [EMAIL PROTECTED]
 http://www.fourthrealm.com
 Tel: 519-739-1652
 - - - - - - - - - - - - - - - - - - - - -
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] RE: redefining a function

2002-09-19 Thread Tim Ward

is using classes an option?


Tim Ward
www.chessish.com



 -Original Message-
 From: David T-G [mailto:[EMAIL PROTECTED]]
 Sent: 19 September 2002 04:54
 To: PHP General list
 Subject: redefining a function
 
 
 Hi, all --
 
 Is there any way to redefine or undefine (to then redefine) a 
 function?
 We have an image handling function, for instance, and would 
 like to let
 our users put in their own definition instead.  I haven't yet found
 anything that will allow this...
 
 
 TIA  HAND
 
 :-D
 -- 
 David T-G  * It's easier to fight for 
 one's principles
 (play) [EMAIL PROTECTED] * than to live up to them. -- 
 fortune cookie
 (work) [EMAIL PROTECTED]
 http://www.justpickone.org/davidtg/Shpx gur 
 Pbzzhavpngvbaf Qrprapl Npg!
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP Calendar

2002-09-19 Thread Rafic El-Hage

I have a PHP/mySQL calendar site and need to synchronize with my
Outlook calendar. Has anyone out there done anything similar?

Rafic



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] In a shared environment...

2002-09-19 Thread Bill Leonard

Hi all,

Relative newbie here, and I am just coming to grips with something that I
think is a very bad thing... Please tell me I am wrong.

When using PHP, it is the Apache user that actually performs things, and
therefore needs permissions. For example, if I want to write data to a file,
I have to chmod o+w the directory it's in to get that to happen.

The trouble with this, is a shared environment, doesn't this give anyone who
can use PHP on your system the ability to write over any other user's file
if they know the name of it? Am I missing something fundamental here?

Any help would be appreciated!

Bill


-- 
Bill Leonard   [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] British Pound

2002-09-19 Thread Justin French

here's an ASCI chart for future reference :)

http://www.main.org/no_index/clients/asci_codes.htm

I think pound; works too, but I'd be going for the ASCI number.

Justin


on 19/09/02 9:32 PM, karthikeyan ([EMAIL PROTECTED]) wrote:

 Hi all,
 
 How do i display British Pound through PHP.
 
 I can right now display Dollar Symbol but how do i display British Pound.
 
 karthikeyan.
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] about $_post

2002-09-19 Thread Cal Evans

Yes.

$_POST[ID]
Since there are no quotes around the variable name ID and no dollar sign in
front of it, PHP will look for a constant named ID and if one is not found
it will blow chow.

$_POST['ID']
Should work find, assuming a variable named ID came from your form. However,
I wouldn't get in the habit of writing my arrays like this.  It's confusing
to say the least.

=C=

*
* Cal Evans
* The Virtual CIO
* http://www.calevans.com
*


-Original Message-
From: Meltem Demirkus [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 19, 2002 6:35 AM
To: [EMAIL PROTECTED]
Subject: [PHP] about $_post


Hi,
I just want to learn if there is any differen between

$_POST[ID]   and  $_POST['ID']  ..If there is.. does it cause a
problem ?..

thanks

meltem


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] In a shared environment...

2002-09-19 Thread Leonid Mamtchenkov

Dear Bill Leonard,

Once you wrote about [PHP] In a shared environment...:
 Relative newbie here, and I am just coming to grips with something that I
 think is a very bad thing... Please tell me I am wrong.
 
 When using PHP, it is the Apache user that actually performs things, and
 therefore needs permissions. For example, if I want to write data to a file,
 I have to chmod o+w the directory it's in to get that to happen.

You can use PHP not only in combination with web server (like Apache),
but also as a standalone compiler/interpreter (/usr/bin/php).

 The trouble with this, is a shared environment, doesn't this give anyone who
 can use PHP on your system the ability to write over any other user's file
 if they know the name of it? Am I missing something fundamental here?

If you are using PHP as a standalone tool there is no problem with this.
On the other hand, if you do web development, then you do not usually
write to files.  You use database.  If there is something you absolutely
HAVE to write to file, then you can use /tmp directory for that
purposes.

-- 
Best regards,
  Leonid Mamtchenkov, RHCE
  System Administrator
  Francoudi  Stephanou Ltd.

BOFH: It's stuck in the Web.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] RE: Weird problem with Windows XP and IE6

2002-09-19 Thread Marek Kilimajer

I just tested it (with wrong password) and it worked.

Jason wrote:

As an adendum to this... my initial thoughts are that the forms are not
posting correctly in XP. I'm using the POST method.


Jason Cathcart
Check Out My Site: http://www.biohazardous.org
  -Original Message-
  From: Jason [mailto:[EMAIL PROTECTED]]
  Sent: September 18, 2002 7:50 PM
  To: Php-General
  Subject: Weird problem with Windows XP and IE6


  Hi...

  I've written a shopping cart program that is in use at www.dangeo.com and
I'm having a weird problem that has just been brought to my attention.

  As far as I can tell everything works perfectly fine with the shopping
cart in windows 98, and 2000. However the problem I'm having is that when
customers using XP get into the shopping cart they can't get past the screen
where they put in their address. I haven't been able to duplicate this
problem.

  What I'm hoping is that some of you might be able to take a look at it,
duplicate the problem, and give me some suggestions as to what the problem
is.


  Jason Cathcart
  Check Out My Site: http://www.biohazardous.org


  



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP Execution Timer

2002-09-19 Thread -=[ Julien Bonastre ]=-

I have seen it on many sites now and since I have been using PHP for so long and done 
a huge amount of coding with it I thought it would add a nice touch and it could be 
used for statistical purposes to assist me in database effeciency and so forth.

The idea is a page execution timer.. or a database query timer.. basically it shows 
you just a time (usually in msecs) it took for the last command to be executed.. I 
have seen it used for queries and it returns the time it took.. And I am quite sure 
I've seen it used for actual page generation as well, whereby it says something like 
page generated in x.xxx secs



I just want to know what function or module covers this feature.. If it is at all 
possible..




Thanks a million people!


--oOo---oOo--

 Julien Bonastre [The_RadiX]
 The-Spectrum Network CEO
 [EMAIL PROTECTED]
 www.the-spectrum.org

--oOo---oOo--




[PHP] string division

2002-09-19 Thread Meltem Demirkus

which function divides astring to the pieces accorrding to another string. 
for example according to a comma ..

thanks...
meltem


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] string division

2002-09-19 Thread Jay Blanchard

[snip]
which function divides astring to the pieces accorrding to another string. 
for example according to a comma ..
[/snip]

explode()

http://www.php.net/manual/en/function.explode.php

HTH!

Jay




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP Execution Timer

2002-09-19 Thread WEB MASTER

Easy,
Put a code to the beginning of the page that takes the unix time stamp, 
and another one to the end. The difference is the execution time at the 
server side...

-=[ Julien Bonastre ]=- wrote:

I have seen it on many sites now and since I have been using PHP for so long and done 
a huge amount of coding with it I thought it would add a nice touch and it could be 
used for statistical purposes to assist me in database effeciency and so forth.

The idea is a page execution timer.. or a database query timer.. basically it shows 
you just a time (usually in msecs) it took for the last command to be executed.. I 
have seen it used for queries and it returns the time it took.. And I am quite sure 
I've seen it used for actual page generation as well, whereby it says something like 
page generated in x.xxx secs



I just want to know what function or module covers this feature.. If it is at all 
possible..




Thanks a million people!


--oOo---oOo--

 Julien Bonastre [The_RadiX]
 The-Spectrum Network CEO
 [EMAIL PROTECTED]
 www.the-spectrum.org

--oOo---oOo--





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] string division

2002-09-19 Thread Chris Boget

 which function divides astring to the pieces accorrding to another string. 
 for example according to a comma ..

explode();

Chris



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] string division

2002-09-19 Thread WEB MASTER

||string *strtok*|  (string arg1, string arg2);

|

Meltem Demirkus wrote:

which function divides astring to the pieces accorrding to another string. 
for example according to a comma ..

thanks...
meltem





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] New problem - preg_match?

2002-09-19 Thread Marek Kilimajer

if $datetest has a strict format, use $getdate[1]==$datetest, also put 
$datetest=$day.month.$year out of the while loop, it doesn't need to 
be recreated over and over.

Chad Winger wrote:

Yes, I'm STILL a newbie :) I've gotten pretty far in a few days thanks to
you all. I have a new question for you, maybe this is a bit easier than my
last issue.

Still using my text file example, which has lines such as:

0706010102|01.01.02|16:00|Serie C2|02|Forl|Florentia Viola|
0610010102|01.07.02|16:00|Serie C2|05|Florentia Viola|Gubbio|
1806190702|19.07.02|16:00|Serie C2|05|Savona|Florentia Viola|

I am able to with a form, create a new addition to the file. What I'd like
to do now however, is before writing to the file, check the second field
(the date in this case) and if it is the same as what is being submitted,
then I want to buy using an if...else statement stop it from being written.

What I tried was to create an array called $getdate by exploding the file
that has the text above. Then, I also created a variable called $datetest
which was from the form such as: $datetest = ($day.$month.$year);

so Now i wanted to compare $getdate[1] to $datetest and if any of the
exploded arrays from $getdate[1] matched up with $getdate, i.e. what is
being submitted from the form, then it would not go to write the file.

I tried it like so:

$fd = fopen ($schedule, r);
while (!feof ($fd))
{
$currentlines = fgets($fd, 4096);
$getdate = explode(|, $currentlines);
$datetest = ($day.$month.$year);
if (preg_match ($getdate[1] , $datetest)) {
echo 'date already listed';
} else {
$fp = fopen($schedule, w);
fwrite($fp,
$current\n$homename[0]$awayname[0]$day$month$year|$day.$month.$year|$matcht
ime|$competition|$round|$homename[1]|$awayname[1]|);
fclose($fp);
echo 'success';
}

I am not even sure if this is the function i need to use, but if it is, my
syntaxt must be wrong, because I have tried all combinaions and I keep
getting errors.

Any suggestions?

Thanks as always

-Tree



  



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Check which PHP-Version a project needs?

2002-09-19 Thread Thomas -Balu- Walter

Hi all,

is there any tool to check which PHP-Version a project needs at
minimum?

I am looking for something that crawls through the project and notices
all php-functions, variables and such and tells which PHP-version is
needed to get it running, because it's hard to keep track of e.g.
functions that are added to a project and then look them up in the
manual to see what version it needs...

 Balu


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP Execution Timer

2002-09-19 Thread Justin French

on 20/09/02 12:03 AM, WEB MASTER ([EMAIL PROTECTED]) wrote:

 Easy,
 Put a code to the beginning of the page that takes the unix time stamp,
 and another one to the end. The difference is the execution time at the
 server side...

microtime workds better, because most pages execute in under a second...
resulting in lots of 1's or 0's

Justin French


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Check which PHP-Version a project needs?

2002-09-19 Thread Justin French

Nice idea!!!

I'd be interested in contributing to such a project, if one doesn't already
exist.

Justin


on 19/09/02 11:47 PM, Thomas -Balu- Walter ([EMAIL PROTECTED]) wrote:

 Hi all,
 
 is there any tool to check which PHP-Version a project needs at
 minimum?
 
 I am looking for something that crawls through the project and notices
 all php-functions, variables and such and tells which PHP-version is
 needed to get it running, because it's hard to keep track of e.g.
 functions that are added to a project and then look them up in the
 manual to see what version it needs...
 
 Balu
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] include_path? programmatically

2002-09-19 Thread Ford, Mike [LSS]

 -Original Message-
 From: Christian Calloway [mailto:[EMAIL PROTECTED]]
 Sent: 19 September 2002 01:56
 
 I dont have access to the php.ini file, is there anyway to access the
 include_path setting programatically from php? Thanks

ini_get()http://www.php.net/manual/en/function.ini-get.php

ini_set()http://www.php.net/manual/en/function.ini-get.php


Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] How to generate Excel files with PHP

2002-09-19 Thread Matti Simperi

Hi,

does anyone know a lib or a module which can generate Excel files with
PHP? Also commercial is fine.


Matti Simperi



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Unserialize stopped working after php db upgrade

2002-09-19 Thread Paul Nicholson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Geoff,
I looked at the string.
s:1745:s:1735:s:1725:s:1715:s:1705:s:1695:s:1685:s:1675:s:1665:s:1655:s:1645:s:1635:s:1625:s:1615:a:2:{
see all of the s's? It means that unserializer will produce a string that 
looks like was not unserialized(but it was). So, I just deleted everthing to 
the 'a' and removed everything past the last } at the end.
I'm glad it worked out for you:)
~Pauly

On Thursday 19 September 2002 01:35 am, Geoff Caplan wrote:
 Paul,

 PN It looks like that string has been serialized multiple times

 Many thanks - that is the problem! I think that this qualifies as one
 of my more creative bugs...

 Can I ask you how you spotted this? Pretty impressive, considering you
 only had the string itself to go on.

 Thanks again,

- -- 
~Paul Nicholson
Design Specialist @ WebPower Design
The webthe way you want it!
[EMAIL PROTECTED]

It said uses Windows 98 or better, so I loaded Linux!
Registered Linux User #183202 using Register Linux System # 81891
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9id2SDyXNIUN3+UQRApeyAJ4ohHufAZW6A4Sn1jY+YI2X0RvGZACeJGyp
t5/CIlMx9O8fWWQSld3krRI=
=a36C
-END PGP SIGNATURE-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] How to generate Excel files with PHP

2002-09-19 Thread Jay Blanchard

[snip]
does anyone know a lib or a module which can generate Excel files with
PHP? Also commercial is fine.
[/snip]

There are lists of articles, tutorials, and other stuff.
http://www.google.com/search?hl=enie=UTF-8oe=UTF-8q=generate+Excel+files+
with+PHP

An article I like ...
watch wrap
http://www.evolt.org/article/Using_MySQL_and_PHP_to_Present_Excel_Spreadshee
ts/20/26896/index.html
/wrap

HTH!

Jay



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] How to generate Excel files with PHP

2002-09-19 Thread Daniel Kushner

Found this on phpclasses:
http://phpclasses.websapp.com/browse.html/package/86.html

Regards,
Daniel Kushner
_
Need hosting? http://thehostingcompany.us

 -Original Message-
 From: Matti Simperi [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, September 19, 2002 10:19 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] How to generate Excel files with PHP
 
 
 Hi,
 
 does anyone know a lib or a module which can generate Excel files with
 PHP? Also commercial is fine.
 
 
 Matti Simperi
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP Execution Timer

2002-09-19 Thread Justin French

on 19/09/02 11:37 PM, -=[ Julien Bonastre ]=- ([EMAIL PROTECTED])
wrote:

 I just want to know what function or module covers this feature.. If it is at
 all possible..

Top of your script:

?
$timerOn = 1; // set to 0 if you want to turn it off
$timestart = getmicrotime();
?


Bottom:

?
if($timerOn)
{
$timeend = getmicrotime();
$timer = $timeend - $timestart;
echo timer: $timer;
}
?

Similar things could be done with MySQL quereies, but I haven't looked into
it.


Justin French


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Reports with PHP

2002-09-19 Thread José León Serna

Hello:
  What is the best and easiest way to generate reports from PHP? I supose is to 
generate XML and transform later to HTML, PDF or TXT, but is there any PHP library to 
help me create reports with page headers, detail bands, subdetails, summaries and so 
on?.

Regards.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] New problem - preg_match?

2002-09-19 Thread Ford, Mike [LSS]

 -Original Message-
 From: Chad Winger [mailto:[EMAIL PROTECTED]]
 Sent: 19 September 2002 06:25
 
 Still using my text file example, which has lines such as:
 
 0706010102|01.01.02|16:00|Serie C2|02|Forlì|Florentia Viola|
 0610010102|01.07.02|16:00|Serie C2|05|Florentia Viola|Gubbio|
 1806190702|19.07.02|16:00|Serie C2|05|Savona|Florentia Viola|
 
 so Now i wanted to compare $getdate[1] to $datetest and if any of the
 exploded arrays from $getdate[1] matched up with $getdate, 
 i.e. what is
 being submitted from the form, then it would not go to write the file.


A quick inspection prompts the following comments:

(1) *please* indent your code to reflect its structure -- makes it so much
easier to read!

(2) Why re-calculate $datetest on each iteration of the loop? Do it once
before you start looping.

(3) There's no need to use something as complex as ereg: as you're checking
for simple equality, a simple == will do!

(4) It's bad practice to open the file for writing whilst you've still got
it open for reading: I'd suggest completing the scan of existing entries
(taking care to remember whether it found a duplicate or not!), then close
the file, re-open it in *append* mode (not write) and just add the single
new line.  (The other option would be to use read-write mode ('a+') and
fseek() as appropriate; personally I would regard this as more error prone
for very little performance gain, but YMMV.)

A quick rewrite taking these points into account gives:
 
 $fd = fopen ($schedule, r);
 $datetest = ($day.$month.$year);
 $is_new_date = TRUE;  // assume this to begin with

 while (!feof ($fd)):
$currentlines = fgets($fd, 4096);
$getdate = explode(|, $currentlines);
if ($getdate[1] == $datetest):
   echo 'date already listed';
   $is_new_date = FALSE;
   break;// break out of while loop
endif;
 endwhile;
 fclose($fd);

 if ($is_new_date):
$fp = fopen($schedule, a);
fwrite($fp,
\n$homename[0]$awayname[0]$day$month$year|$day.$month.$year|$matchtime|$com
petition|$round|$homename[1]|$awayname[1]|);
fclose($fp);
echo 'success';
 endif;

Hope this helps.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP source code

2002-09-19 Thread Oliver Witt

Hi,
Is there any way to read php source code? I didn't think so until I
heard about people you have done that...
Kind regards,
Oliver


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: PHP source code

2002-09-19 Thread Stephan Seidt

On Thu, 19 Sep 2002 16:50:16 +0200
[EMAIL PROTECTED] (Oliver Witt) wrote:

 Hi,
 Is there any way to read php source code? I didn't think so until I
 heard about people you have done that...
 Kind regards,
 Oliver
 

Do you mean the source of php.net ?
Try http://de.php.net/source.php?url=/index.php

If you mean php's source, download it ;)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] editor php

2002-09-19 Thread Gian Michele

Hi,
does any body knows a cool editor for php that run under redhat 7.x and 
where i can find?
tanks  -- Gian Michele


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] editor php

2002-09-19 Thread Adam Williams

/bin/vi

:)

Adam

On Thu, 19 Sep 2002, Gian Michele wrote:

 Hi,
 does any body knows a cool editor for php that run under redhat 7.x and
 where i can find?
 tanks  -- Gian Michele





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] editor php

2002-09-19 Thread Steve Bradwell

Lol. Here, Here!

-Original Message-
From: Adam Williams [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 19, 2002 11:06 AM
To: Gian Michele
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] editor php


/bin/vi

:)

Adam

On Thu, 19 Sep 2002, Gian Michele wrote:

 Hi,
 does any body knows a cool editor for php that run under redhat 7.x and
 where i can find?
 tanks  -- Gian Michele





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] editor php

2002-09-19 Thread John Wards

Zend Studio if you can afford it...

www.zend.com

My work paid for it aint I lucky.

John Wards
SportNetwork.net
- Original Message - 
From: Gian Michele [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 19, 2002 4:57 PM
Subject: [PHP] editor php


 Hi,
 does any body knows a cool editor for php that run under redhat 7.x and 
 where i can find?
 tanks  -- Gian Michele
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] editor php

2002-09-19 Thread Eric C. Pollitt

I haven't tried this, but it's a PHP Class named, EditPHP.

http://spunge.mirrors.phpclasses.org/goto/browse.html/package/43.html

Eric C. Pollitt, Founder
401 E. Illinois Ave.
Peoria, IL 61603
Global Hemp - Portal to the hemp community
http://www.globalhemp.com/

Hunt out places and soil suitable for flax and hemp, and let them there be
grown.
-- Brigham Young, 1861

 From: Gian Michele [EMAIL PROTECTED]
 Date: Thu, 19 Sep 2002 17:57:48 +0200
 To: [EMAIL PROTECTED]
 Subject: [PHP] editor php
 
 Hi,
 does any body knows a cool editor for php that run under redhat 7.x and
 where i can find?
 tanks  -- Gian Michele
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP source code

2002-09-19 Thread Joseph W. Goff

PHP is open source so anyone can get the source code to it.  You can find it
at http://www.php.net/downloads.php

- Original Message -
From: Oliver Witt [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 19, 2002 9:50 AM
Subject: [PHP] PHP source code


 Hi,
 Is there any way to read php source code? I didn't think so until I
 heard about people you have done that...
 Kind regards,
 Oliver


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Cannot Redeclare Function

2002-09-19 Thread Robert Miller

Hello,

My function to read a comma separated text file and return a sorted multi-dimensional 
array will not work if used more than once per page.

I know why I'm having this problem. But, I don't know how to solve it. :-(





Calling it Twice:
$services = tbl2array (../locations/service.txt, default, $divdetail['id'], 0);
$collections = tbl2array (../download/collection.txt, name, $divdetail['id'], 4);


The Error:
Fatal error: Cannot redeclare compname() in ../tbl2array.inc on line 35


Function Table 2 Array:
?php
function tbl2array ($table, $sortby = default, $keyword = all, $keyfield = 0) {
$fpointer = fopen ($table,r);
$row = 1;
$leaf = array();
$heading = array();
while ($data = fgetcsv ($fpointer,1000)) {
if ($row == 1) {
$heading = $data;
}
else {
$count = 0;
if ($keyword == all) {
foreach ($data as $value) {
$leaf[$heading[$count]] = $value;
$count++;
}
$result[] = $leaf;
}
elseif (($keyword != all)  ($data[$keyfield] == $keyword)) {
foreach ($data as $value) {
$leaf[$heading[$count]] = $value;
$count++;
}
$result[] = $leaf;
}
else {
$count++;
}
}
$row++;
}
fclose ($fpointer);

function compname ($a, $b) {
return strcmp ($a[name], $b[name]);
}

function comptitle ($a, $b) {
return strcmp ($a[title], $b[title]);
}

function compcity ($a, $b) {
return strcmp ($a[city], $b[city]);
}

function compdesc ($a, $b) {
return strcmp ($a[description], $b[description]);
}

function compfile ($a, $b) {
return strcmp ($a[filename], $b[filename]);
}

if ($sortby == name) {
usort ($result, compname);
}
elseif ($sortby == title) {
usort ($result, comptitle);
}
elseif ($sortby == city) {
usort ($result, compcity);
}
elseif ($sortby == description) {
usort ($result, compdesc);
}
elseif ($sortby == filename) {
usort ($result, compfile);
}

return $result;
}
?



--
Robert J. Miller
Internet Support Specialist
Department of Government Services and Lands
P.O. Box 8700, St. John's, NF., A1B-4J6
(709) 729-4520 (phone)
(709) 729-4151 (facsimile)
(709) 778-8746 (pager)

http://www.gov.nf.ca/gsl/
mailto:[EMAIL PROTECTED]
--
Simple things should be simple and hard things
should be possible.
--


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Cannot Redeclare Function

2002-09-19 Thread Stephan Seidt

Looks like you may not redeclare functions generally.
Because the function tbl2array can't be any kind of scope,
the functions declared inside it will be globally declared.

I think the solution is to take the functions like compname()
out of tbl2array and declare them really global.

On Thu, 19 Sep 2002 13:28:09 -0230
[EMAIL PROTECTED] (Robert Miller) wrote:

 Hello,
 
 My function to read a comma separated text file and return a sorted 
multi-dimensional array will not work if used more than once per page.
 
 I know why I'm having this problem. But, I don't know how to solve it. :-(
 
 
 
 
 
 Calling it Twice:
 $services = tbl2array (../locations/service.txt, default, $divdetail['id'], 0);
 $collections = tbl2array (../download/collection.txt, name, $divdetail['id'], 
4);
 
 
 The Error:
 Fatal error: Cannot redeclare compname() in ../tbl2array.inc on line 35
 
 
 Function Table 2 Array:
 ?php
 function tbl2array ($table, $sortby = default, $keyword = all, $keyfield = 0) {
 $fpointer = fopen ($table,r);
 $row = 1;
 $leaf = array();
 $heading = array();
 while ($data = fgetcsv ($fpointer,1000)) {
 if ($row == 1) {
 $heading = $data;
 }
 else {
 $count = 0;
 if ($keyword == all) {
 foreach ($data as $value) {
 $leaf[$heading[$count]] = $value;
 $count++;
 }
 $result[] = $leaf;
 }
 elseif (($keyword != all)  ($data[$keyfield] == $keyword)) {
 foreach ($data as $value) {
 $leaf[$heading[$count]] = $value;
 $count++;
 }
 $result[] = $leaf;
 }
 else {
 $count++;
 }
 }
 $row++;
 }
 fclose ($fpointer);
 
 function compname ($a, $b) {
 return strcmp ($a[name], $b[name]);
 }
 
 function comptitle ($a, $b) {
 return strcmp ($a[title], $b[title]);
 }
 
 function compcity ($a, $b) {
 return strcmp ($a[city], $b[city]);
 }
 
 function compdesc ($a, $b) {
 return strcmp ($a[description], $b[description]);
 }
 
 function compfile ($a, $b) {
 return strcmp ($a[filename], $b[filename]);
 }
 
 if ($sortby == name) {
 usort ($result, compname);
 }
 elseif ($sortby == title) {
 usort ($result, comptitle);
 }
 elseif ($sortby == city) {
 usort ($result, compcity);
 }
 elseif ($sortby == description) {
 usort ($result, compdesc);
 }
 elseif ($sortby == filename) {
 usort ($result, compfile);
 }
 
 return $result;
 }
 ?
 
 
 
 --
 Robert J. Miller
 Internet Support Specialist
 Department of Government Services and Lands
 P.O. Box 8700, St. John's, NF., A1B-4J6
 (709) 729-4520 (phone)
 (709) 729-4151 (facsimile)
 (709) 778-8746 (pager)
 
 http://www.gov.nf.ca/gsl/
 mailto:[EMAIL PROTECTED]
 --
 Simple things should be simple and hard things
 should be possible.
 --
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] usort will not take variable

2002-09-19 Thread Robert Miller

Hello,

Do you know the answer to this got'tcha? I want to call usort with a variable function 
name. Basically, I want usort to sort any field I specify. Currently, I'm stuck 
declaring a pile of functions and calling usort from if/elseif statements. :-(

Current:
function compname ($a, $b) {
return strcmp ($a[name], $b[name]);
}

function comptitle ($a, $b) {
return strcmp ($a[title], $b[title]);
}

function compcity ($a, $b) {
return strcmp ($a[city], $b[city]);
}

function compdesc ($a, $b) {
return strcmp ($a[description], $b[description]);
}

function compfile ($a, $b) {
return strcmp ($a[filename], $b[filename]);
}

if ($sortby == name) {
usort ($result, compname);
}
elseif ($sortby == title) {
usort ($result, comptitle);
}
elseif ($sortby == city) {
usort ($result, compcity);
}
elseif ($sortby == description) {
usort ($result, compdesc);
}
elseif ($sortby == filename) {
usort ($result, compfile);
}


What Works in Theory:
function mysort ($a, $b, $c) {
return strcmp ($a[$c], $b[$c]);
}

usort ($result, $mysort, $sortby);

...but, that chokes.

Your help appreciated. :-)

Rob



--
Robert J. Miller
Internet Support Specialist
Department of Government Services and Lands
P.O. Box 8700, St. John's, NF., A1B-4J6
(709) 729-4520 (phone)
(709) 729-4151 (facsimile)
(709) 778-8746 (pager)

http://www.gov.nf.ca/gsl/
mailto:[EMAIL PROTECTED]
--
Simple things should be simple and hard things
should be possible.
--


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: redefining a function

2002-09-19 Thread David T-G

Tim, et al --

...and then Tim Ward said...
% 
% is using classes an option?

I don't know.  I suppose I need to learn about classes :-)  Where do I
start?


% 
%   Tim Ward
%   www.chessish.com


TIA  HAND

:-D
-- 
David T-G  * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!




msg79159/pgp0.pgp
Description: PGP signature


[PHP] File Access...

2002-09-19 Thread Brian McGarvie

How could you redirect somone from directly accessing a file...

Meaning... if an engine spiders www.domain.com/some.php

How could you make some.php redirect to index.php

However... the site is framed, and the menu uses content.php to display the
selected content.

Any ideas?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] editor php

2002-09-19 Thread Paul Nicholson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I've used Quantaits an opensource project.
http://quanta.sourceforge.net/
~Pauly

On Thursday 19 September 2002 11:57 am, Gian Michele wrote:
 Hi,
 does any body knows a cool editor for php that run under redhat 7.x and
 where i can find?
 tanks  -- Gian Michele

- -- 
~Paul Nicholson
Design Specialist @ WebPower Design
The webthe way you want it!
[EMAIL PROTECTED]

It said uses Windows 98 or better, so I loaded Linux!
Registered Linux User #183202 using Register Linux System # 81891
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9ifjoDyXNIUN3+UQRAg/DAKCQkRcfosrBNW5iSExXMmRAol4eFgCePbsK
asGslqIH/5oN9VSydkp+RKI=
=s6uN
-END PGP SIGNATURE-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: File Access...

2002-09-19 Thread Stephan Seidt

I guess it is sth. like :

?php header('Redirect: http://www.domain.com/index.php'); ?

If it doesnt work try www.php.net/header, there is an example.

On Thu, 19 Sep 2002 17:21:15 +0100
[EMAIL PROTECTED] (Brian McGarvie) wrote:

 How could you redirect somone from directly accessing a file...
 
 Meaning... if an engine spiders www.domain.com/some.php
 
 How could you make some.php redirect to index.php
 
 However... the site is framed, and the menu uses content.php to display the
 selected content.
 
 Any ideas?
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] File Access...

2002-09-19 Thread Marek Kilimajer

put this to the begining of your some.php

if (eregi(some.php,$PHP_SELF)) {
Header(Location: index.php);
die();
}


Brian McGarvie wrote:

How could you redirect somone from directly accessing a file...

Meaning... if an engine spiders www.domain.com/some.php

How could you make some.php redirect to index.php

However... the site is framed, and the menu uses content.php to display the
selected content.

Any ideas?



  



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Is php even right for this design?

2002-09-19 Thread William

I am interested in writing a large scale, cross platform payroll/hr/gl appl
entirely in php + mysql Innodb (for transaction support).
I have 2 php programmers 1 asp/foxpro/access programmer to help me.

I see 4 big hurdles to overcome in my php design:   Large Libraries, Long
Processes, Reporting, Loosely Typed Variables
1) Payroll apps require large tax libraries (federal, every state and
locality).

Now If I were interested in using ASP (which I'm not) I would probably
compile these libraries into a .dll that would be loaded in-process with
scripts that require it.
Since I'm using Php I would most likely create a few really huge include
files fedtax.inc.php,statetax.inc.php,localtax.inc.php that had all of
my income tax calculations.
I'm guessing these three libraries will be about 200Kb combined and need
to be loaded often.  Is it feasible to create such large includes for an app
that will likely have 1000+users.
Is there a better way to keep these functions available to my scripts
without using these large includes?

2)Long Processes.
There are 2 types of users...general and admin.  There will be only
about 5 administrators.
The admin users will need to run long processes that take about 5-15
minutes each.  They cannot timeout and they must be done throughout the day
while general users are working in the application as well.  Is there a
big problem with this?  What steps should I take to ensure these long
processes complete and do not timeout.

3)Reporting.
I think I can get by with HTML reports for the most part. however checks
and tax forms require precisely positioned reporting abilities.
I think that I will be better off using an external reporting
application (crystal,access,FoxPro etc) to generate these reports.   But if
I do that
then I'm sure I'll have to duplicate some of my coding efforts, since
there is no way to achieve interop between these languages.  Is there anyway
to minimize the need to duplicate code?

4)Loosely Typed Variables.
I fear it might be to simple in PHP to have a dollar amount converted to
a string and become rounded or truncated, because php's loose type.
This might be a smaller issue than I think? Is there a way to strictly
enforce types/conversions so my numerics stay numerics?

[Big application...Why would I want ot use PHP?]
1)The system can be developed on a laptop running xitami+win98 and then
deployed on a high perfomance unix+apache machine without any adjustments :)
2)I won't be locked into vendor specific solutions (Sun EJB server/M$ .Net
server)
3)I can teach the basics to new guys in about 1 week.
4)I just really like php, I've used it for 3 1/2 years and it's never failed
me.

But If there's a better framework for developing such an app, please let me
know.

Thanks a lot,
Will




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Is php even right for this design?

2002-09-19 Thread Adam Voigt

1. Never had any problems with big includes before.
2. Maybe add a console based prog which sits in the background and
process's jobs if you don't want to leave the web page open while
it works, etc.
3. Make them PDF's (pdflib), we use it, and once you get programming
in it, it's fairly easy.
4. I've never seen PHP round a number because it thought it
was a string. =)
Actually, if it's a string, it's more likely to interepret it
as a don't touch me variable. (That makes sense to me anyway).

Adam Voigt
[EMAIL PROTECTED]

On Thu, 2002-09-19 at 14:19, William wrote:
 I am interested in writing a large scale, cross platform payroll/hr/gl appl
 entirely in php + mysql Innodb (for transaction support).
 I have 2 php programmers 1 asp/foxpro/access programmer to help me.
 
 I see 4 big hurdles to overcome in my php design:   Large Libraries, Long
 Processes, Reporting, Loosely Typed Variables
 1) Payroll apps require large tax libraries (federal, every state and
 locality).
 
 Now If I were interested in using ASP (which I'm not) I would probably
 compile these libraries into a .dll that would be loaded in-process with
 scripts that require it.
 Since I'm using Php I would most likely create a few really huge include
 files fedtax.inc.php,statetax.inc.php,localtax.inc.php that had all of
 my income tax calculations.
 I'm guessing these three libraries will be about 200Kb combined and need
 to be loaded often.  Is it feasible to create such large includes for an app
 that will likely have 1000+users.
 Is there a better way to keep these functions available to my scripts
 without using these large includes?
 
 2)Long Processes.
 There are 2 types of users...general and admin.  There will be only
 about 5 administrators.
 The admin users will need to run long processes that take about 5-15
 minutes each.  They cannot timeout and they must be done throughout the day
 while general users are working in the application as well.  Is there a
 big problem with this?  What steps should I take to ensure these long
 processes complete and do not timeout.
 
 3)Reporting.
 I think I can get by with HTML reports for the most part. however checks
 and tax forms require precisely positioned reporting abilities.
 I think that I will be better off using an external reporting
 application (crystal,access,FoxPro etc) to generate these reports.   But if
 I do that
 then I'm sure I'll have to duplicate some of my coding efforts, since
 there is no way to achieve interop between these languages.  Is there anyway
 to minimize the need to duplicate code?
 
 4)Loosely Typed Variables.
 I fear it might be to simple in PHP to have a dollar amount converted to
 a string and become rounded or truncated, because php's loose type.
 This might be a smaller issue than I think? Is there a way to strictly
 enforce types/conversions so my numerics stay numerics?
 
 [Big application...Why would I want ot use PHP?]
 1)The system can be developed on a laptop running xitami+win98 and then
 deployed on a high perfomance unix+apache machine without any adjustments :)
 2)I won't be locked into vendor specific solutions (Sun EJB server/M$ .Net
 server)
 3)I can teach the basics to new guys in about 1 week.
 4)I just really like php, I've used it for 3 1/2 years and it's never failed
 me.
 
 But If there's a better framework for developing such an app, please let me
 know.
 
 Thanks a lot,
 Will
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Best practice question

2002-09-19 Thread Jon Haworth

Hi list,

What are peoples' thoughts on one should always return a value from a
function, even if it's always going to be true?

Cheers
Jon

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Best practice question

2002-09-19 Thread Adam Voigt

One extra variable to be declared to catch the true (if you do try
and catch it) and one extra line (the return line in the function),
I'd say skip it if you know your never returning anything different.

Adam Voigt
[EMAIL PROTECTED]

On Thu, 2002-09-19 at 13:17, Jon Haworth wrote:
 Hi list,
 
 What are peoples' thoughts on one should always return a value from a
 function, even if it's always going to be true?
 
 Cheers
 Jon
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Best practice question

2002-09-19 Thread Jon Haworth

Hi Adam,

  What are peoples' thoughts on one should always return 
  a value from a function, even if it's always going to be 
  true?
  
 I'd say skip it if you know your never returning anything 
 different.

Yeah, that's what I was leaning towards :-)

What prompted the question was a constructor like this:

class foo {
  var $timestamp;
  function foo () {
$this-timestamp = mktime();
  }
}

I just can't see any reason to return anything from it, unless someone wants
to tell me otherwise...

Cheers
Jon

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Apache not parsing without .php on url?

2002-09-19 Thread Stefan

Hello,
I have a new Apache 2.0.40 with PHP 4.2.3 installation on a Solaris x86 box.

Configered in httpd.conf  with:
AddType application/x-httpd-php .php
and
LoadModule 

Parsing url´s with  .php works fine, but i can´t figure out why it
dosen´t
work if i leave out the .phpextension in the url? This works in my old
apache 1 installation.!

The file is named test.php in the abc directory.
http://my.server.se/abc/test.php; works, but not
http://my.server.se/abc/test;

Any tips in what i missed out in configuration or how to fix this would be
appreciated.

best regards,
Stefan




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PDF Library Download

2002-09-19 Thread César Aracena

Hi all,

As I told yesterday, I'm setting my first home server with PHP and would like to start 
adding libraries at runtime (if possible). I would like to start with the PDF library 
but don't even have a clue where to get it or any of the rest. Can anyone help me 
please? It would also help to know what changes do I have to make to the php.ini file.

Running on Win2K + IIS 5.0

Thanks in advance,
 
César Aracena
On Dial-Up



Re: [PHP] Is php even right for this design?

2002-09-19 Thread Geoff Hankerson



3)Reporting.
I think I can get by with HTML reports for the most part. however checks
and tax forms require precisely positioned reporting abilities.
I think that I will be better off using an external reporting
application (crystal,access,FoxPro etc) to generate these reports.   But if
I do that
then I'm sure I'll have to duplicate some of my coding efforts, since
there is no way to achieve interop between these languages.  Is there anyway
to minimize the need to duplicate code?
  

Perhaps expose your report data as xml or even an xml service then your 
report writer can parse it or just use an xslt stylesheet to present the 
xml data. Just an idea


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] pardon the previous mis-topic

2002-09-19 Thread Tony Earnshaw

tor, 2002-09-19 kl. 05:27 skrev Monique Y. Herman:

 I'd started another question, realized the answer to it, and typed in another
 question without checking the subject ... mea culpa!

The only one in the whole wide world I've ever seen apologize for this.
Straight out, the only one.

Go straight to heaven, Monique, and experience the joy of eternal
self-justification. All the others must for ever suffer the pangs that
indolence confers.

Best,

Tonni

-- 

Tony Earnshaw

Tha can allway tell a Yorkshireman, but tha canna tell 'im much.

e-post: [EMAIL PROTECTED]
www:http://www.billy.demon.nl
gpg public key: http://www.billy.demon.nl/tonni.armor

Telefoon:   (+31) (0)172 530428
Mobiel: (+31) (0)6 51153356

GPG Fingerprint = 3924 6BF8 A755 DE1A 4AD6 FA2B F7D7 6051 3BE7 B981
3BE7B981





signature.asc
Description: Dette er en digitalt signert meldingsdel


Re: [PHP] PHP Installation

2002-09-19 Thread Tony Earnshaw

ons, 2002-09-18 kl. 20:00 skrev Sascha Braun:

 It told me at last something about the cgi installation and some things i dont 
understand,
 so i feel very insecure.
 Please help me a little.

A ... den stakkars, stakkars Sascha :-(

In the directory in which you ran './configure', did you by any chance
see a number of files called README.something and one called
INSTALL? Did you read them especially INSTALL?

Don't you think it might be a good idea to do so? That's what I always
do.

Best,

Tony

-- 

Tony Earnshaw

Tha can allway tell a Yorkshireman, but tha canna tell 'im much.

e-post: [EMAIL PROTECTED]
www:http://www.billy.demon.nl
gpg public key: http://www.billy.demon.nl/tonni.armor

Telefoon:   (+31) (0)172 530428
Mobiel: (+31) (0)6 51153356

GPG Fingerprint = 3924 6BF8 A755 DE1A 4AD6 FA2B F7D7 6051 3BE7 B981
3BE7B981





signature.asc
Description: Dette er en digitalt signert meldingsdel


[PHP] Re: PHP source code

2002-09-19 Thread Oliver Witt

Stephan Seidt schrieb:

 On Thu, 19 Sep 2002 16:50:16 +0200
 [EMAIL PROTECTED] (Oliver Witt) wrote:

  Hi,
  Is there any way to read php source code? I didn't think so until I
  heard about people you have done that...
  Kind regards,
  Oliver
 

 If you mean php's source, download it ;)

Well, but if I write a script with MySQl, there has to be my user name
and password in the source code. If anybody could read it, anybody could
have access to my databases!
Oliver




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Variables Case Sensitivity??

2002-09-19 Thread Georgie Casey

is there any way to make variables NOT case sensitive??
A partner is posting information to one of my PHP scripts and cant gurantee
that variables passed will be lowercase



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: PHP source code

2002-09-19 Thread Stephan Seidt

Then be sure that nobody is able to read it.
Should be no problem ;)
There is no possibility to read php source,
the webserver will always count it as php file
and the file will be parsed by php.

Sure its possible to get the file over ftp, ssh, imap, etc,
but this is the problem with all the secret-file stuff.

bye,
blizz

On Thu, 19 Sep 2002 20:15:06 +0200, [EMAIL PROTECTED] (Oliver Witt) wrote:

 Stephan Seidt schrieb:
 
  On Thu, 19 Sep 2002 16:50:16 +0200
  [EMAIL PROTECTED] (Oliver Witt) wrote:
 
   Hi,
   Is there any way to read php source code? I didn't think so until I
   heard about people you have done that...
   Kind regards,
   Oliver
  
 
  If you mean php's source, download it ;)
 
 Well, but if I write a script with MySQl, there has to be my user name
 and password in the source code. If anybody could read it, anybody could
 have access to my databases!
 Oliver
 
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Variables Case Sensitivity??

2002-09-19 Thread Robert Cummings

Georgie Casey wrote:
 
 is there any way to make variables NOT case sensitive??
 A partner is posting information to one of my PHP scripts and cant gurantee
 that variables passed will be lowercase

Sure, whatever you use make it lower case, whataever he send,
cook to lower case.

Cheers,
Rob.
-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Variables Case Sensitivity??

2002-09-19 Thread Georgie Casey

yea, i probably didnt make that clear
its the variables NAMES that he can't gurantee to be lowercase
eg
hell pass http://www.server.com/test.php?NAME=JohnIDNumber=12
when im expecting $name and $idnumber

sorry
Robert Cummings [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Georgie Casey wrote:
 
  is there any way to make variables NOT case sensitive??
  A partner is posting information to one of my PHP scripts and cant
gurantee
  that variables passed will be lowercase

 Sure, whatever you use make it lower case, whataever he send,
 cook to lower case.

 Cheers,
 Rob.
 --
 .-.
 | Robert Cummings |
 :-`.
 | Webdeployer - Chief PHP and Java Programmer  |
 :--:
 | Mail  : mailto:[EMAIL PROTECTED] |
 | Phone : (613) 731-4046 x.109 |
 :--:
 | Website : http://www.webmotion.com   |
 | Fax : (613) 260-9545 |
 `--'



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP source code

2002-09-19 Thread 1LT John W. Holmes

 Hi,
 Is there any way to read php source code? I didn't think so until I
 heard about people you have done that...
 Kind regards,
 Oliver

I tend to read it left to right, but to each his own

---John Holmes...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Variables Case Sensitivity??

2002-09-19 Thread Robert Cummings

Georgie Casey wrote:
 
 yea, i probably didnt make that clear
 its the variables NAMES that he can't gurantee to be lowercase
 eg
 hell pass http://www.server.com/test.php?NAME=JohnIDNumber=12
 when im expecting $name and $idnumber

$lowerVars = array();
foreach( $_POST as $key = $value )
{
$lowerVars[strtolower( $key )] = $value;
}

Voila!

HTH,
Rob.
-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: PHP source code

2002-09-19 Thread Support @ Fourthrealm.com


A solution that I use is to put important information in an include file, 
and store it in a User-Authentication protected folder, ie. /admin/

This adds one extra layer of protection to your files, and keeps the 
average joe-surfer from being able to get the files.

Peter


At 08:24 PM 9/19/2002 +, Stephan Seidt wrote:
Then be sure that nobody is able to read it.
Should be no problem ;)
There is no possibility to read php source,
the webserver will always count it as php file
and the file will be parsed by php.

Sure its possible to get the file over ftp, ssh, imap, etc,
but this is the problem with all the secret-file stuff.

bye,
blizz

On Thu, 19 Sep 2002 20:15:06 +0200, [EMAIL PROTECTED] (Oliver Witt) 
wrote:

  Stephan Seidt schrieb:
 
   On Thu, 19 Sep 2002 16:50:16 +0200
   [EMAIL PROTECTED] (Oliver Witt) wrote:
  
Hi,
Is there any way to read php source code? I didn't think so until I
heard about people you have done that...
Kind regards,
Oliver
   
  
   If you mean php's source, download it ;)
 
  Well, but if I write a script with MySQl, there has to be my user name
  and password in the source code. If anybody could read it, anybody could
  have access to my databases!
  Oliver
 
 
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

- - - - - - - - - - - - - - - - - - - - -
Fourth Realm Solutions
[EMAIL PROTECTED]
http://www.fourthrealm.com
Tel: 519-739-1652
- - - - - - - - - - - - - - - - - - - - -


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Fw: [PHP] Variables Case Sensitivity??

2002-09-19 Thread Kevin Stone

You could concievably use the get_defined_vars(); function to impliment a
forced-variable-case machine at the start of your script.
http://www.php.net/manual/en/function.get-defined-vars.php
-Kevin

- Original Message -
From: Georgie Casey [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 19, 2002 12:18 PM
Subject: [PHP] Variables Case Sensitivity??


 is there any way to make variables NOT case sensitive??
 A partner is posting information to one of my PHP scripts and cant
gurantee
 that variables passed will be lowercase



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] about $_post

2002-09-19 Thread 1LT John W. Holmes

 $_POST[ID]
 Since there are no quotes around the variable name ID and no dollar sign
in
 front of it, PHP will look for a constant named ID and if one is not found
 it will blow chow.

Depending on your error_reporting() level whether this warning is reported
or not. Better to not use this method, though.

 $_POST['ID']
 Should work find, assuming a variable named ID came from your form.
However,
 I wouldn't get in the habit of writing my arrays like this.  It's
confusing
 to say the least.

What habit would you recommend? This is the way to do it. Not sure why the
spaces are there, but without them, this is the way you should write your
arrays.

---John Holmes...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] In a shared environment...

2002-09-19 Thread 1LT John W. Holmes

 Relative newbie here, and I am just coming to grips with something that I
 think is a very bad thing... Please tell me I am wrong.

 When using PHP, it is the Apache user that actually performs things, and
 therefore needs permissions. For example, if I want to write data to a
file,
 I have to chmod o+w the directory it's in to get that to happen.

 The trouble with this, is a shared environment, doesn't this give anyone
who
 can use PHP on your system the ability to write over any other user's file
 if they know the name of it? Am I missing something fundamental here?

 Any help would be appreciated!

 Bill

Yep, that's the problem. Running in safe_mode will protect some of those
things, along with other settings like include_path, etc.

Best protection is to get a dedicated server, though, so you're the only one
on it. They really aren't that expensive anymore.

---John Holmes...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Is php even right for this design?

2002-09-19 Thread David Buerer

1) Large Includes
200K of includes? Piece of cake!  Remember, it is the server that is doing
all of the work, not your clients.  The issue is how many requests can your
server simultaneously process and is there enough overhead to do it.  With
respect to speed, your server will cache the files after their first and
repeated use, so you won't have to pull them from disk every single time.


2)Long Processes.
3)Reporting.

Neither one of these things is a problem with PHP.  The pdf library
suggestion is a great one for reports. However, if it were me I would write
a secondary app in my language of choice, like VB, foxpro, java, (but not
access) which would still give me direct access to my data but would allow
for some of the advanced admin/reporting tasks that PHP just didn't do well.

Now, if everything must be web based, than you are limited to java or php or
vbscript or other web langauges.

4)Loosely Typed Variables.

mysql CAN BE very specific in it's typing requirements. PHP is a bit loose,
but frankly html is looser.  As the developer you have control to be as
stricht as possible and validate/format all data any way you want.  PHP has
the tools to do this.

me.

5.) But If there's a better framework for developing such an app, please let
me
know.


Maybe there is, maybe there isn't.  PHP will certainly drop the development
time significantly.  Give your requirements, I see no reason why you
shouldn't move forward.



[PHP] Click....download and update

2002-09-19 Thread Christian Ista

Hello,

I'd like when I click on a link a href=http://www.website.com/file.zip
update a table and start the download without change the page.

Could you tell me how to do ?

Christian, 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] FPDF and MySQL

2002-09-19 Thread Chuck Payne

Hi,

I found a free pdfclass called FPDF http://www.fpdf.org, that I can use with
PHP to create pdf files with. Before someone tells me Read The Manual, I
have read their page and used Google to search for notes on how called mysql
into a PDF and I am lost. Does anyone know where there is a tutorial.

Thanks,

Chuck Payne
Magi Design and Support



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] pass var through URL String

2002-09-19 Thread Gary

Hi All,
Using a link a href=\bla.php?bname=$bname\$bname/a I could pass 
$bname to another page and using SELECT * FROM table WHERE bname = 
\$bname\; I could get all I need from the db on the new page. Now 
that globals have been turned off and superglobals are replacing them. 
How should I pass and catch the var?

TIA
Gary


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] pass var through URL String

2002-09-19 Thread Kevin Stone

Pass the vars the same way.  Use $_GET['bname'] to retrieve the var.
-Kevin

- Original Message - 
From: Gary [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 19, 2002 1:54 PM
Subject: [PHP] pass var through URL String


 Hi All,
 Using a link a href=\bla.php?bname=$bname\$bname/a I could pass 
 $bname to another page and using SELECT * FROM table WHERE bname = 
 \$bname\; I could get all I need from the db on the new page. Now 
 that globals have been turned off and superglobals are replacing them. 
 How should I pass and catch the var?
 
 TIA
 Gary
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Click....download and update

2002-09-19 Thread Kevin Stone

Christian,

You'll need to prompt the download by sending the appropriate headers.
Something like..

a href=http://www.mydomain.com/downloadmyfile.phpDownload/a

? // downloadmyfile.php
header(Content-Type: application/zip);
header(Content-Disposition: attachment);
readfile(file.zip);
?

This is untested but from my experience it should work.

Good luck,
Kevin

- Original Message -
From: Christian Ista [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 19, 2002 1:21 PM
Subject: [PHP] Clickdownload and update


 Hello,

 I'd like when I click on a link a href=http://www.website.com/file.zip
 update a table and start the download without change the page.

 Could you tell me how to do ?

 Christian,



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Click....download and update

2002-09-19 Thread Christian Ista

 You'll need to prompt the download by sending the appropriate headers.
 Something like..
 
 a href=http://www.mydomain.com/downloadmyfile.phpDownload/a
 
 ? // downloadmyfile.php
 header(Content-Type: application/zip);
 header(Content-Disposition: attachment);
 readfile(file.zip);
 ?

It's not only .zip file but may be .exe or .rar

That's change something in your code ?

I can put the code to update a database field in the downloadmyfile.php
?


Bye


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Calling on functions in a url

2002-09-19 Thread Tom Ray

I have a question that I have yet to figure out. Let's say I have a PHP 
script with multiple fuctions, how do I call on the script to perfom 
specific functions through a url? Ex: 
http://www.sample.com/script.php?fucntion1

TIA


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Stop PHP from displaying Content-Type info

2002-09-19 Thread [-^-!-%-


I just installed a new PHP server, and forget how to stop it from
displaying the page Content-type info at the top of the page.

Please help.


=P e p i e  D e s i g n s
 www.pepiedesigns.com
 Providing Solutions That Increase Productivity

 Web Developement. Database. Hosting. Multimedia.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] pass var through URL String

2002-09-19 Thread Gary

Tried that already and get an error using $_GET['bname']
  T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or 
T_NUM_STRING

using $_GET[bname] without the quotes
Undefined index: bname

Gary



Kevin Stone wrote:
 Pass the vars the same way.  Use $_GET['bname'] to retrieve the var.
 -Kevin
 
 - Original Message - 
 From: Gary [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, September 19, 2002 1:54 PM
 Subject: [PHP] pass var through URL String
 
 
 
Hi All,
Using a link a href=\bla.php?bname=$bname\$bname/a I could pass 
$bname to another page and using SELECT * FROM table WHERE bname = 
\$bname\; I could get all I need from the db on the new page. Now 
that globals have been turned off and superglobals are replacing them. 
How should I pass and catch the var?

TIA
Gary


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

 
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Calling on functions in a url

2002-09-19 Thread Stefan

http://www.sample.com/script.php?fucntion=1
http://www.sample.com/script.php?fucntion=2
Then do a 'case' or 'if' on $_GET['fucntion']


Tom Ray [EMAIL PROTECTED] skrev i meddelandet
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I have a question that I have yet to figure out. Let's say I have a PHP
 script with multiple fuctions, how do I call on the script to perfom
 specific functions through a url? Ex:
 http://www.sample.com/script.php?fucntion1

 TIA




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Calling on functions in a url

2002-09-19 Thread Peter J. Schoenster

On 19 Sep 2002 at 16:13, Tom Ray wrote:

 I have a question that I have yet to figure out. Let's say I have a PHP
 script with multiple fuctions, how do I call on the script to perfom
 specific functions through a url? Ex:
 http://www.sample.com/script.php?fucntion1

I wouldn't say this is a specific PHP question. True to all web 
languages I now of, and as many responses :)

The quick answer is that most people use a switch statement:

$thefunction_call = 'whatever'

for instance:

switch($thefunction_call) {
case Ask :
$action = 'SeekAnswer';
break;
case SlowSearch :
$action = 'SlowSearch';
break;
case askus :
$action = 'askus';
break;
default :
$action = 'SeekAnswer';
break;
}

But there are other ways, too many other ways :), here is one I'm using 
on a current app:


$fid = get_fid($input);

$input is the get or post input that I run through a processor (check 
for stuff I don't like and return new array).

The following allows me to use the submit field to call different 
functions based upon the value of the submit button. 

function get_fid($input) {
$submit2fid = array(
'Mark done'='markTaskDone',
'Mark dropped'='markTaskDropped',
'Edit'='editTask',
'Update All'='UpdateAllTasks',
);

if(empty($input['fid'])) {
   if(empty($submit2fid[$input['submit']])) {
$fid = 'showAdminPage';
   }else{
$fid = $submit2fid[$input['submit']];
   }
}else{
$fid = $input['fid'];
}
return $fid;
}

so now I have a $fid (function id)

I actually do something bizarre like this:

$app_results = $functions-run($class,$fid);

Function has this:
return call_user_func(array($this-$class,$fid),$this-global);

I'm *trying* to come up with a componentization idea which sounds good 
but is hard to implement and I've yet to see an implemenation that I 
like.

I run an element of $app_results through it's template

$data   =   $app_results[0];
$status =   $app_results[1];
$new_fid=   $app_results[2]; // can be empty

$body_file = $viewer-Merge($data,$template); 
$data['content'] = $body_file;
$html_file = $viewer-Merge($data,'index.html'); 

Now I have just one html file which contains the pieces of my app to 
now be presented to whatever called it (would have different templates 
and the viewer would manipulate the data depending on the  caller). 


Peter


http://www.coremodules.com/
Web Development and Support  at Affordable Prices
901-757-8322[EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] pass var through URL String

2002-09-19 Thread Kevin Stone

There's obviously something wrong with the way you're handeling the new
variable.  Do extract($_GET); and go back to the way you were handeling it
before.

echo $bname;

-Kevin

- Original Message -
From: Gary [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 19, 2002 2:50 PM
Subject: Re: [PHP] pass var through URL String


 Tried that already and get an error using $_GET['bname']
   T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or
 T_NUM_STRING

 using $_GET[bname] without the quotes
 Undefined index: bname

 Gary



 Kevin Stone wrote:
  Pass the vars the same way.  Use $_GET['bname'] to retrieve the var.
  -Kevin
 
  - Original Message -
  From: Gary [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Thursday, September 19, 2002 1:54 PM
  Subject: [PHP] pass var through URL String
 
 
 
 Hi All,
 Using a link a href=\bla.php?bname=$bname\$bname/a I could pass
 $bname to another page and using SELECT * FROM table WHERE bname =
 \$bname\; I could get all I need from the db on the new page. Now
 that globals have been turned off and superglobals are replacing them.
 How should I pass and catch the var?
 
 TIA
 Gary
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] pass var through URL String

2002-09-19 Thread Gary

I don't think it is being passed.  I think I am going to have to figure 
out how to pass bname in the link using pear.With pear   bnname=0

 while ($row = $res-fetchRow()){
 $bname  = $row[0];
 $owner = $row[1];
echo 
lia href=\temp_page.php?bname=$bname\$bname/a by 
$ownerli
;
}

Gary

Kevin Stone wrote:

There's obviously something wrong with the way you're handeling the new
variable.  Do extract($_GET); and go back to the way you were handeling it
before.

echo $bname;

-Kevin

- Original Message -
From: Gary [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 19, 2002 2:50 PM
Subject: Re: [PHP] pass var through URL String


  

Tried that already and get an error using $_GET['bname']
  T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or
T_NUM_STRING

using $_GET[bname] without the quotes
Undefined index: bname

Gary



Kevin Stone wrote:


Pass the vars the same way.  Use $_GET['bname'] to retrieve the var.
-Kevin

- Original Message -
From: Gary [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 19, 2002 1:54 PM
Subject: [PHP] pass var through URL String



  

Hi All,
Using a link  I could pass
$bname to another page and using SELECT * FROM table WHERE bname =
\$bname\; I could get all I need from the db on the new page. Now
that globals have been turned off and superglobals are replacing them.
How should I pass and catch the var?

TIA
Gary


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



  


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





  





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP Execution Timer

2002-09-19 Thread Chris Shiflett

Here is a function I sometimes use to log that will show you the time 
that has passed since the last log entry. I find it very useful, so that 
you can test a section of code's execution time simply by surrounding it 
with calls to this function.

Maybe it will be useful to you.

Chris

function log_message($log_file, $log_message)
{
global $last_log_write;

# SET FORMATTED DATE
$formatted_date=date(Y-m-d H:i:s);

# IF THIS IS THE FIRST LOG MESSAGE
if (!isset($last_log_write))
{
error_log([$formatted_date] [-] 
$log_message\n, 3, $log_file);
$last_log_write=microtime();
$last_log_write=explode( , $last_log_write);
$last_log_write=doubleval($last_log_write[1]) + 
doubleval($last_log_write[0]);
}
# ELSE (THIS IS NOT THE FIRST MESSAGE), CALCULATE TIME SINCE LAST LOG
else
{
$curr_log_write=microtime();
$curr_log_write=explode( , $curr_log_write);
$curr_log_write=doubleval($curr_log_write[1]) + 
doubleval($curr_log_write[0]);
$elapsed_time=$curr_log_write-$last_log_write;
$elapsed_time=substr($elapsed_time, 0, 8);
$log_message=str_replace(\r, , $log_message);
$log_message=str_replace(\n, 
\n  , $log_message);
error_log([$formatted_date] [+$elapsed_time seconds] 
$log_message\n, 3, $log_file);
$last_log_write=$curr_log_write;
}
}
?

-=[ Julien Bonastre ]=- wrote:

The idea is a page execution timer.. or a database query timer.. basically it shows 
you just a time (usually in msecs) it took for the last command to be executed.. I 
have seen it used for queries and it returns the time it took.. And I am quite sure 
I've seen it used for actual page generation as well, whereby it says something like 
page generated in x.xxx secs



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Stop PHP from displaying Content-Type info

2002-09-19 Thread Chris Shiflett

php -q

I just installed a new PHP server, and forget how to stop it from
displaying the page Content-type info at the top of the page.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] session cookies

2002-09-19 Thread Jeff Bluemel


OK guys...

here's my question - I'm using 4.2.3 and apache 1.3.26, and I've got
sessions setup. however, it seems to be using an SID attached to the URL,
and I want to force it to use a cookie that points to a transparent SID on
my system.

I've got the following options in my php.ini, but the system doesn't seem to
ever use a cookie, and the sessions don't die.  (that's my biggest concern
is that the user has to login to the system EVERY time he visits the site.)

session.use_cookies = 1
session.use_only_cookies = 1
session.use_trans_sid = 1





--

Thanks,

Jeff Bluemel



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] session cookies

2002-09-19 Thread Chris Shiflett

Jeff Bluemel wrote:

I want to force it to use a cookie that points to a transparent SID on
my system.


Can you elaborate on this? I have no idea what you mean.

I've got the following options in my php.ini, but the system doesn't seem to
ever use a cookie, and the sessions don't die.  (that's my biggest concern
is that the user has to login to the system EVERY time he visits the site.)

session.use_cookies = 1
session.use_only_cookies = 1
session.use_trans_sid = 1


With use_trans_sid set, PHP is going to append the session ID to the URL 
of links, etc., on:

1) The client's first visit, determined by the fact that the client sent 
no session ID
2) Any other visit where the client sent a session ID on the URL but not 
in a cookie

It sounds to me like either you're only noticing the first case there, 
or your browser is not supplying the cookie on subsequent requests. 
Maybe this bit of information will help you.

Happy hacking.

Chris


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] session cookies

2002-09-19 Thread Chris Shiflett

I also just noticed that you have session.use_only_cookies = 1, so 
unless you get the session ID back in a cookie, the session will restart.

Chris Shiflett wrote:

 I've got the following options in my php.ini, but the system doesn't 
 seem to
 ever use a cookie, and the sessions don't die.  (that's my biggest 
 concern
 is that the user has to login to the system EVERY time he visits the 
 site.)

 session.use_cookies = 1
 session.use_only_cookies = 1
 session.use_trans_sid = 1 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] pass var through URL String

2002-09-19 Thread Gary

I was wrong, it is passing $bname. I have got it down to a syntax error 
by using.
$sql = SELECT * FROM bugs WHERE bname = {$_GET['bname']};

gary

Gary wrote:
 I don't think it is being passed.  I think I am going to have to figure 
 out how to pass bname in the link using pear.With pear   bnname=0
 
 while ($row = $res-fetchRow()){
 $bname  = $row[0];
 $owner = $row[1];
echo 
lia href=\temp_page.php?bname=$bname\$bname/a by 
 $ownerli
;
}
 
 Gary
 
 Kevin Stone wrote:
 
 There's obviously something wrong with the way you're handeling the new
 variable.  Do extract($_GET); and go back to the way you were 
 handeling it
 before.

 echo $bname;

 -Kevin




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] PHP Execution Timer

2002-09-19 Thread Beau Hartshorne

This function:

function getmicrotime()
{
list($usec, $sec) = explode( ,microtime()); 
return ((float)$usec + (float)$sec); 
}

is provided on this page:

http://www.php.net/manual/en/function.microtime.php

and is needed for the code below to work properly.

Beau 

 ?
 $timerOn = 1; // set to 0 if you want to turn it off $timestart = 
 getmicrotime(); ?
 
 
 Bottom:
 
 ?
 if($timerOn)
 {
 $timeend = getmicrotime();
 $timer = $timeend - $timestart;
 echo timer: $timer;
 }
 ?
 
 Similar things could be done with MySQL quereies, but I haven't looked

 into it.
 
 
 Justin French
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Stripping specific tags

2002-09-19 Thread John Holmes

 I was wondering is there a way to strip ONLY the tags that you specify
 from
 a page, rather than having to include all the tags you do want (using
 strip_tags() )

A regular expression or str_replace() would be best for this. 

Realize this isn't a good method, though. What if you're trying to strip
images with an img tag, but a new spec comes out that allows image
tags. Now you're not protected against it. That's a simple example, but
it's a better policy to say X is good and allow it through, rather than
to say, I know Y is bad, but I'll let everything else through and assume
it's good.

---John Holmes...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Loop through POST-result

2002-09-19 Thread John Holmes

 I would like to get all the data from a POST-result into an array.
 
 Is there a function like that adds all the vars from the post into an
 array
 where Key is the name of the form-field and Value is the value entered
in
 this field.
 
 Like this:
 array('firstname' = 'fname', 'lastname' = 'lname');

Are you serious?

Take a look at the $HTTP_POST_VAR or $_POST array, which, amazingly, is
an array that holds your form data, with the key is the name of the form
field and the value is the value of the form element

---John Holmes...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] php_mcrypt library

2002-09-19 Thread [-^-!-%-


I've looking for pre-built php_mcrypt library. Does anyone know where I
can get one. I'm basically looking for something that would not require
me to reload or recompile php [shared hosting issues...].

The environment is : PHP 4.1.2/Linux /Apache 1.3.26.

Any help would be greatly appreciated.

=P e p i e  D e s i g n s
 www.pepiedesigns.com
 Providing Solutions That Increase Productivity

 Web Developement. Database. Hosting. Multimedia.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




  1   2   >