Re: [PHP] Grep Challenge 2001

2001-08-23 Thread Andrey Hristov
Try /!--begin variable:?([\w\s]*?)--([\w\s]*?)/m the ? will force PCRE to not be *greedy*. Look in the manual of PCRE for syntaxis. Andrey Hristov IcyGEN Corporation http://www.icygen.com 99% - Original Message - From: Sondra Russell [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent

Re: [PHP] constant arrays or something like #define in c

2001-08-23 Thread Andrey Hristov
Ok, the solution is : in script1.php define(ARRAY_NAME,array1); in script2.php define(ARRAY_NAME,array2); in template.php: ${ARRAY_NAME}['some_index'] I didn't tested this but think that it will work. If not post a message to think for other way. Andrey Hristov IcyGEN Corporation http

Re: [PHP] Re: conf file access on host server

2001-08-23 Thread Andrey Hristov
Many conf variables can be setup at runtime. Just include(require) in every script setup.php Andrey Hristov IcyGEN Corporation http://www.icygen.com 99% - Original Message - From: Diane Mulberry [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 23, 2001 7:12 PM Subject: [PHP

Re: [PHP] Getting MySQL Query Times.

2001-08-23 Thread Andrey Hristov
; I've copied from working code of a class. But the idea is clear.This way is better than time() solutuion because with microtime() you get microseconds. But have in mind that on windows there are some problems with microtime() and the reported time can be negative. Andrey Hristov IcyGEN

Re: [PHP] Getting MySQL Query Times.

2001-08-23 Thread Andrey Hristov
but the idea is clear; Andrey Hristov IcyGEN Corporation http://www.icygen.com 99% - Original Message - From: Nathan Cook [EMAIL PROTECTED] To: [EMAIL PROTECTED]; Gabe da Silveira [EMAIL PROTECTED] Sent: Thursday, August 23, 2001 7:57 PM Subject: Re: [PHP] Getting MySQL Query Times. IMO

Re: [PHP] convert 12:12:00 to seconds

2001-08-22 Thread Andrey Hristov
Use gmmktime() or mktime() example : ?php echo gmmktime(12,12,0,1,1,1970); // format(hour,minute,second,month,day,year) // counting starts from 1/1/1970 so if you set this day you will receive the secongs // gmmktime accoring GMT or mktime() accoring you local time (mine is GMT+3) // so 12:12:00

Re: [PHP] Web fetching script

2001-08-22 Thread Andrey Hristov
Try this: http://www.php.net/manual/en/ref.curl.php - Original Message - From: Ben Quinn [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 22, 2001 2:35 PM Subject: [PHP] Web fetching script Hi all I have a web fetching script that fetches text from an external URL

Re: [PHP] Cannot get uploaded file by PUT request vith PHP4 and Apache1.3

2001-08-22 Thread Andrey Hristov
form ENCTYPE=multipart/form-data method=post name=form action=?php echo $PHP_SELF;? input type=file name=new_file class=textfield /form -=-=-=-=-=-=-=-=-=- ?php var_dump($HTTP_POST_FILES);? or: ?php if (preg_match('/(http:\/\/.*)/', $HTTP_POST_FILES['new_file']['name'], $matches)){ echo

Re: [PHP] php-counter

2001-08-22 Thread Andrey Hristov
) . VALUES($webpage_id,'.$client-platform.','.$client-browser. .$client-major...$client-minor.',. $screen_width, $screen_height, $screen_color, 1);; db_exec($insert_sql); } } ? Andrey Hristov IcyGEN Corporation http://www.icygen.com 99% - Original Message - From: Gert Mellak

[PHP] PHP_Commander

2001-08-21 Thread Andrey Hristov
Hope this will help. Some code is grabbed from the PHP's quickref. ?php var_dump($HTTP_POST_VARS); if (@!$HTTP_POST_VARS['dir']) $HTTP_POST_VARS['dir']='./'; if (is_dir($HTTP_POST_VARS['dir'])){ echo 'form method=post action='.$PHP_SELF.' name=ok'; echo input type='hidden' name='dir'

<    1   2   3   4