[PHP] Re: imap_mail_move and imap_mail_copy

2002-07-18 Thread val petruchek

 Has anyone had experience with imap_mail_move or imap_mail_copy?

 Can they copy or move a message from one mail server to another or only
 into a subfolder on the same server?

Same server - it has parameter $imapcon which can be assumed as
connection to one server only.

Imap functions is just interface for IMAP protocol.

--
Sincerely, val petruchek



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




[PHP] Re: CRON JOB

2002-07-17 Thread val petruchek

*/1 * * * * val /usr/local/bin/lynx -source
http://php.net/crontab/steward.php
- example of how to call script every minute

--
Sincerely, val petruchek
Maas [EMAIL PROTECTED] ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ:
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 What do I have to do before I can run my file.php as a cron job in Linux?






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




[PHP] win32 mail()

2002-07-17 Thread val petruchek

don't be afraid - it works perfect.

i mean mail() on win32 server

my question is - how to set up SMTP
authorization in php ini
(if smtp server requires pop auth)

is it possible or should i use direct smtp
connection?

--
Sincerely, val petruchek



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




Re: [PHP] win32 mail()

2002-07-17 Thread val petruchek

 Have a look the the Pear mail.php or google for php smtp auth

already done, but i've my own smtp class anyway.

i hoped to avoid rewriting code which used mail().

thanks

--
Sincerely, val petruchek
Jason Wong [EMAIL PROTECTED] ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ
ÓÌÅÄÕÀÝÅÅ: [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...



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




[PHP] Re: how to know upload progress status

2002-07-11 Thread val petruchek

 I don't know how to extract informations about upload progress status and
how
 to show informations to users. For example I want the users can see 30% of
 upload completed, or the MByte just uploaded.

It's impossible.

PHP script starts when file is 100% uploaded on the server.

--
Sincerely, val petruchek



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




[PHP] Re: [OFF] Expiration Page

2002-07-05 Thread val petruchek

FROM THE MANUAL:

header(Expires: Mon, 26 Jul 1997 05:00:00 GMT);// Date in the past
header(Last-Modified:  . gmdate(D, d M Y H:i:s) .  GMT);
 // always modified
header(Cache-Control: no-store, no-cache, must-revalidate);  // HTTP/1.1
header(Cache-Control: post-check=0, pre-check=0, false);
header(Pragma: no-cache);  // HTTP/1.0



--
Sincerely, val petruchek
Skyhawk [EMAIL PROTECTED] ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ:
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Please, How do I make for my webpage expires before time?

 Thanks

 I'm sorry my english, I'm brazilian.







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




[PHP] Re: upload file size

2002-07-05 Thread val petruchek

Check Apache limitations

--
Sincerely, val petruchek
Norman Zhang [EMAIL PROTECTED] ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ
ÓÌÅÄÕÀÝÅÅ: [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,

 I can't seem to upload file bigger than 5M even if I set the
 upload_max_filesize to 20M in php.ini and MAX_FILE_SIZE to 20M in the
 script. What's am I missing here? Is the temporary upload directory won't
 handle file this size? Please give me some pointers here. TIA.

 Regards,
 Norman





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




[PHP] autoresponder

2002-07-05 Thread val petruchek

I receive this sh!t everytime i post message here.
Can we get him out of the list?


 Hello,



 I will be on vacation from 07/08/02 till 07/19/02 . If you need assistance
with your website, please contact either Chris : [EMAIL PROTECTED] or
Dave : [EMAIL PROTECTED]



 Best Regards,

 -
 Victor Polyushko /  Web Engineer
 Great Basin Web Design
 [EMAIL PROTECTED]
 www.gbiswebdesign.com
 voice: 775.348.7299
 -





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




[PHP] Re: Nothing will execute after calling imagejpeg.

2002-07-04 Thread val petruchek

 This thread has been up before, but there was never sent a reply to it,
 and I'm having the same problem…

Just idea.

If you doesn't have GD installed and php error reporting turned off
this situation is possible.

In other words php simply dies because of undeclared function and
doesn't report about error.

Maybe this helps

--
Sincerely, val petruchek




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




[PHP] Re: returning more than 1 value from function

2002-07-04 Thread val petruchek

If you don't like arrays you can use objects:

function multireturn()
{
$result-first = Ticket #1;
$result-second = Ticket #2;

return $result;
}

--
Sincerely, val petruchek
Andy [EMAIL PROTECTED] ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ:
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 hi there,

 i am wondering if it is possible to return more than 1 value from a
 function?

 something like

 test(){
 return $value1, $value2
 }

 Thanx for any help,

 Andy





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




[PHP] revecom + php

2002-07-03 Thread val petruchek

Hi again, php gurus!

Does anyone of you have any experience working with revecom rfom php script?

Will be grateful for any comments and links to articles of the subject

--
Sincerely, val petruchek
http://val.zp.ua



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




[PHP] Re: adding a variable to a variable name

2002-07-03 Thread val petruchek

check for eval function

--
Sincerely, val petruchek
Tom Beidler [EMAIL PROTECTED] ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ
ÓÌÅÄÕÀÝÅÅ: [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I'm wondering if this can be done, and if so, what's the proper way to do
 it.

 For the current issue I'm trying to unset some variables with common names
 and I would like to step through them with a loop. Here's where I'm at to
 give you an idea but the code doesn't work.

 for ($i = 2; $i = 4; $i++) {
 unset($level$iName);
 unset($level$iUrl);
 }

 so the code unsets

 unset($level2Name);
 unset($level2Url);
 unset($level3Name);
 unset($level3Url);
 unset($level4Name);
 unset($level4Url);

 I guess I could create a variable before the unset like so

 $unsetA = level . $i . Name;

 but that seems cloogey.

 Thanks,
 Tom




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




Re: [PHP] last char in string?

2002-02-14 Thread val petruchek

$s = substr($s,0,strlen($s)-1);

Valentin Petruchek (aki Zliy Pes)
*** Cut the beginning ***
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]
- Original Message -
From: marcbey [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 14, 2002 1:48 PM
Subject: [PHP] last char in string?


 hello php guys,

 how can i delete the last char in a string?

 thanx


 --
 ---
 magic garden GmbH - Agentur für Informationsarchitektur

 Hermannstr. 15 - 70178 Stuttgart (Am Feuersee)

 www.magic-garden.de ¦ [EMAIL PROTECTED]

 Tel. (07 11) 619 57-42 ¦ Fax (07 11) 615 01 38




 --
 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] testing

2002-02-14 Thread val petruchek

test msg pls ignore




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




Re: [PHP] MsSQL PASSWORD()

2002-02-13 Thread val petruchek

Works! Great! Nobody (even me!) can not understand user passwords! Thanx!

Valentin Petruchek (aki Zliy Pes)
*** Cut the beginning ***
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]
- Original Message -
From: Michael Sims [EMAIL PROTECTED]
To: PHP [EMAIL PROTECTED]
Sent: Tuesday, February 12, 2002 3:06 PM
Subject: Re: [PHP] MsSQL PASSWORD()


 At 09:26 AM 2/12/2002 +0200, val petruchek wrote:
 My current project runs on Win2k, MsSQL 2k, and PHP 4.0.6
 
 My problem is that i can not enable md5 extension because of
 Unable to load dynamic library
'c:\windows\php\extensions/php_mcrypt.dll' -
 The specified procedure could not be found. in Unknown on line 0

 You don't have to load the mcrypt extension to use md5(), they are two
 seperate things.  m5() is a function built in to PHP.  Mcrypt is used when
 you want to encrypt something and then later decrypt it, where md5() is a
 one-way crypt...once you have hashed something with md5() it is impossible
 to retrieve the original string from the hash...


 --
 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] printing files

2002-02-13 Thread val petruchek

$data = file ($certain_file);
echo {$data[0]}\n;
echo {$data[3]}\n;
echo {$data[7]}\n;

Valentin Petruchek (aki Zliy Pes)
*** Cut the beginning ***
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]
- Original Message -
From: John Gurley [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 13, 2002 1:55 PM
Subject: [PHP] printing files


 Just a quick question,
 is there a way to echo in your php code lines of a file that you specify.
 i.e. you want to output lines 1,4,7 of a certain text file
 Thanks
 John



 _
 Join the world’s largest e-mail service with MSN Hotmail.
 http://www.hotmail.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




Re: [PHP] Printing files

2002-02-13 Thread val petruchek

$data = file ($certain_file);
echo {$data[0]}\n;
echo {$data[3]}\n;
echo {$data[7]}\n;

Valentin Petruchek (aki Zliy Pes)
*** Cut the beginning ***
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]
- Original Message -
From: John Gurley [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 13, 2002 1:55 PM
Subject: [PHP] printing files


 Just a quick question,
 is there a way to echo in your php code lines of a file that you specify.
 i.e. you want to output lines 1,4,7 of a certain text file
 Thanks
 John



 _
 Join the world’s largest e-mail service with MSN Hotmail.
 http://www.hotmail.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




Re: [PHP] Re-Importing .CSV file into Database

2002-02-13 Thread val petruchek

 Hi Rick,

 Thanks for the support!
 This is the mySQL Table Structure :

 $sql = CREATE table fanlist_try (ID bigint(21) NOT
 NULL auto_increment, name varchar(50), email
 varchar(70), age int(10), sex varchar(20), country
 varchar(50), PRIMARY KEY (ID));

sex varchar(20) sounds great. why do not use enum('male','female')? or sex
has infinite set of possible values?


Valentin Petruchek (aki Zliy Pes)
*** Cut the beginning ***
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]




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




Re: [PHP] Re-Importing .CSV file into Database

2002-02-13 Thread val petruchek

Enum is not a function; it's a mysql data type. It's very useful when field
values are from the finite set.

Examples

CREATE table fanlist_try (ID bigint(21)
NOT NULL auto_increment, name varchar(50), email
varchar(70), age int(10), sex enum('male','female'), country
varchar(50), PRIMARY KEY (ID))

and field sex now can have only 2 values - 'male' and 'female'

the main reason to use it (instead of MySQL) is speed. The next one could be
data correctness

Valentin Petruchek (aki Zliy Pes)
*** Cut the beginning ***
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]
- Original Message -
From: Thomas Edison Jr. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, February 13, 2002 7:36 PM
Subject: Re: [PHP] Re-Importing .CSV file into Database


 Val,

 quite frankly, i'm not quite sure i know what you're
 talking about. i don't think i know enum() function!!

 T. Edison jr.

 --- val petruchek [EMAIL PROTECTED] wrote:
   Hi Rick,
  
   Thanks for the support!
   This is the mySQL Table Structure :
  
   $sql = CREATE table fanlist_try (ID bigint(21)
  NOT
   NULL auto_increment, name varchar(50), email
   varchar(70), age int(10), sex varchar(20), country
   varchar(50), PRIMARY KEY (ID));
 
  sex varchar(20) sounds great. why do not use
  enum('male','female')? or sex
  has infinite set of possible values?
 
 
  Valentin Petruchek (aki Zliy Pes)
  *** Cut the beginning ***
  http://zliypes.com.ua
  mailto:[EMAIL PROTECTED]
 
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 


 =
 Rahul S. Johari (Director)
 **
 Abraxas Technologies Inc.
 Homepage : http://www.abraxastech.com
 Email : [EMAIL PROTECTED]
 Tel : 91-4546512/4522124
 ***

 __
 Do You Yahoo!?
 Send FREE Valentine eCards with Yahoo! Greetings!
 http://greetings.yahoo.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




Re: [PHP] Re-Importing .CSV file into Database

2002-02-13 Thread val petruchek

 Enum is not a function; it's a mysql data type. It's very useful when
field
 values are from the finite set.

 Examples

 CREATE table fanlist_try (ID bigint(21)
 NOT NULL auto_increment, name varchar(50), email
 varchar(70), age int(10), sex enum('male','female'), country
 varchar(50), PRIMARY KEY (ID))

 and field sex now can have only 2 values - 'male' and 'female'

 instead of VARCHAR - sorry!
 the main reason to use it (instead of MySQL) is speed. The next one could
be
 data correctness
!

 Valentin Petruchek (aki Zliy Pes)
 *** Cut the beginning ***
 http://zliypes.com.ua
 mailto:[EMAIL PROTECTED]
 - Original Message -
 From: Thomas Edison Jr. [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Wednesday, February 13, 2002 7:36 PM
 Subject: Re: [PHP] Re-Importing .CSV file into Database


  Val,
 
  quite frankly, i'm not quite sure i know what you're
  talking about. i don't think i know enum() function!!
 
  T. Edison jr.
 
  --- val petruchek [EMAIL PROTECTED] wrote:
Hi Rick,
   
Thanks for the support!
This is the mySQL Table Structure :
   
$sql = CREATE table fanlist_try (ID bigint(21)
   NOT
NULL auto_increment, name varchar(50), email
varchar(70), age int(10), sex varchar(20), country
varchar(50), PRIMARY KEY (ID));
  
   sex varchar(20) sounds great. why do not use
   enum('male','female')? or sex
   has infinite set of possible values?
  
  
   Valentin Petruchek (aki Zliy Pes)
   *** Cut the beginning ***
   http://zliypes.com.ua
   mailto:[EMAIL PROTECTED]
  
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
 
 
  =
  Rahul S. Johari (Director)
  **
  Abraxas Technologies Inc.
  Homepage : http://www.abraxastech.com
  Email : [EMAIL PROTECTED]
  Tel : 91-4546512/4522124
  ***
 
  __
  Do You Yahoo!?
  Send FREE Valentine eCards with Yahoo! Greetings!
  http://greetings.yahoo.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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] ODBC_EXECUTE has a DANGEROUS 'feature'!!!

2002-02-12 Thread val petruchek

IMHO escribed feature is not a bug.
most probably this 'bug' is a special hole just in case.

Valentin Petruchek (aki Zliy Pes)
*** Cut the beginning ***
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]
- Original Message -
From: Lars Torben Wilson [EMAIL PROTECTED]
To: Jerry Verhoef (UGBI) [EMAIL PROTECTED]
Cc: PHP General Mailinglist [EMAIL PROTECTED]
Sent: Tuesday, February 12, 2002 12:20 PM
Subject: RE: [PHP] ODBC_EXECUTE has a DANGEROUS 'feature'!!!


 On Mon, 2002-02-11 at 06:46, Jerry Verhoef (UGBI) wrote:
  I think you all are missing the point that *RzE is making.
 
  The software you use/create should be bugfree and free from undocumented
  features. Otherwise security risks could occur. And ofcourse all other

 In a perfect world, yes. However, no software is ever bug-free, and when
 software is constantly evolving, it will always have features which are
 not documented, bugs which are not listed, and so on. That's reality,
 and it's reality for every software project out there. Otherwise we'd
 just release v1.0 and be done with it. :)

 Anyone is welcome to apply for a cvs account and help out, of course.

  safe-guard (like checking input, correct rights on the FileSystem)
should be
  placed too.
 
  It is bugs like these who create life for Hackers and viruses (like
nimda).
  Of course you can say that is the users own fault. But it is the
developers
  duty to inform and advise users, and not to look the other way in the
hope
  that it goes away.
 
  Jerry

 I don't recall saying that this shouldn't be documented.


 --
  Torben Wilson [EMAIL PROTECTED]
  http://www.thebuttlesschaps.com
  http://www.hybrid17.com
  http://www.inflatableeye.com
  +1.604.709.0506


 --
 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] ereg-digits only...

2002-02-12 Thread val petruchek

if ((int($string)==($string))  ($string0)) {then positive integer}

not sure exactly, but try

Valentin Petruchek (aki Zliy Pes)
*** Cut the beginning ***
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]
- Original Message -
From: B. Verbeek [EMAIL PROTECTED]
To: Php-Db-Help (E-mail) [EMAIL PROTECTED]; Php-General (E-mail)
[EMAIL PROTECTED]
Sent: Tuesday, February 12, 2002 1:04 PM
Subject: [PHP] ereg-digits only...



 How do I check a string for it to only contain numbers?

 

   if(!ereg(([0-9]+),$string)){

 print It contains characters other than numbers;

   }else{

 print Only numbers;

   }

 

 Can anyone give some feedback...

 regards,
 Bart



 --
 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] ereg-digits only...

2002-02-12 Thread val petruchek

as a said before i'm not sure; my idea was to use type casting instead of
eregi;
anyone can develop it into smart solution; i am out of time now for this
developing
so can suggest idea only

Valentin Petruchek (aki Zliy Pes)
*** cUT THE BEGINNING ***
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]
- Original Message -
From: Daniel Kushner [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: PHP [EMAIL PROTECTED]
Sent: Tuesday, February 12, 2002 4:00 PM
Subject: RE: [PHP] ereg-digits only...


 That wouldn't work!
 1) You meant to write: if (((int)$string==$string)  ($string0))

 2) (int)'5a' == 5, so this formula would result is 5a == 5!

 --Daniel


  -Original Message-
  From: val petruchek [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, February 12, 2002 6:22 AM
  To: [EMAIL PROTECTED]
  Cc: PHP
  Subject: Re: [PHP] ereg-digits only...
 
 
  if ((int($string)==($string))  ($string0)) {then positive integer}
 
  not sure exactly, but try
 
  Valentin Petruchek (aki Zliy Pes)
  *** Cut the beginning ***
  http://zliypes.com.ua
  mailto:[EMAIL PROTECTED]
  - Original Message -
  From: B. Verbeek [EMAIL PROTECTED]
  To: Php-Db-Help (E-mail) [EMAIL PROTECTED]; Php-General
(E-mail)
  [EMAIL PROTECTED]
  Sent: Tuesday, February 12, 2002 1:04 PM
  Subject: [PHP] ereg-digits only...
 
 
  
   How do I check a string for it to only contain numbers?
  
   
  
 if(!ereg(([0-9]+),$string)){
  
   print It contains characters other than numbers;
  
 }else{
  
   print Only numbers;
  
 }
  
   
  
   Can anyone give some feedback...
  
   regards,
   Bart
  
  
  
   --
   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





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




Re: [PHP] Re: Implement @-domains with PHP?

2002-02-12 Thread val petruchek

Call phpinfo() and search for necessery variable ($SERVER_NAME maybe)
Valentin Petruchek (aki Zliy Pes)
*** Cut the beginning***
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]
- Original Message -
From: Christian Blichmann [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, February 12, 2002 9:06 PM
Subject: Re: [PHP] Re: Implement @-domains with PHP?


 Peter Janett [EMAIL PROTECTED] wrote in message
 022101c1b3ef$809cf450$4de70142@peters">news:022101c1b3ef$809cf450$4de70142@peters...
  $what_you_want = $HTTP_HOST . $REQUEST_URI;

 Well, thanks - but it didn't work for me (don't have the $REQUEST_URI
 variable
 set)...
 btw, my setup is: PHP 4.0.1 with IIS 5.0 running as ISAPI on Win2k.
 And: doesn't work with PHP installed as a CGI module, too.


 --
 Christian

 _
 don't hesitate - email me with your thoughts:
 e-mail: [EMAIL PROTECTED]
  - please remove the .nospam from address.
 _
 do you want to know more?
 web:http://www.blichmann.de



 --
 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] how can i pass a javascript variable into a PHP variable?

2002-02-11 Thread val petruchek

You can add hidden field in form and before posting set it value to js
variable value that can be easily used by PHP script

Valentin Petruchek (aki Zliy Pes)
*** Cut the beginning ***
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]




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




Re: [PHP] help - to get client IP

2002-02-11 Thread val petruchek

$remote_addr returns exactly client ip; but if user is behind proxy then
$remote_addr will return you proxy ip and you can do nothing with it

Valentin Petruchek (aki Zliy Pes)
*** Cut the beginning ***
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]





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




Re: [PHP] MsSQL PASSWORD()

2002-02-11 Thread val petruchek

My current project runs on Win2k, MsSQL 2k, and PHP 4.0.6

My problem is that i can not enable md5 extension because of
Unable to load dynamic library 'c:\windows\php\extensions/php_mcrypt.dll' -
The specified procedure could not be found. in Unknown on line 0

So,...

Valentin Petruchek (aki Zliy Pes)
*** Cut the beginning ***
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]
- Original Message -
From: Michael Sims [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, February 12, 2002 2:29 AM
Subject: Re: [PHP] MsSQL PASSWORD()


 At 06:34 PM 2/11/2002 +0200, val petruchek wrote:
 Hello, list!
 
 I'm looking for analog of Mysql password() func in MsSQL. My goal is not
to
 store certain field (i.e. user passwords) as a clear text.

 I don't know the equivalent off the top of my head, but a coworker of mine
 has used it before.  Let me know if no one gets back to you and I'll ask
 him what it is.  I do remember that he said it was unsupported and
 undocumented, at least in SQL Server 7.

 Alternatively you can do what I do and use the PHP md5() to hash the
 password before you store it, and then md5() any supplied password and
 compare it against the stored hash.  In other words, you can accomplish
the
 exact same thing that MySQL does, only you do it in PHP and not MySQL...


 --
 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] Help with query

2002-02-09 Thread val petruchek

 Hi,

 i can?t seem to get my head to wake up...

 How would i do to count how many different values that exists in a mysql
 field? Ie i have a date-field and need to know how many different dates
that
 exists in the table.

select count(distinct name) from site; in Mysql

Valentin Petruchek (aki Zliy Pes)
*** Cut the beginning ***
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]






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




Re: [PHP] One more quickie

2002-02-09 Thread val petruchek

 Don?t really want to bother you with these quickies - but:

 If i have a result from mysql that is a date (2002-02-09) - how do i
change
 that into a variable with only the first 7 characters (2002-02)?


SELECT year(data), month (data) from table;

Valentin Petruchek (aki Zliy Pes)
*** Cut the beginning ***
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]





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




Re: [PHP] How to Configure the MySql Database?

2002-02-07 Thread val petruchek

USE MANUAL!

I don't know to configure MySql Database On Apache Server in Windows System.
What I must do? (step by step)





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




Re: [PHP] show something

2002-02-06 Thread val petruchek

Thanks! Exactly what i need! Thanks a lot!
 By default, PHP's output is buffered.

 To disable output buffering use

 ob_implicit_flush();

 somewhere in your script.

 This flushes previous output to the client and disables buffering.

 For more info look at the manual's chapter on 'Output buffering'.

 bvr.


Valentin Petruchek (aki Zliy Pes)
*** Cut the beginning ***
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]




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




Re: [PHP] Array length

2002-02-06 Thread val petruchek

count($array)


Valentin Petruchek (aki Zliy Pes)
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]
- Original Message -
From: David Orn Johannsson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 06, 2002 1:50 PM
Subject: [PHP] Array length


Isin't there a function to determine the length of an array? I can't
seem to find it in the manual

 http://www.atom.is/ 
Davíð Örn Jóhannssson
Vefforritari

Atómstöðin hf.
Garðastræti 37
101 Reykjavík

sími: 595-3643
fax: 595-3649
 mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]
 http://www.atom.is/ http://www.atom.is







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




Re: [PHP] Is this possible?

2002-02-06 Thread val petruchek

Let prices(id,price etc.) be table of prices, products(NUM,name etc).

Try smth like this:

SELECT DISTINCT * FROM PRODUCTS P, PRICES P1, PRICES P2
WHERE P.NUM=P1.ID AND P.NUM=P2.ID AND P1.SIZE=SIZE1 AND P2.SIZE=P2


Valentin Petruchek (aki Zliy Pes)
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]
- Original Message -
From: Raymond Lilleodegard [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 06, 2002 7:16 PM
Subject: [PHP] Is this possible?


 Hi!

 I have this tricky case, at lest for me : )

 I'm trying to get some data out of two tables and listing the data in a
 product/price site. But. :

 I have one table with productinfo and one with prices.
 And it is several columns with the same id in the pricetable, because
every
 product have several sizes.

 So... how do I get only one row from the product table and two rows from
 the price table in one line in a page?
 Is it possible?



 Best regards

 Raymond



 --
 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] function to post data

2002-02-06 Thread val petruchek

Or use such method:
1. create form with $PHP_SELF as action
2. in the beginning of php script check if form was posted and if was check
it for correctness
3. if form is ok, save post data and then redirect user with Header(to
certain page)
4. if form is bad, stay at this script and display both: error messages and
form fields

hope that helps; at least it helped me greatly, especially in saving my time

Valentin Petruchek (aki Zliy Pes)
*** Cut the beginning ***
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]
- Original Message -
From: Lars Torben Wilson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, February 07, 2002 6:06 AM
Subject: Re: [PHP] function to post data


 On Wed, 2002-02-06 at 19:32, obo wrote:
  is there a command in php to post form data to a script?
 
  example:
 
  i have a form. once the submit is hit i use php to check the values. if
  the values are ok i then call a function
  to post the data.
 
  thanks.

 This is a fairly common request. Your best bets are to search for
 'posttohost' in the mailing list archives, or just use cURL:

   http://www.php.net/curl

 ...which will more than likely satisfy any posting cravings you
 may have. :)


 Torben

 --
  Torben Wilson [EMAIL PROTECTED]
  http://www.thebuttlesschaps.com
  http://www.hybrid17.com
  http://www.inflatableeye.com
  +1.604.709.0506


 --
 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] Re: Tricky array question

2002-02-05 Thread val petruchek

Hello!

a have following mysql problem:
i need to execute several inserts at one query like this-

$sql-action(insert into words(word) values ('php');
insert into words(word) values ('general');
insert into words(word) values ('list'););

The word fild is unique

My problem is: when certain word (e.g. 'php') already exists in table words
all the query fails

I do not want to check every word on existance and then insert only new
words.

I want mysql to ignore fails. How can i do it?

Thanx

Valentin Petruchek (aki Zliy Pes)
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]




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




[PHP] mysql fails

2002-02-05 Thread val petruchek

Sorry, incorrect subj!
Hello!

a have following mysql problem:
i need to execute several inserts at one query like this-

$sql-action(insert into words(word) values ('php');
insert into words(word) values ('general');
insert into words(word) values ('list'););

The word fild is unique

My problem is: when certain word (e.g. 'php') already exists in table words
all the query fails

I do not want to check every word on existance and then insert only new
words.

I want mysql to ignore fails. How can i do it?

Thanx

Valentin Petruchek (aki Zliy Pes)
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]






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




Re: [PHP] mysql fails

2002-02-05 Thread val petruchek

 Suppress the error message:
 $result = @mysql_query(sql statement,$db);

DL Neil, thank you: INSERT IGNORE is exactly what i need. You helped me
greatly!

Matt, thaks you for help too, but my non-perfect english doesn't allow me to
express my thoughts correctly.

Thanks!

Valentin Petruchek (aki Zliy Pes)
*** Cut the beginning ***
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]




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




[PHP] show something

2002-02-05 Thread val petruchek

Hello, list!

I've php script that works for seveeral minutes (3-5) - it indexes my site
and when page is indexed it echoes a one-row table (page bla.bla.bla
indexed). But browser shows it only when it gets all the page.

I want it to show line by line... I know it can be done in perl
(www.tracert.com)

How can this be done in php: sending to a browser parts of html generated?

Valentin Petruchek (aki Zliy Pes)
*** Cut the beginning ***
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]




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




[PHP] tab inserting tab

2002-02-04 Thread val petruchek

Hello, list!

I have textarea in my page and want it to insert \tabs when clicking Tab
instead of focusing on the next control element. Any thoughts or
suggestions?

Thanks

Valentin Petruchek (aki Zliy Pes)
*** Cut the beginning ***
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]




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




[PHP] script running under certain user

2002-02-02 Thread val petruchek

Hello, php-world!

I know my question a little offtopic;), but:

we have apache running under user nobody.

now we want to change this user to another one on certain folder.
We want php to run under this new user.

We cannot change set httpd.conf to do it.

can anyone give an example of such solution?

Thanks

Valentin Petruchek (aki Zliy Pes)
*** Cut the beginning ***
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Parsing commands to a program

2002-02-02 Thread val petruchek

 Hello,

 I was wondering, how would I pass commands to a program and print the
 results on my screen?
 For instance, to add an FTP user the command would be:
 pure-pw useradd joeblow -u ftpuser -d /home/joeblow
 How would I make a php script do that and display it's output when it's
 done?



Try
?php
echo `pure-pw useradd joeblow -u ftpuser -d /home/joeblow`; //not quotes by
ticks!
?

but not sure about security allows u to do it

Valentin Petruchek (aki Zliy Pes)
Cut the beginning
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] What is ? Mean in the Action Box

2002-01-31 Thread val petruchek

 Dear all
 I had open a webpage which design from my company's pervious staff!
 This page is a input form, and when i look at the properity of the Form i
 saw this:

 form name=o_form action=deposit_admin.php?save=yes method=post

 What is the ? mean in the Action part?



after ? goes the list of parameters deposit_admin.php will get as variables
($yes or $HTTP_GET_VARS[yes])

Valentin Petruchek (aki Zliy Pes)
*** Cut the beginning ***
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] echo HTML code ;

2002-01-31 Thread val petruchek

 ok.. well an echo goes
 echo what u want to echo;
 so u would do it this way

 echo html code.. making sure u dont use a  in any of ur html code;
 php stuff
 echo $phpvariable br  more html code.. if u want to use a  use a '
 instead.;
 more php stuff.


If u want to use  use \ instead...

 if u want to use a  use a '
sounds like: if u want an apple, eat an orange...

Valentin Petruchek (aki Zliy Pes)
*** cut the beginning ***
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] File Manager

2002-01-31 Thread val petruchek

Hello, php-world!

I'm developing web-based file manager and need to call unlink(), copy(),
mkdir().
May be you've already guessed that i failed with them because of Permission
denied.

How can i avoid this? Maybe using `command line` and logging in before
calling funcs.

I'm using php 4.1.0 on FreeBsd 4.x.

.htacess solution doen't suit because of unavailable sysadmin.
Please help

Valentin Petruchek (aki Zliy Pes)
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP and listbox multiple selections

2002-01-31 Thread val petruchek


 Hello to everyone

 Problem :

 A php form  contains a listbox  (named foolist) with n Items which can be
 multiple selected and form posted to
 results.php how can results.php determine which items were selected in
order
 to add all the items in a Mysql table ???

 thanks in advance for any suggestion
 and excuse my bad english knowledge :-))



Pretty english ;)

Rename it to foolist[] and when posted look at array $foolist.


Valentin Petruchek (aki Zliy Pes)
*** Cut the beginning ***
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] mailing to 19000 users

2002-01-29 Thread val petruchek

 How about creating a mailing list will 19000 users and
 then using the mail() function to send mail to that
 list. so that you will not have to loop through.

The main disadvantage (not sure of such long $to) is that EVERY user will
receive e-mail's of others.


Valentin Petruchek (aki Zliy Pes)
*** Cut the beginning ***
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Creating a pdf document

2002-01-24 Thread val petruchek

http://www.php.net/manual/en/ref.com.php

Valentin Petruchek (aki Zliy Pes)
*** ??? ?? ***
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]
- Original Message -
From: Mihail Bota [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, January 24, 2002 9:52 AM
Subject: [PHP] Creating a pdf document


 Hello,

 I was wondering if I could save the result of a query in a pdf document. I
 looked for any functions that might help, but I got confused because I
 could not see how/where exactly to insert the necessary .dll's. I'd like
 to do this (saving the output of a query) by using mysql installed on a
 Irix machine, and PHP4.
 If this is not possible, could I create a pdf document or a word document
 from a query from either Access database or mysql on a win2k system,
 PHP4.1?
 Any references that might help?
 Thanks for your help!

 Mihai


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] newbie needs quick help with formatting dates

2002-01-23 Thread val petruchek

http://www.php.net/manual/en/ref.datetime.php

Valentin Petruchek (aki Zliy Pes)
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] How to call Calling Non-Existing function

2002-01-21 Thread val petruchek

Not sure this is exactly what you need but try this:

@Draw_Table() or default_func();


Valentin Petruchek (aki Zliy Pes)
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]
- Original Message -
From: S. Murali Krishna [EMAIL PROTECTED]
To: PHP List [EMAIL PROTECTED]
Sent: Monday, January 21, 2002 1:17 PM
Subject: [PHP] How to call Calling Non-Existing function



 Hi PHP Experts,

 Is there any way to call a non-existent or undeclared function
 and redirect the call to someother function by knowing its non-existense.

 Is there any try() and catch() idea or any configurations,
 or may be either error handler like thing.

 for example if I call a function 'Draw_Table()' without declaring like
 this

 Draw_Table();

 it should know the non-existense of Draw_Table() and redirect to
 'default_func'

 function default_func()
 {
 
 }

 Note:
 
 Perl  programmers please recollect 'AUTOLOAD' Method of a package.
 C++,Java  programmers please recollect exception handling.


 Thanks in Advance.

 S.Murali Krishna
 [EMAIL PROTECTED]
 =
 We grow slow trying to be great

- E. Stanley Jones
 -


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Integer in PHP

2002-01-21 Thread val petruchek

intval (2.05);

Valentin Petruchek (aki Zliy Pes)

http://zliypes.com.ua
mailto:[EMAIL PROTECTED]
- Original Message -
From: Jerry [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 21, 2002 3:35 PM
Subject: [PHP] Integer in PHP


 Hi,

 I'm new in PHP, coming from JavaScript.
 In JavaScript you had the function parseInt which was really useful.
 For example parseInt(2.05) will return 2...

 How can I do that in PHP ?

 Thanks.

 Jerry



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] How should I cache database data for php?

2002-01-21 Thread val petruchek


 But at 300,000 page views a day, even if the caches only have a ttl of 1
 hour I'm still saving over %90 of the traffic from having to query the
 database.

 During our busy times I have a bottle neck with the database maxing out
 the CPU's, so If I can cut the queries the server won't be working as
 hard, plus file I/O is faster than Database I/O so the site will be
 faster even when it's not busy.

As form the discussion i understand that you have several pages with huge
views during a day. Also it seemes to me thÕ queries they produce are the
same. There is a way to avoid big traffic between php - mysql.

The way of doing this is to store page generated dynamically with a db query
and replace php-script with saved page. You generate content dynamically,
but for yourself only. Users get this page, but as a static one. The
easiest way is to do it manually - copy current script to another location,
execute it and save result html to former location. Nothing changes for
user.

The greatest way of doing this is
1. develope php-script for generating updated html from moved php-script
and updating index.html (e.g. ;)
2. develope another script or program which will call the first one
periodically (once an hour, e.g.)


Valentin Petruchek (aki Zliy Pes)
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] How should I cache database data for php?

2002-01-21 Thread val petruchek

  The greatest way of doing this is
  1. develope php-script for generating updated html from moved
php-script
  and updating index.html (e.g. ;)
  2. develope another script or program which will call the first one
  periodically (once an hour, e.g.)

 I like that.
 It sounds similar to the method I mentioned.
 What about browser detection and appropriate css generation etc?
You still can generate css depending on user_agent.

 Wouldn't the output that's saved be a little *too* static?
Depends on certain page properties... if current time (with seconds) is
printed there, it will be not 100% real, but in any other case everything
depends on how often second script will update it.


Valentin Petruchek (aki Zliy Pes)
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] File upload

2002-01-21 Thread val petruchek

 How can I, using:
 INPUT TYPE=\FILE\ NAME=\UPLOAD_FOTO\ SIZE=\40\
 specify the file extension.
 I want the user only to upload *.jpg.
You can only check $userfile_type to detect the type of uploaded file. You
can specify nor extension to browse dialog neither default path for
browsing... Security, you know


Valentin Petruchek (aki Zliy Pes)
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] .php unrecognizable extension

2002-01-21 Thread val petruchek

 I am running Apache 1.3 on WindowsXP just for some developement stuff that
I
 do at home.  I just installed PHP to the server but I can't get it to
 recognize .php as an extension and to have it load those as if they were
 .html files.  IE index.php it just shows a directory listing instead
of
 loading the file.  Can someone help me?

You need to edit httpd.conf in apache/conf
Edit DirectoryIndex section

Valentin Petruchek (aki Zliy Pes)
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] How should I cache database data for php?

2002-01-21 Thread val petruchek

 Since reading your first post I've been racking my brains/teasing my
memory. I'm sure there's an article on one
 of the popular PHP sites that talks about exactly this: creating a web
page dynamically, but serving it as
 static HTML (ie with no back-end db access per serving).

This idea came to me after September 11 - many news sites were down because
of too many visitors.
Some of them refused from dynamic page generation to survive, because huge
amounts of visitors looked like hacker attack.

In any case this is obvious solution of a problem ;)


Valentin Petruchek (aki Zliy Pes)
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] How should I cache database data for php?

2002-01-21 Thread val petruchek

 Even with straight HTML, a server's load capacity is not infinite.  If
 my own server, an old Pentium with 4 GB of hard drive space, and which
 serves nothing but static HTML pages, got hit with more than a couple
 hundred hits in a short period of time, it would bomb.

 I must be misunderstanding your question.  I've re-read your original
 post, and it seems to me that what you're trying to do is save
 webpage-bound database data in a way which will seriously reduce the
 load on a webserver; creating static HTML pages from database data
 instead of building pages dynamically when the user calls them would
 accomplish that goal, and that is what I was suggesting.



You are right ;)

Valentin Petruchek (aki Zliy Pes)
*** Cut the beginning ***
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Variable Problem

2002-01-18 Thread val petruchek

?php
$i = 10;

eval (\$result$i=\test\;);

echo $result10;
?

Valentin Petruchek (aki Zliy Pes)
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, January 19, 2002 2:47 AM
Subject: [PHP] Variable Problem




 How do I combine the following so it is treated as one variable

 $i=10

 $result$i=test;


 I want this to be:


 $result10=test;


 $i changes so I cannot just put in 10 instead of I.


 anybody know how i can do that?

 TIA
 Randy







 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] /19, the / doesn't work??

2002-01-18 Thread val petruchek

/19 is ok, but \19 really fails. Try put \\19 instead.


Valentin Petruchek (aki Zliy Pes)
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]
- Original Message -
From: Scott Fletcher [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, January 18, 2002 7:45 PM
Subject: [PHP] /19, the / doesn't work??


 Hi!

 When I put the data, /19; into a PHP variable,   I found that it
 produce only 9 in the variable.  PHP probably think that /1 is like
 /r, /n, etc.  So, what substitute do I need to use to make it /19
 instead of 9.  I don't know of any PHP code or shortcut to cancel out
that
 effect.

 Thanks,
  Scott



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]








-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Create Image on the fly

2002-01-17 Thread val petruchek


in index.html you write
img src=aaa.php


in aaa.php you write

?php
$im = @ImageCreate (240, 80)
   or die (Cannot Initialize new GD image stream);
$background_color = ImageColorAllocate ($im, 255, 255, 230);
$text_color = ImageColorAllocate ($im, 0, 0, 0);
ImageString ($im, 3, 10, 20,  Some text.., $text_color);
ImagePng ($im);
 ?

You have to create separate php script for creating image and then use it in
you html (php) file.


 Hi!
 How do I change this if I will use the Image direct in my html-code?
 Do I need to save it first.
 ?php
 $im = @ImageCreate (240, 80)
 or die (Cannot Initialize new GD image stream);
 $background_color = ImageColorAllocate ($im, 255, 255, 230);
 $text_color = ImageColorAllocate ($im, 0, 0, 0);
 ImageString ($im, 3, 10, 20,  Some text.., $text_color);
 ImagePng ($im);

 //this doesn´t work
 echo img src=\$im\ width=240 height=80;
 ?
 Thanks in advance.



Valentin Petruchek (aki Zliy Pes)
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: Redirect?

2002-01-16 Thread val petruchek

 If this isn't in the PHP FAQ (I couldn't find it), it definitely should
be,
 because somebody asks this question at the very least once a week on this
 list.

Very useful feature, i think :) and better to add it to the manual III.
Features section
(with file apploading, image functions etc)

Valentin Petruchek (aki Zliy Pes)
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] passing parameters from one page to another

2002-01-11 Thread val petruchek

 I want from a Form page  to pass a couple of values  (fooa, foob, fooc)
 which are not form fields
 when submit button pressed to the submited page...

Use hidden fields:

input type=hidden name=fooa value='value_of_fooa'
input type=hidden name=foob value='value_of_foob'
input type=hidden name=fooc value='value_of_fooc'

Valentin Petruchek (aki Zliy Pes)
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]