Re: [PHP] Processing PHP within a string variable

2001-01-24 Thread Alexander Skwar

So sprach Matt am Wed, Jan 24, 2001 at 03:56:37PM -0600:
 string is a mixture of PHP code and HTML. I want to be able to output the 
 string with the PHP code inside the string processed. Right now the PHP 

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

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die guenstige Art an Linux Distributionen zu kommen
Uptime: 4 hours 59 minutes

-- 
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] Read Vs. Include

2001-01-30 Thread Alexander Skwar

So sprach Daniel Grace am Thu, Jan 25, 2001 at 07:18:52PM -0800:
 readfile($filename);

Why not include?

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die guenstige Art an Linux Distributionen zu kommen
Uptime: 2 hours 56 minutes

-- 
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] Tab character

2001-02-01 Thread Alexander Skwar

So sprach Martin A. Marques am Thu, Feb 01, 2001 at 12:20:54PM -0300:
 yes (depending)

On what?

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die guenstige Art an Linux Distributionen zu kommen
Uptime: 1 day 20 hours 41 minutes

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

2001-12-26 Thread Alexander Skwar

So sprach »[EMAIL PROTECTED]« am 2001-12-21 um 15:12:54 -0800 :
 if you have a PHP page and you want to use SSI in it... is there a special
 method?

Yes - scrap it.  It's neither senseful nor possible.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  | Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 6 days 17 hours 59 minutes

--
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 software tool

2001-12-26 Thread Alexander Skwar

So sprach »LaserJetter« am 2001-12-22 um 18:46:46 - :
 Does anybody know of or can recommend any freeware text editing tools for
 editing PHP code in Win32?

vim

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  | Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 6 days 18 hours 0 minutes

--
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] Question about CREATE_FUNCTION

2001-12-26 Thread Alexander Skwar

So sprach »Andrey Hristov« am 2001-12-21 um 15:52:35 +0200 :
 Nope
 $test();

Please explain!

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  | Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 4 days 23 hours 37 minutes

--
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] Question about CREATE_FUNCTION

2001-12-26 Thread Alexander Skwar

So sprach »Andrey Hristov« am 2001-12-21 um 17:40:07 +0200 :
 ?php
 $test='htmlspecialchars';
 echo $test('html');
 ?
 
 Produces :
 
 lt;htmlgt;

Ah, I thought you did disagree.  Whatever.  I misunderstood you, sorry
about that.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  | Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 4 days 23 hours 45 minutes

--
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] Sendemail appends domain to mail function

2001-12-26 Thread Alexander Skwar

So sprach »Peter« am 2001-12-21 um 18:48:13 +0800 :
 How can I avoid this?

By using a valid $from adress.  It might also help to put the adress
in , so:

$from = xyz company;

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  | Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 4 days 23 hours 49 minutes

--
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] (again)Writing new lines in txt- files?=)

2002-01-23 Thread Alexander Skwar

So sprach »Mårten Andersson« am 2002-01-23 um 19:27:04 + :
 hello again! =)
 
 I.m using fwrite() to write to the file. What I want is a new row i a 
 textdocument after each strung I insert..
 
 I've been told that \n should be the solution to the problem whith new 
 rows i a text-document. But I am not sure that's want I wanted... =) I'll 
 try to be more specific.. I want to write a new row in a text document, the 
 meaning whith that is that I want to create a logfile. And It would be 
 mutch easier to read it if each row is a new hit to the site.
 When I inserted \n in the end of the string, it didn't created a new row 
 in the text file. It only created a new row when I printed out the file. 
 But I want a new row IN the textfile.. =)
 =) I hope I didn't complicate this matter too mutch whith my bad english.. 
 =)

Uhm, so you want:

Line 1
Line 2
Line 3

Is that correct?  If it is, then \n is your answer - if you're on a Unix
system, or if you're using a text editor which understands unix line
endings.  If you're on a Mac, you should use \r instead.  And if you're
so unlucky to use Windows, you've got to use \r\n.

This means, $s=Line 1\r\nLine 2\r\nLine 3\r\n; will fill the variable
$s with a string which consists of 3 lines when printed on a Windows
system.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  | Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 8 days 22 hours 0 minutes

--
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] Replacing chars like: º OR ¿

2002-03-18 Thread Alexander Skwar

»andy« sagte am 2002-03-18 um 14:22:47 +0100 :
 Hi there,
 
 I am still searching for a function which is replacing all chars not between
 [a-z] for exampe a province name like:  minºaqah-ash-shamal¿yah into valid
 chars or just deleting them. There seems to be an endless amount of those
 chars.

preg_replace('|[^a-z]||g', $string)

or somesuch

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  | Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 1 day 2 hours 54 minutes

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




Re: [PHP] Replacing chars like: º OR ¿

2002-03-18 Thread Alexander Skwar

»Rasmus Lerdorf« sagte am 2002-03-18 um 07:12:21 -0800 :
 $new = preg_replace('/[^a-z]/i','',$old);
 
 Note that this will also get rid of the - in this case since you
 specifically asked for something that got rid of everything not a-z

Yes.  And to not get rid of the -, you need to specify it as the 1st
charcter, or in your case, as the 2nd:

$new = preg_replace('/[^-a-z]/i','',$old);

How do you allow [ and ]?

$new = preg_replace('/[^[]-a-z]/i','',$old);

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  | Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 1 day 4 hours 22 minutes

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




Re: [PHP] Replacing chars like: º OR ¿

2002-03-18 Thread Alexander Skwar

»andy« sagte am 2002-03-18 um 17:00:16 +0100 :
 so whats the difference between yours and :
 $filename = ereg_replace ([^a-z^0-9^/.^=^/-], , $filename);

You've got quite some ^ to much in there, I'd think.  If I understand it
correctly, you'd also not remove the ^ character, because you've mentioned
this char quite sume times.  The ^ has only a special meaning, if it's
the 1st character in a [] group.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  | Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 1 day 6 hours 26 minutes

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




[PHP] Printing an array

2002-03-19 Thread Alexander Skwar

Hello!

I'd like to print an array kinda like the way it was created.  Ie., I've
got the following array:

$r[0][0]['name'] = 'joe';
$r[0][0]['gender'] = 'male';
$r[0][0]['prop'] = 'prefs';
$r[0][0][0]['text'] = 'mail';
$r[0][0][0]['set'] = 'yes';
$r[0][0][1]['text'] = 'phone';
$r[0][0][1]['set'] = 'no';

Now I'd like to have a function which I'd pass the array and get the
following output:

r[0][0]['name'] = 'joe'
r[0][0]['gender'] = 'male'
r[0][0]['prop'] = 'prefs'
r[0][0][0]['text'] = 'mail'
r[0][0][0]['set'] = 'yes'
r[0][0][1]['text'] = 'phone'
r[0][0][1]['set'] = 'no'

Right now, I've got the following not quite working function:

?php
function output($array, $name, $prefix = array()){
  foreach ($array as $key = $value){
if (! is_array($value)){
  if (0  count($prefix)){
// Prefix vorhanden
printf (%s%s[%s] = '%s'\n, $name, implode('', $prefix), $key, $value);
  } else {
// Kein Prefix angegeben
printf (%s[%s] = %s\n, $name, $key, $value);
  }
} else {
  $prefix[] = sprintf('[%s]', $key);
  output($value, $name, $prefix);
}
  }
}
?

This produces the following output:

r[0][0][name] = 'joe'
r[0][0][gender] = 'male'
r[0][0][prop] = 'prefs'
r[0][0][0][text] = 'mail'
r[0][0][0][set] = 'yes'
r[0][0][0][1][text] = 'phone'
r[0][0][0][1][set] = 'no'

As you can see in the line with phone, I've still got an error
somewhere.  The phone line should be:

r[0][0][1]['text'] = 'phone'

But it is:

r[0][0][0][1]['text'] = 'phone'

The 3rd [0] is too much.  This means, that I somehow need to get rid of
the 3rd [0].  It seems like I did not notice that I went up again in
the array.

Could somebody please help me in refining the function so that it works?

Thanks a lot!

-- 
  \  Alexander Skwar|  net-attach GmbH   \
   -+-X
  /  Web-Development and more   | http://www.net-attach.de   /
--
   Uptime: 1 day 1 hour 19 minutes

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




Re: [PHP] Printing an array

2002-03-19 Thread Alexander Skwar

»scott furt« sagte am 2002-03-19 um 05:28:51 -0500 :
 ...because you never shrink $prefix
 
 after output(), try array_pop($prefix);

Awesome!  This works!  *THANKS* a lot!  I was fighting with this for a
whole day :)

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  | Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 1 day 23 hours 34 minutes

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




Re: [PHP] Please explain...

2002-03-19 Thread Alexander Skwar

»Rudolf Visagie« sagte am 2002-03-19 um 12:19:04 +0200 :
 I would guess that the string foo evaluates to integer 0 in the comparison

Hmm, shouldn't a filled string (foo) evaluate to TRUE, ie. to 1?

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  | Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 1 day 23 hours 44 minutes

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




Re: [PHP] Anybody have a function to encode a string?

2002-03-19 Thread Alexander Skwar

»Drew Lopucki« sagte am 2002-03-19 um 10:25:02 -0500 :
 Lots of people will tell you to use PGP.  However since PGP is not *free*,
 in that you cannot use it for commercial purposes without a license, I avoid
 it.  Also it has to be downloaded and installed as most systems do not

Well, use GnuPG.  Then you can use PGP.  And what you stated above is
also plain wrong.  You might need some sort of license for the more
obscure uses (like VPN and thus), but for encryption, PGP is freely
available.  And lastly, even if you were willing to pay money, I would
not recommend PGP to anyone, as NA has stopped developing PGP and is
trying to sell it.  PGP is dead - long live GnuPG!

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  | Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 2 days 8 hours 43 minutes

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




Re: [PHP] Calling Javascript-function from php-script ...

2002-03-19 Thread Alexander Skwar

»Marcel Besancon« sagte am 2002-03-19 um 13:04:38 +0100 :
 Hi everybody,
 
 is there someone who can tell me how to call a javascript-function by a
 php-script.

PHP creates HTML pages (mostly) which will be displayed by a client
and/or receives send pages/requests from a client.

There's no connection between the two.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  | Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 2 days 8 hours 46 minutes

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




Re: [PHP] Calling Javascript-function from php-script ...

2002-03-19 Thread Alexander Skwar

»Marcel Besancon« sagte am 2002-03-19 um 13:19:49 +0100 :
 meant ist the following. I have a script with a form. By submitting this
 form and checking out some values php should call a javascript-function
 (such as an alert). You see the php-script shall call the

Bad idea.  On the one hand, PHP is not calling JS functions.  The
browser might interpret the strings PHP sends as JavaScript and act
thusly.  On the other hand, users who disabled JS will not see your JS
alert.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  | Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 2 days 8 hours 48 minutes

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




Re: [PHP] Anybody have a function to encode a string?

2002-03-19 Thread Alexander Skwar

»Drew Lopucki« sagte am 2002-03-19 um 16:19:50 -0500 :
 This is a fairly condescending reply given that the license statement for
 PGP is present on every download screen from which it is available.  Careful

I stand corrected.  Because of the IDEA patent by ASCOM, you're only
allowed to use it non commercially.  You're right, and I'm an idiot ;)

 Anyway, I'm sure GnuPG is great too, but as with PGP it also is not part of
 most standard distributions of Linux/Unix and as a result, may not be

Not?  Hmm, unlike PGP it's part of RedHat, SuSE, Mandrake and Debian.
That's more than enough, if you ask me.

 present on a production server (where downloading and installing new

I never understood this.  On my production servers, if I need something
for a project, it will be installed.  Especially with non-system tools
like GnuPG.  I can understand when people/admins hesistate to recompile
PHP and stuff like this.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  | Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 2 days 10 hours 18 minutes

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




Re: [PHP] Calling Javascript-function from php-script ...

2002-03-19 Thread Alexander Skwar

»Kevin Stone« sagte am 2002-03-19 um 14:11:42 -0700 :
 Not entirely true.  Javascript is directly linked to HTML and HTML is
 directly linked to PHP so you can have PHP talk to Javascript through
 HTML.

I still don't agree.  You can of course create JavaScripts dynamically
in PHP.  However, PHP won't talk to JS, it's the browser which will
execute the dynamically created JS and then maybe talk back to the
server and thus execute some PHP code.  This may seem like nitpicking,
but I don't think it is.  If PHP were to execute the JS, it would work
even when the user had disabled JS in his browser.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  | Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 2 days 12 hours 18 minutes

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




[PHP] Detecting the charset used for sending data

2002-03-19 Thread Alexander Skwar

Hi!

When a user sends data from a form, how can I detect which charset the
browser used to send the data to the server?  Can I assume that it's
always the same as the first charset in HTTP_ACCEPT_CHARSET?

Hmm, no, doesn't seem like it.  At least not in Galeon when I reset the
charset manually. :(

If a user sets his browser to use UTF-8 (or whatever) and then submits a
form with a text field, how do I find out which charset was used?

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  | Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 2 days 12 hours 24 minutes

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




Re: [PHP] $DOCUMENT_ROOT behavior linux vs solaris

2002-03-20 Thread Alexander Skwar

»Dennis Moore« sagte am 2002-03-20 um 02:14:16 -0500 :
 So when I build my paths I get an extra /.  Is there any way to make Sun version 
to work like the Linux version.   I hate to go back and change all my code.

Uhm, is the double / a problem?  On Linux, it doesn't seem to hurt.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  | Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 2 days 21 hours 25 minutes

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




[PHP] Re: [PHP-DEV] singleton feature

2002-06-24 Thread Alexander Skwar

So sprach Purushotham Komaravolu am 2002-06-24 um 11:39:36 -0700 :
 
 Hi ,
   I have a small suggestion. I guess it is a good feature to
 have a provision to have a Singleton class per webserver instance. This is
 especially useful for maintain user defined connection pools, loggers etc.

Uhm, what's a Singleton class?

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  |Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 1 day 11 hours 5 minutes

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




[PHP] configure breaks at return type of qsort...

2002-07-07 Thread Alexander Skwar
--r--1 root root 1013 Jun 18  2001 sslopt-vars.h
-rw-r--r--1 root root 2724 Jun 18  2001 tilde.h

These files belong to the SuSE mysql-devel-3.23.37-24 RPM.

Does anyone have an idea about why this error happens?

Thanks a lot,

Alexander Skwar
-- 
How to quote: http://learn.to/quote (german) http://quote.6x.to (en)
Homepage: http://www.iso-top.de   |  Jabber: [EMAIL PROTECTED]
iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 13 hours 9 minutes


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




Re: [PHP] configure breaks at return type of qsort...

2002-07-07 Thread Alexander Skwar

Alexander Skwar wrote:

 When I use --with-mysql instead of --with-mysql=/usr/include/mysql, I 
 can compile PHP with no errors.  /usr/include/mysql contains:

Solved.  I need to call --with-mysql=/usr and not use the full path to 
the mysql includes.

Alexander Skwar
-- 
How to quote: http://learn.to/quote (german) http://quote.6x.to (en)
Homepage: http://www.iso-top.de   |  Jabber: [EMAIL PROTECTED]
iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 15 hours 26 minutes


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




[PHP] Cannot start Apache

2002-07-08 Thread Alexander Skwar
, st_size=22205, ...}) = 0
old_mmap(NULL, 22205, PROT_READ, MAP_PRIVATE, 5, 0) = 0x40e6a000
close(5)= 0
open(/lib/libnss_files.so.2, O_RDONLY) = 5
read(5, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300!\0..., 1024) =
1024
fstat64(5, {st_mode=S_IFREG|0755, st_size=45903, ...}) = 0
old_mmap(NULL, 40676, PROT_READ|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0x40e7
mprotect(0x40e79000, 3812, PROT_NONE)   = 0
old_mmap(0x40e79000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 5,
0x8000) = 0x40e79000
close(5)= 0
munmap(0x40e6a000, 22205)   = 0
open(/etc/protocols, O_RDONLY)= 5
shmat(5, 0x1, 0x1)  = ?
shmat(5, 0x1, 0x2)  = ?
fstat64(5, {st_mode=S_IFREG|0644, st_size=6327, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40e6a000
read(5, #\n# protocols\tThis file describe..., 4096) = 4096
close(5)= 0
munmap(0x40e6a000, 4096)= 0
open(/etc/protocols, O_RDONLY)= 5
shmat(5, 0x1, 0x1)  = ?
shmat(5, 0x1, 0x2)  = ?
fstat64(5, {st_mode=S_IFREG|0644, st_size=6327, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40e6a000
read(5, #\n# protocols\tThis file describe..., 4096) = 4096
close(5)= 0
munmap(0x40e6a000, 4096)= 0
brk(0x8395000)  = 0x8395000
brk(0x8396000)  = 0x8396000
brk(0x8398000)  = 0x8398000
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++

There's only one thing which is irritating me:

ioctl(5, TCGETS, 0xbfffe7f8)= -1 ENOTTY (Inappropriate ioctl for device)

Anyone got an idea about what might be broken here?

Thanks a lot,

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  |Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
__
Seien Sie dabei und sichern Sie sich 500 WEB.Cent, 100% Leistung
und 100% Vorteil. https://digitaledienste.web.de/Club/?mc=021110


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




Re: [PHP] Cannot start Apache

2002-07-08 Thread Alexander Skwar

So sprach Alexander Skwar am 2002-07-08 um 10:11:16 +0200 :
 I thought that I had PHP 4.2.1 compiled just fine on SuSE 7.2, 
 however when I start Apache 1.3.19, it seg faults.

I've now found out, that this was caused by --with-recode.  When I
compile PHP like I did but don't use recode, it works fine.  However,
the standalone binary always worked fine - even --with-recode.

I'm using the recode-3.6-48 SuSE RPM.

Any ideas?

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  |Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 1 day 21 hours 37 minutes

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




[PHP] STARTTLS with IMAP?

2002-07-09 Thread Alexander Skwar

Hi!

Does imap_open in PHP 4.2.1 support STARTTLS?

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  |Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 2 days 11 hours 41 minutes

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




Re: [PHP] Which Database abstration layer?

2002-04-23 Thread Alexander Skwar

»Javier« sagte am 2002-04-23 um 17:09:56 -0300 :
 Can anybody recomend me a nice DB abstraction layer that is not
 included in phplib?

PEAR
http://pear.php.net
http://php.weblogs.com/php_pear_tutorials

ADOdb
http://php.weblogs.com/adodb

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  |Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 14 hours 48 minutes

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




Re: [PHP] arrays in a class

2002-04-23 Thread Alexander Skwar

»Leotta, Natalie (NCI/IMS)« sagte am 2002-04-23 um 16:27:46 -0400 :
 ImageString($this-im,1,65,5,apcs[0] = $this-apcs[0],$this-black);

Hm, try to use proper syntax here, ie:

ImageString($this-im,1,65,5,apcs[0] =  . $this-apcs[0],$this-black);

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  |Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 14 hours 51 minutes

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




Re: [PHP] Re: {PHP] Empty $_SESSION and $_POST??

2002-04-23 Thread Alexander Skwar

»Andre Dubuc« sagte am 2002-04-23 um 14:28:56 -0400 :
 I tried with VALUES ($_GET['sfname'] etc, etc  and got a T_Variable error 

if that's part of a string, than it's for sure broken.  The correct way
would be VALUES ( . $_GET['sfname']

 non-cumulative and specific to the page from which it was called on. If 
 that's the case, what precisely is the value of these superglobals when ,in 
 fact, they are specific to ONE page only???

$_GET contains all the values which have been submitted to the current
page via a GET HTTP request.  If you want to pass variables from one
invocation to another without using GET or POST, I'd suggest to have a
look at PHP sessions.  With sessions, you can pass as much data as you
wish without revealing what kind of data you're passing along.  Plus,
you don't need to worry about having to encapsulate the data so that
it can be passed in the first place.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  |Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 14 hours 53 minutes

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




Re: [PHP] arrays in a class

2002-04-23 Thread Alexander Skwar

»Leotta, Natalie (NCI/IMS)« sagte am 2002-04-23 um 16:37:37 -0400 :
 Wow.  Now I'm feeling dumb...  It does work with my non-array vars though -

Yes, it doesn't suprise me that it works with non arrays.  The parser
doesn't seem to be clever enough to catch that you want to pass [0] as
the array index to the class var apcs of $this.  Instead of doing it the
way I just suggested, you could have also done {$this-apcs[0]}, I
think.  I seem to remember that this also should be possible - but IMO
that's even a lot more broken than my way and I've never used it.

 Thanks!!

np

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  |Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 14 hours 58 minutes

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




Re: [PHP] What's wrong with the PHPSESSID?????

2002-04-23 Thread Alexander Skwar

»Scott Fletcher« sagte am 2002-04-23 um 14:45:17 -0400 :
 Hi!  I have the PHPSESSID working on every web page except one and it baffle
 me.  Have anyone have this problem before?  Anyone know of a way around the
 problem?
 
 Here is what happen.  On the HTML post, I use the Post String,
 
 -- clip --
 form NAME=Inquiry_Form
 ACTION='network_option_transunion.php??=$SID?type=?=$type?'
 METHOD=POST

Well, either to a POST request *OR* a GET request, but don't mix them.
Pass the session_name() as a normal POST var with a value of
session_id(), like so:

input type=hidden name=?php echo session_name();? value=?php
echo session_id();?

Same for type:

input type=hidden name=type value=?php echo $type;?

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  |Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 15 hours 1 minute

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




Re: [PHP] Re: What's wrong with the PHPSESSID?????

2002-04-23 Thread Alexander Skwar

»Julio Nobrega Trabalhando« sagte am 2002-04-23 um 16:59:18 -0300 :
   Also, on your form tag, I didn't see the PHPSESSID part. Also, it's a

Do a echo SID.  SID contains both the session_name() and the
session_id() suitable for inclusion in a GET request.

 good idea to use double quotes for html element properties, amp; instead of
 , and always echo the var instead of the short form ?=.

Yes, that's true.

 // With session_id() instead of $PHPSESSID or $SID

$SID will for sure be empty, but the constant SID not.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  |Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 15 hours 4 minutes

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




Re: [PHP] If value is divisible by 2

2002-04-30 Thread Alexander Skwar

»Craig« sagte am 2002-04-30 um 09:00:33 +0100 :
 I am trying to write an if statement that says if the value $foo is
 divisible by 2 then echo text
 
 i have tried mod but it isnt recognised

if ($foo % 2){
echo foo is divisible by 2;
} else {
echo it is not;
}

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  |Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 6 days 7 hours 12 minutes

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




Re: [PHP] XML to HTML?!

2002-04-30 Thread Alexander Skwar

»Fredrik Arild Takle« sagte am 2002-04-30 um 18:48:37 +0200 :
 I've parsed some XML, when I do xml_parse it outputs the html-codes.

Wrap into a output buffer.  ob_start, ob_get_contents

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  |Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 6 days 12 hours 49 minutes

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




Re: [PHP] php sessions

2002-06-02 Thread Alexander Skwar

Michal Dvoracek wrote:

when creating new session:

define('S_USER', 0);
define('S_USER_ID', 0);
define('S_USER_NAME', 1);

session_start();
$_SESSION[S_USER][S_USER_ID] = 1;
$_SESSION[S_USER][S_USER_NAME] = 'Michal';


Hm, you're defining a session variable called 0?  Because PHP will 
translate the [S_USER] to [0] because S_USER is a constant defined as 0.

PHP doesn't allow variables to start with a digit, and I don't think it 
will work in this case either.


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




Re: [PHP] simple email validation ereg

2002-06-02 Thread Alexander Skwar

Justin French wrote:

my aim will be to strip out anything that doesn't at least LOOK like like an
email address.


Well, instead of coming up with some clever regexp, I'd suggest to 
completely dump syntax checks.  Instead, I only check if the host has a 
MX entry associated.  If not, then this host either does not exist, or 
mails wouldn't get through.  At any rate, it's not a valid adress.


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




Re: [PHP] simple email validation ereg

2002-06-03 Thread Alexander Skwar

So sprach Jason Wong am 2002-06-03 um 12:10:29 +0800 :
 The lack of an MX record doesn't necessarily mean mail will not get through, 
 so you cannot use that as a test for whether the address is valid.

It will not?  Do you have an example?  How is a mail server supposed to
know where the mail should be delivered if there's no MX?

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  |Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 2 days 21 hours 18 minutes

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




[PHP] Re: phpMyAdmin is this possible

2002-08-20 Thread Alexander Skwar

So sprach Steve Jackson am 2002-08-20 um 22:11:58 +0300 :
 seperate ones for seperate functions.. Ideas or advice? is the way I am
 suggesting better or worse than the way my hosting company expects me to
 work?

What does your hosting company suggest?

Any how, for system stuff like creating databases and especially
setting ACL, I much more prefer to use Webmin.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.biz |Jabber: [EMAIL PROTECTED]
   iso-top.biz - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 2 days 2 hours 27 minutes

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




Re: [PHP] nimda, etc.

2001-09-22 Thread Alexander Skwar

So sprach »Gaylen Fraley« am 2001-09-21 um 18:10:58 -0500 :
 Are you sure about that?  I am trying his script and I just had an attack
 and I watched the traffic through my firewall software.  It dropped off
 immediately, i.e. showed no activity.  I was expecting to see somekind of a

Sure, but you've got two Apache/PHP processes running for the sleep
time.  Now, imagine that 10,000 Nimda accesses happen at the same time.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 2 days 20 hours 7 minutes

--
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] Cannot add header information - headers already sent by

2001-09-22 Thread Alexander Skwar

So sprach »Tom Nickels« am 2001-09-22 um 12:01:23 +0200 :
 Warning: Cannot add header information - headers already sent by (output
 started at lang/dt/variables.php:321) in vote_submit.php on line
 34
 
 Line 34 of vote_submit.php is:
 
 header(Location: .$source.?status=9errormessage=$errormessage);
 
 Any idea, why this is after update not working anymore? Thanks for help

Well, because in line 321 of variables.php, there's something printed.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 2 days 22 hours 55 minutes

--
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 do they do that.

2001-09-22 Thread Alexander Skwar

So sprach »Urb LeJeune« am 2001-09-22 um 10:10:21 -0400 :
 Is there any documentation on how they do that?

I suppose, they're using Apache's mod_rewrite which transforms the URL
(php.net/fopen) to the search form
(manual-lookup.php?lang=enfunction=fopen) if the part after the / is
not otherwise known.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 3 days 2 hours 23 minutes

--
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] Checking if session has been started

2001-09-22 Thread Alexander Skwar

Hi

I need to run some code if a session has been started.  However, to do
this, I need to figure out IF the session has been started at all.

How can I do this?

Is checking for the count of elements in HTTP_SESSION_VARS the only
reliable way of doing this?  Like so?

?php
if (0  count($HTTP_SESSION_VARS)){
// Do something since a session is already running
}
?

Thanks,

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 3 days 3 hours 9 minutes

--
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: Checking if session has been started

2001-09-22 Thread Alexander Skwar

So sprach »Fredrik Arild Takle« am 2001-09-22 um 18:00:37 +0200 :
   session_register(valid_session);
 
 OR SOMETHING LIKE THIS?
 
  if (session_is_registered($valid_session)) {

Yep, that seems better.

Thanks to both of you!

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 3 days 4 hours 10 minutes

--
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] naming convention in php?

2001-09-22 Thread Alexander Skwar

So sprach »saif« am 2001-09-15 um 18:58:29 +0530 :
 i want to know is there any naming convention followed in php as
 in c/c++/java/etc.

I'm trying to follow PEAR coding style

- http://php.net/manual/en/pear.standards.php

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 3 days 11 hours 27 minutes

--
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] naming convention in php?

2001-09-22 Thread Alexander Skwar

So sprach »saif« am 2001-09-23 um 00:33:27 +0530 :
 thanks Chris,
 i would have checked the link but it seems that online php documentation has
 gone haywire.

Well, it's working right now.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 3 days 11 hours 28 minutes

--
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] percentage problems

2001-09-22 Thread Alexander Skwar

So sprach »Tyler Longren« am 2001-09-22 um 17:14:46 -0500 :
 
 Any other ideas?

number_format ?

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 3 days 11 hours 30 minutes

--
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 Array??

2001-09-23 Thread Alexander Skwar

So sprach »[EMAIL PROTECTED]« am 2001-09-23 um 02:09:17 -0400 :
 Hi,
 
 If I have a value $num = 32; based on this how can I create an Array of 
 numbers 1 - 32, something like this...
 
 ?
 $num = 32;
$arr = array();
 for ($i = 1; $i = $num; $i++)

$arr[] = $i;

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 3 days 19 hours 40 minutes

--
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] 404 error

2001-09-23 Thread Alexander Skwar

So sprach »Richard Baskett« am 2001-09-23 um 05:40:52 -0700 :
 I know how to get the web page that created the 404 error, but how do I get
 the link that created the 404 error?  Is there a way of doing this?  Im sure

Check the referer.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 3 hours 59 minutes

--
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] Arrays Data

2001-09-23 Thread Alexander Skwar

So sprach »Alawi Albaity« am 2001-09-23 um 07:00:22 -0700 :
 how can I remove duplicted values (Data) in my array ?

array_unique

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 4 hours 35 minutes

--
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 get the total disk space used in a directory

2001-09-23 Thread Alexander Skwar

So sprach »sagar N Chand« am 2001-09-23 um 22:51:49 +0530 :
 is there any way to get the total disk space used under a directory
 including its subdirectories and all the contents.

Either execute du, or sum up the sizes of all the files manually in PHP.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 8 hours 48 minutes

--
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 permitions

2001-09-23 Thread Alexander Skwar

So sprach »[EMAIL PROTECTED]« am 2001-09-23 um 19:08:20 +0100 :
 Is there any possibility to write to files as httpd 
 or system (which can write to files even with 000 
 permitions)?

With 000 permissions?  Is system an alias for root?  If not, then it's
not possible.

But normally the files should only need access for the group running the
webserver process.  Here at home, it's apache/apache.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 8 hours 49 minutes

--
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] Screen Resolution in PHP?

2001-09-24 Thread Alexander Skwar

So sprach »Jay Paulson« am 2001-09-24 um 10:50:02 -0500 :
 Is there a way to get the client's screen resolution in php?

no, because, as you say, it's the client's screen resolution and PHP
runs on the server.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 1 day 6 hours 11 minutes

--
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] Multilingual application

2001-12-06 Thread Alexander Skwar

Hi!

I've got to develop a multilingual application.

What's the best approach to have the app multilingual?  Should I use
gettext, or are there any better ways to do this?

Thanks,

Alexander Skwar
-- 
   Wohnung in Gelsenkirchen und Umgebung gesucht!   

iso-top.de - Die günstige Art an Linux Distributionen zu kommen 
   Uptime: 1 day 21 hours 33 minutes

--
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] Smarty: Assigning custom function section variable

2001-08-19 Thread Alexander Skwar

Hi!

I'm having some problem assigning a custom function ({math}) a value of
a {section} block.
I've got a section where I want to do some easy math.  But somehow I'm
stuck

Here's my template:

htmlheadtitleSection Test/title/title/headbody bgcolor=white

{section name=people loop=$FirstName}
  {$FirstName[people]} {$LastName[people]}
  {math equation=x + y x={$FirstName[people]} y={$LastName[people]}}br
{/section}

/body/html

The PHP code:

?php
require_once 'Smarty.class.php';
$smarty = new Smarty();

$x = array(1, 2, 3, 4, 5);

$y = array(9, 8, 7, 6, 5);

$smarty-assign(FirstName, $y);
$smarty-assign(LastName, $x);

$smarty-display(test.tpl);
?

When I run this, I get the following errormessage in my browser:


Parse error: parse error, expecting `'}'' in
/home/askwar/public_html/olg/html/templates_c/test.tpl.php on line 65

Line 65:

 ?php smarty_func_math(array('equation' = x + y,'x' =
 {$FirstName[people]), $this); if($this-_extract) {
 extract($this-_tpl_vars); $this-_extract=false; } ? y=?php echo
 $this-_tpl_vars['LastName'][$this-_sections['people']['properties']['index']]
 ;?


Also removing the { and } at the x= and y= section in my template
doesn't work.  The section now looks like this:

{section name=people loop=$FirstName}
  {%people.rownum%} {$FirstName[people]} {$LastName[people]} {math
  equation=x + y x=$FirstName[people] y=$LastName[people]}br
{/section}


Now I get 5 lines in my browser, but also a different error message:

 1 9 1
Warning: Smarty error: math: parameter x is empty in
/home/askwar/public_html/olg/html/OliG-System/smarty/Smarty.class.php on
line 1090


The first 1 9 1 is correct.  It's the row number and the values of x
and y.

How can I do this?

Thanks a lot!

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 1 day 12 hours 10 minutes

--
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] hacks we should know about

2001-08-21 Thread Alexander Skwar

So sprach »Seb Frost« am 2001-08-21 um 18:25:08 +0100 :
 I don't host my own site so how can I put include files outside of the web
 root?  I log on ftp and my top level IS the web root (htdocs), I can't go
 any higher.

In this case you can't.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 1 hour 29 minutes

--
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] hacks we should know about

2001-08-21 Thread Alexander Skwar

So sprach »Ashley M. Kirchner« am 2001-08-21 um 11:46:29 -0700 :
 Dumb question: Can't he create a new folder under his web root (let's call
 it 'incs') and setup an .htaccess file that denies requests to files within
 that?

Yes, he might be able to do so - but it's also possible that the
provider has disabled parsing of the .htacess file.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 4 hours 36 minutes

--
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: To jump or not to jump?

2001-08-21 Thread Alexander Skwar

  From: [EMAIL PROTECTED] (Seb Frost)
  Newsgroups: php.general
  Date: Tue, 21 Aug 2001 20:10:38 +0100
  To: [EMAIL PROTECTED]
  Subject: To jump or not to jump?
  
  Is it good practice (sp?) to jump in and out of php whenever you've got some
  plain html to write, or should one write an entire file in php?  I'm leaning
  towards the latter, unless there's a huge chunk of html code.

I'm starting to do it the right way (tm).  That is, I start to not do it
like you do anymore, but instead try to use templates as much as
possible.  This doesn't clutter up your PHP code with HTML and thus
makes it easier to read.

I use Smarty (www.phpinsider.com).  I haven't tested anything else and
find it quite easy to use.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 5 hours 10 minutes

--
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] Sessions, Is this behavior by design?

2001-08-21 Thread Alexander Skwar

So sprach »Johnny Nguyen« am 2001-08-21 um 12:29:53 -0700 :
 false.  I was expecting boolean true and false return values, but no matter
 i can work with it this way, just wondering if this is by design.?

There isn't such a thing as boolean true or false in PHP.  In PHP,
everything other than NULL, FALSE, 0 and  (empty string) is considered
to be TRUE if used in a boolean context.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 5 hours 13 minutes

--
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] \n

2001-08-24 Thread Alexander Skwar

So sprach »Jeremy Morano« am 2001-08-24 um 11:18:10 -0400 :
 echo  $team \n ;

HTML?

echo nl2br( $team \n );

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 13 hours 38 minutes

--
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] The future of PHP

2001-08-27 Thread Alexander Skwar

So sprach »Zeev Suraski« am 2001-08-27 um 09:40:40 +0300 :
 Regarding source code hiding, you can use the Zend Encoder.  Pricing wise, 
 the lowest you can get it for right now is $50/month, which may be too high 
 for certain developers.

Uhm, really?  I mean, if you don't make $50/month, the developer doesn't
seem to be making a lot of money.  And for such micro-projects that such
a guy seems to be doing - why even care about hiding source code?

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 3 hours 47 minutes

--
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 mysql admin?

2001-08-27 Thread Alexander Skwar

So sprach »Joseph Bannon« am 2001-08-27 um 10:06:39 -0500 :
 Are there any free PHP mysql database admin programs out there?

yup, phpmyadmin.  I'd recommend the newer versions from
http://phpmyadmin.sourceforge.net.  It has some nice feature additions
compared to the original one.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 12 hours 6 minutes

--
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: The future of PHP

2001-08-27 Thread Alexander Skwar

So sprach »Geoff Caplan« am 2001-08-27 um 11:26:09 +0100 :
 standard, and no central repository. This compares badly with platforms such
 as Perl and Java, who tackled this issue long ago.

Actually, I think you're right.

On the one hand, it's quite nice that there are so many librariries
which can be compiled in (CURL, dbm, gettext ).  I think that's
nice, because having this kind of support in a binary C library makes it
rather fast.

BUT: It's not as easy to install if you don't have full access to the
server.

With Perl on the other hand, you basicaly just download MP3::Info from
CPAN and can easily download and install it.  It's a lot easier since
there's (most of the time) no binary compile needed. (Uhm - MP3::Info,
hmm, bad example *G*).



Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 12 hours 2 minutes

--
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] The future of PHP

2001-08-29 Thread Alexander Skwar

So sprach »Manuel Lemos« am 2001-08-28 um 23:21:54 -0300 :
 Man, give it some time! How long was it since Andrei released PHP-GTK?
 How old is PHP now?

Exactly.  And also Perl wasn't made to create GUI apps, was it?  But
look how many Perl GUI apps there are out there now.  Eg. all (? at
least a lot) of the Mandrake configuration tools are in Perl, or cscmail
was/is made in Perl.

Just because PHP-GTK might not be mature YET, does not mean that it will
never be.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 23 hours 5 minutes

--
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 mysql admin?

2001-08-29 Thread Alexander Skwar

So sprach »Christian Dechery« am 2001-08-27 um 22:57:49 -0300 :
 phpMyAdmin is very nice...
 but not even close to Mysqlfront... try it out...
 
 http://www.mysqlfront.de/

Well, but for this to work, you either have to have a local MySQL on
your Windows platform, or the database has to be open to connects from
every IP address (or, if you're lucky enough to have a static IP: just
your IP).

The latter is a security hole, of course.  So, mysqlfront, as nice as it
might be, is not comparable to phpmyadmin.  (Note: I'm not saying it's
bad - you just cannot compare them.)

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 23 hours 17 minutes

--
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 does PHP stand for?

2001-08-29 Thread Alexander Skwar

So sprach »Niklas Lampén« am 2001-08-28 um 14:05:54 +0300 :
 Funny that there is no meanin for the first P.

Well, there is.  The P stands for PHP.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 23 hours 20 minutes

--
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] The future of PHP

2001-08-29 Thread Alexander Skwar

So sprach »Zeev Suraski« am 2001-08-29 um 19:43:15 +0300 :
 very useful, especially to people who already know PHP.  However, assuming 
 that it would ever catch a significant share of the GUI market is naive, 
 IMHO.

Well, my point was, that at the beginning of the Perl-GTK binding,
noone would have guessed that Perl EVER might be a useful GUI
programming language (at least I suppose so).

I'm also not saying that PHP has to be actively pushed in this
direction.  Not at all.  I'm quite with you that PHP should focus on
it's Web-abilities.

However, I don't think it's right to say that this will never ever
happen, like you do.  And I also do think, that it's counter-productive
from you to say something like this.  I mean, it would be okay (with
me), if you kinda ignored this.  But what's so bad about PHP-GTK that
you speak so strongly against it?  

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 4 hours 12 minutes

--
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] The future of PHP

2001-08-29 Thread Alexander Skwar

So sprach »Zeev Suraski« am 2001-08-29 um 20:32:32 +0300 :
 What I *am* saying is that GUI apps are not PHP's main strength, and thus, 
 should not be its main focus.  If we try to push and market PHP, we should 
 pick reasonable objectives - and pushing it as a platform is much more 
 attainable than as a good-for-everything language.  This objective is quite 
 ambitious on its own.

Okay, then I'd like to appologize.  I misunderstood you.  In this case,
I agree to everything you said.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 4 hours 49 minutes

--
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] Posting to oneself

2001-08-29 Thread Alexander Skwar

So sprach »John Meyer« am 2001-08-29 um 15:57:02 -0700 :
 Two questions:
 1.  Can I tell a form to post to itself without specifying the name of the 
 web page?

form action=?php echo $PHP_SELF;?

 2.  If I have a function on one page called by another, will this resolve 
 correctly?

If you include() the file, yes.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 9 hours 0 minutes

--
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] Posting to oneself

2001-08-29 Thread Alexander Skwar

So sprach »John Meyer« am 2001-08-29 um 16:15:07 -0700 :
 I am getting this error:
 
 Undefined variable: PHP_SELF

Uh?  Uhmm...  Is this inside a function?  Or is the server running PHP
in safe mode (dunno if this has anything to do with it...)?

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 9 hours 11 minutes

--
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] If statement within a variable?

2001-08-30 Thread Alexander Skwar

So sprach »Brandon Orther« am 2001-08-30 um 08:59:44 -0700 :
 $var = Hello.IF($var2 = 1) { .Mr. Bean. } else { .New Comer. }.

$var = Hello . (($var2 = 1)?(Mr. Bean):(New Comer));

But why do you assign 1 to $var2?

To circumvent these kind of problems, I always write:

$var = Hello . ((1 == $var2)?(Mr. Bear):(New Comer));

Or, in this case, you could have used:

$var = Hello;
if (1 == $var2){
$var .= Mr. Bean;
} else {
$var .= New Comer;
}

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 1 day 3 hours 15 minutes

--
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_SELF or REQUEST_URI within Function ?

2001-08-31 Thread Alexander Skwar

So sprach »Arcadius  A.« am 2001-08-31 um 05:27:04 -0700 :
 $u = $SCRIPT_FILENAME;

Because you did not define $SCRIPT_FILENAME anywhere.  If you want to
access the global variable, you've got to say so:

global $SCRIPT_FILENAME;

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 2 days 1 hour 46 minutes

--
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_SELF or REQUEST_URI within Function ?

2001-08-31 Thread Alexander Skwar

So sprach »Boget, Chris« am 2001-08-31 um 10:04:49 -0500 :
 Or, so you don't have to specify all the variables you are using 
 as globals (especially if you are using *alot* of them), you can 
 use:
 
 $GLOBALS[SCRIPT_FILENAME];

What's the gain?  'global ' has 7 characters, whereas '$GLOBALS[]' has
10 characters.  So, you don't type less.  And with using global(), the
code is more orderly, and thus easier to read.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 2 days 2 hours 0 minutes

--
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_SELF or REQUEST_URI within Function ?

2001-08-31 Thread Alexander Skwar

So sprach »Boget, Chris« am 2001-08-31 um 10:22:28 -0500 :
 True.  But take the following function:
 
 function processLotsOfFormVars() {
   global $fieldOne, $fieldTwo, $fieldThree, $fieldFour;
   global $fieldFive, $fieldSix, $fieldSeven;
   global $PHP_SELF, $REQUEST_URI;
   global $HTTP_REFERER;
 
   echo Field One is: $fieldOnebr\n;
   echo Field Two is: $fieldTwobr\n;
 // etc
 }
 
 OR you can do it this way:
 
 function processLotsOfFormVars() {
   echo Field One is: $GLOBALS[fieldOne]br\n;
   echo Field Two is: $GLOBALS[fieldTwo]br\n;
 // etc
 }

Uh?  I don't see it.  The matching function 1 is:

function processLotsOfFormVars() {
global $fieldOne;
global $fieldTwo;

echo Field One is: $fieldOnebr\n;
echo Field Two is: $fieldTwobr\n;
}

this quite doesn't look as intimidating as the piece you wrote.  And
even if there are 10 lines of 'global', I still like it a lot better,
because it CLEARLY shows which form vars are going to be used.

One of the downside of PHP IMHO is, that you do not have to define
variables.  This leads to a lot of errors.  At least there should be a
option, which forces you to define variables, like maybe so:

dim $some_var;

this leads to easier readable code IMHO.

 variables in a function.  Plus, if the function gets large, 
 it's easier to see where the value is coming from by using
 the $GLOBALS variable.

Now, that's the point I'm arguing here.  I don't think so.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 2 days 2 hours 10 minutes

--
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_SELF or REQUEST_URI within Function ?

2001-08-31 Thread Alexander Skwar

So sprach »Arcadius  A.« am 2001-08-31 um 17:36:51 -0700 :
 Would this work ?

Kinda, but not really.

If you want to do this, you've got to stuff it all in one function, like
so:

function dunno($mandatory, $optional1 = NULL, $opt2 = NULL){
if (NULL === $optional1){
// behave, as if only $mandatory is set
echo 'mandatory is: ' . $mandatory;
return;
}
if (NULL === $optional2){
// behave, as if $man. and $opt1 have set
echo 'mand is : ' . $mandatory;
echo 'opt1 is : ' . $optional1;
return;
}
// neither $opt1 nor $opt2 are null
echo 'mand is : ' . $mandatory;
echo 'opt1 is : ' . $optional1;
echo 'opt2 is : ' . $opt2;
return;
}

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 2 days 2 hours 31 minutes

--
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] just 10 characters from a string

2001-08-31 Thread Alexander Skwar

So sprach »Marcos Lloret« am 2001-08-31 um 09:53:01 +0200 :
 i have a long string (about 255 characters) and i would like to show only 10. 
how can i do it?

substr

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 2 days 1 hour 48 minutes

--
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's future

2001-09-02 Thread Alexander Skwar

So sprach »Chris Hobbs« am 2001-09-02 um 12:00:26 -0700 :
 Of course, I'm trying to figure out when I would have a script that 
 really needed to go through 4M iterations, and thus (like most 

Well, this is of course true, but I can easily imagine a script which is
run 200,000 times per second (well, not really...) and which loops thru
20 values.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 5 hours 29 minutes

--
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's future

2001-09-02 Thread Alexander Skwar

So sprach »Paul Roberts« am 2001-09-02 um 17:06:08 +0100 :
 me too and as the max execution time is 30 secs and there's no code to
 override it.

Not so.

http://www.php.net/manual/en/function.set-time-limit.php
http://www.php.net/manual/en/configuration.php#ini.max-execution-time

PS: Quote only what's neccessary.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 5 hours 53 minutes

--
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's future

2001-09-02 Thread Alexander Skwar

So sprach »Jack Dempsey« am 2001-09-02 um 16:29:52 -0400 :
 i think he meant in that specific code, they don't change the default time,
 therefore, it'd be impossible

Ah, I see.  Well, yes, that's right.

Uhm - maybe not.  Although very unlikely, it's possible that they've
changed it in the php.ini file.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 6 hours 8 minutes

--
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] for and emailmessage

2001-09-02 Thread Alexander Skwar

So sprach »Jan Grafström« am 2001-09-02 um 22:17:34 +0200 :
 $i = 0;
 $ii = count($vn);

Sure that $vn contains anything?  Add this line after the count() line
to see what $vn contains:

var_dump($vn);

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 6 hours 16 minutes

--
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] I dont see whats wrong!

2001-09-03 Thread Alexander Skwar

So sprach »Kyle Smith« am 2001-09-03 um 14:50:49 -0700 :
 i get this error message
 Parse error: parse error in 
/web/sites/197/lk6/www.stupeedstudios.f2s.com/sendcam.php on line 53
 
 for
 
 $message = $alias. \r\n.$name. \r\n. $email. \r\n. $site. \r\n. $cam. 
\r\n. $quote.;

After the $quote, you've got a . - remove this, and it might work.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 14 hours 38 minutes

--
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] I dont see whats wrong!

2001-09-03 Thread Alexander Skwar

So sprach »Andy Woolley« am 2001-09-03 um 16:37:08 +0100 :
 Might not work in all cases though but it's certainly easier to read.

Also easy to read:

$msg = array(
$foo,
$bar,
$blah,
$blub
);

echo implode(\r\n, $msg);

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 14 hours 39 minutes

--
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 Question: mysqldump via PHP

2001-09-04 Thread Alexander Skwar

So sprach »Tony Frasketi« am 2001-09-04 um 13:53:10 -0500 :
 section of the phpinfo listing. Do you know of a unix shell command I
 could use to get the location of mysqldump?

which mysqldump

this should tell you.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 1 day 12 hours 0 minutes

--
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] Carriage return.

2001-09-05 Thread Alexander Skwar

So sprach »Johan Vikerskog (EMP)« am 2001-09-05 um 11:48:11 +0200 :

 What i need to know is if there is a way to do this without involving
 unix commands like perl sed dos2unix etc etc.  I need to know if
 there is a simple way to do this with just php and not some regexp
 solution.  I want to know if there is a built in function of some kind

What's bad about regexp?  No, there's nothing builtin.  Anyway - why
should there?



--
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] Sending Broadcast Email - will a large loop cause a crash?

2001-09-09 Thread Alexander Skwar

So sprach »Fotwun« am 2001-09-06 um 16:16:25 -0700 :
 Hi,
 
 I need to send a broadcast email to our customers (about 3,000 emails). The

Well, forget it.  Many major providers like Yahoo, AOL, Hotmail etc.pp.
have *VERY* SPAM strict filters in place.  Especially if you use Bcc:'s,
chances are high that a lot of your will bounce.

If you'll be doing something like this more often, it'll be a lot easier
and a lot more successful if you outsource this to specialized
companies.  They know how to circumvent this kind of trouble.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 1 day 20 hours 20 minutes

--
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] Why do form submissions need stripslashes() invocations?

2001-09-09 Thread Alexander Skwar

So sprach »Neil Zanella« am 2001-09-09 um 23:20:12 -0230 :
 
 Hi Rasmus!
 
 Thanks for your explanation. Unfortunately I am using a server on which I
 do not have write access to php.ini. I have also been noticing that

No need to; if you're allowed to, you can create a .htaccess.

 a submitted \ is received as  when I use stripslashes() thus

Of course.  stripslashes removes the \ in front of the .  Or did I
misunderstand you?

-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 0 hours 20 minutes

--
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] Stripslashes question.

2001-09-10 Thread Alexander Skwar

So sprach »Sean C. McCarthy« am 2001-09-10 um 22:42:51 +0100 :
 Hi all,
 
 What will be the way to convert binary information into a string which
 will get into an SQL query for MySQL? I tried stripcslashes but I got
 stucked with it. Any help?

Wrong direction :)  addslashes($binary) will enable you to put it in a
SQL query.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 16 hours 41 minutes

--
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] World Trade Centre Hit By terrorists, also pentagon

2001-09-11 Thread Alexander Skwar

So sprach »[EMAIL PROTECTED]« am 2001-09-11 um 08:55:49 -0600 :
 
 We need the receive the help from Got, I believe He is the only one who can
 help us on this situation 

Well, you know: *EXACTLY* this is the problem!  Your so called god.
If it weren't for this superstition, the world would be a *MUCH* safer
place.  I'm sure of that.

But if it makes you feel better: Go on, believe in that.



--
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 list 2-6 in while script?

2001-09-11 Thread Alexander Skwar

So sprach »Jan Grafström« am 2001-09-11 um 16:48:59 + :
 Hi!
 I have this script and wonder how to change it to get it list only number 2 to 
number 6 and 
 not each?
 while (list ($key,$val) = each ($headers)) {
 print pb.$val./b/p;
  }

Hmm
$i = 1;
while (list ($key,$val) = each ($headers)){
if (2 == $i || 6 == $i){
continue;
}
print $val;
$i++;
}
Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 1 day 12 hours 20 minutes

--
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] World Trade Centre Hit By terrorists, also pentagon

2001-09-11 Thread Alexander Skwar

So sprach »[EMAIL PROTECTED]« am 2001-09-11 um 17:36:59 +0100 :
 I'm sure your is the view shared by the VAST, VAST majority on both sides.
 
 Michael
 
 
 Quoting Clint Tredway [EMAIL PROTECTED]:
 
  
  I am sorry, but the problem is the exact opposite. If people would turn
  back to God and seek his face and live according to His will, the World
  would benefit greatly.

Well, exactly not!  Just look at the track record of believe.  May I
remind you of the great deeds in the name of god (which god doesn't
matter).

No, if people would not believe in god, world would be better.

But I also agree that the VAST majority believes in god.


--
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 list 2-6 in while script?

2001-09-12 Thread Alexander Skwar

So sprach »Andrew Perevodchik« am 2001-09-12 um 14:45:25 +0300 :
 Hello! You wrote:
 
  Hi! I have this script and wonder how to change
  it to get it list only number 2 to number 6 and
  not each?
 
  while (list ($key,$val) = each ($headers)) {
  print pb.$val./b/p;
   }
 
 while (list ($key,$val) = each ($headers) and
$key = 6 and
$key = 2) {
 
print pb.$val./b/p;
 }
 
 Eh?

Oh, if $key contains the number, than yes.  I understood his question
differently.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 2 days 7 hours 29 minutes

--
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] htmlspecialchars() and MySQL

2001-09-12 Thread Alexander Skwar

So sprach »Augusto Cesar Castoldi« am 2001-09-12 um 08:52:29 -0300 :
 i'm using htmlspecialchars()...

Switch to addslashes() to insert the data and stripslashes() when
fetching the data from the DB + htmlentities/htmlspecialchars to display
the values.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 2 days 7 hours 31 minutes

--
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] Verify E-Mail Address

2001-09-12 Thread Alexander Skwar

So sprach »Jeff Grossman« am 2001-09-12 um 12:16:29 -0700 :
 Hello,
 
 I have a page which is a form for people to fill in.  There is one input 
 line where the user enters in an e-mail address.  Currently the page is 
 using java to verify that e-mail address.  It looks like the java code 
 is only checking for an @ side, but I want it to also check for a . 
 and the end of the domain type.  Somebody else wrote this code for me, 

Well, in theory, legal adresses do not need to contain a . in the domain
part.  Neither RFC822 requires this, nor anything else.  In fact,
foobar@tv is a completely legal adress.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 2 days 14 hours 59 minutes

--
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 do I inserting the content of a TEXT file into a PHP document?

2001-09-12 Thread Alexander Skwar

So sprach »David Otton« am 2001-09-12 um 13:47:53 +0100 :
 On Wed, 12 Sep 2001 14:37:59 +0200, you wrote:
 
 I would like to insert the HTML code in a TXT document. How do I do this?
 On a normal website I'd make an SHTML site with the !--#include
 virtual=news.txt --
 
 Can't you still do this?

No, it's either SHTML or PHP.  IIRC, Apache 2.0 will be able to handle
SHTML'd PHP files (or rather: two (or more?) handlers for one file).

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 2 days 15 hours 1 minute

--
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] Email checking

2001-09-13 Thread Alexander Skwar

So sprach »Max Mouse« am 2001-09-13 um 11:28:01 -0700 :
 the domain actually exists. Can anyone lend a hand?

My try:

 function CheckEmail($adr){
   // Parameter:
   // $adr  - Email Adress
   // Rückgabewerte:
   // TRUE  - everything fine
   // Else, returns array:
   // Array(code, part)
   // Code s.u.; part: Part which caused error
   // -1- no @ in adr
   // -2- More than 1 @ (alas theoretically correct...)
   // -3- Error in Local-Part 
   // -4- Error in Domainname
   // -5- Domain not existent
   // -6- No MX for Domain

   // Regexpe
   $re = array(
 // - Local-Part
 'lp'  = '[a-z_\d][-_.a-z\d]{0,}',
 // - Domain
 'dom' = '(?:[a-z\d]{1,}(?:[-a-z\d]{0,}?){0,}?\.){0,}[a-z]{2,3}\.{0,1}'
   );

   foreach ($re as $typ = $wert){
 $re[$typ] = '÷^' . $wert . '$÷i';
   }

   if (('' == $adr) ||
   (FALSE === ($parts = split('@', $adr)))
  ){
 // Nothing to do
 return array('code' = -1, 'part' = $adr);
   }
   if (2  ($part_anzahl = count($parts))){
 // Less than 1 @ (also 0)
 return array('code' = -2, 'part' = $adr);
   }
   if (2  $part_anzahl){
 // Too many @'s!
 return array('code' = -3, 'part' = $adr);
   }
   if (! preg_match($re['lp'], $parts[0])){
 // Local-Part error!
 return array('code' = -4, 'part' = $parts[0]);
   }
   if (! preg_match($re['dom'], $parts[1])){
 // Domain looks bogus!
 return array('code' = -5, 'part' = $parts[1]);
   }
   if (! checkdnsrr($parts[1], 'ANY')){
 // Domain not existant
 return array('code' = -6, 'part' = $parts[1]);
   }
   if (! checkdnsrr($parts[1], 'MX')){
 // No MX for domain
 return array('code' = -7, 'part' = $parts[1]);
   }

   // When we get here, everything is fine!
   return TRUE;
 }

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 12 hours 58 minutes

--
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] minus in [] groups in ereg

2001-09-13 Thread Alexander Skwar

So sprach »Andrew Perevodchik« am 2001-09-13 um 18:32:03 +0300 :
 Is this a bug or feature? The only way to include

Feature.  See the manual or maybe perldoc perlre.

You don't need to escape it, if you put it as the very first item, like
so:

[-A-Z0-9]

Also, why are you escaping =, %, . and _ inside the character class?
I'm not sure, but I don't think it's needed.

 [[A-Za-z0-9\_\-\=\%\.]] won't work with - as it is supposed to
 [[A-Za-z0-9\_\=\%\.\-]] is ok

And finally - why two [ and ]?  Why not just 1 of each?

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 15 hours 4 minutes

--
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: Email checking

2001-09-13 Thread Alexander Skwar

So sprach »Lukas« am 2001-09-14 um 09:12:14 +1200 :
 accepting SMTP server may or may not verify the recipient user in realtime,
 it may que it and then return invalid mail a little later.

That's right, yes - but in the more-and-more becoming rare case, that it
rejects it, it's known that it's a wrong adress.  So, getting a Email
is okay answer means nothing - but if you get a Email is wrong
answer, you know that it is wrong.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 16 hours 11 minutes

--
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] is PHP crazy, or am I?

2001-09-13 Thread Alexander Skwar

So sprach »Tom Carter« am 2001-09-14 um 03:58:50 +0100 :
 maybe I'm wrong, but don't you need a return value?

No, he doesn't .  Have a look at the 1st parameter.

PS: Fullquotes are not necessary.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 23 hours 47 minutes

--
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] Forced download??

2001-09-13 Thread Alexander Skwar

So sprach »Zhu George-CZZ010« am 2001-09-13 um 17:46:13 -0500 :
 Is there a way to do that?

Yes, send a bogus filetype, maybe something like
application/x-download.

PS: Please keep your lines below ~72 characters.

 Thanks ahead!

Yep.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 23 hours 49 minutes

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




  1   2   >