Re: [PHP] Re: Array Sorting Headaches

2004-04-19 Thread Burhan Khalid
Torsten Roehr wrote:

Burhan Khalid [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Greetings everyone :

  Having a hard time with this one. I have a multi-dim array
$foo[$x][$y]['key'], where $x and $y are numeric. Here is some sample data

[ snipped ]

I need to filter the results so that I get the latest expiry date for
each product.  The expires field actually contains a timestamp.  So for
the sample array above, the resultant array would have only keys 0 and
2, filtering out all the rest.  There are around 180+ main entries, with
any number of sub entries, but each sub entry has the same four keys.
Any ideas? Getting a rather large headache mulling over this.


Hi,

as your structure is always the same you could just loop through all
elements and subelements and use unset() to remove the unwanted array
elements:
foreach ($foo as $key = $value) {

foreach ($value as $subkey = $subvalue) {

// put your check logic here
if ($foo[$key][$subkey]['expires'] == '') {
   unset($foo[$key][$subkey]);
}
}
}
What do you think?
Well this is what I have right now, but the problem is the logic which 
checks to see for each domain which is the last expired date. I have 
three nested for loops right now, and not getting anywhere :(

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


[PHP] Re: Why are Session Variables carried over into a brand new browser window?

2004-04-19 Thread Rob Adams
Bob Bruce - Programmer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

 A target=blank

href=http://www.themuralsofwinnipeg.com/Mpages/index.php?action=gotomuralm
 uralid=179

 so this opens a new browser window, but it is inheriting the session
values
 from the browser window that called it and is causing problems in the new
 window. When I open a new browser window shouldn't it start a whole new
 session and not get anything from the previous browser.

What browser are you using?  I've seen this topic come up before, and it
tends to be an issue with the client rather than the server.  The client I
use happens to avoid sending the session cookie from a new window, so this
doesn't generally happen to me, while other clients default to sending the
session cookie.

BTW - cool site.

  -- Rob

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



Re: [PHP] Re: Array Sorting Headaches

2004-04-19 Thread Torsten Roehr
Burhan Khalid [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Torsten Roehr wrote:

  Burhan Khalid [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
 
 Greetings everyone :
 
Having a hard time with this one. I have a multi-dim array
 $foo[$x][$y]['key'], where $x and $y are numeric. Here is some sample
data
 
 [ snipped ]

 I need to filter the results so that I get the latest expiry date for
 each product.  The expires field actually contains a timestamp.  So for
 the sample array above, the resultant array would have only keys 0 and
 2, filtering out all the rest.  There are around 180+ main entries, with
 any number of sub entries, but each sub entry has the same four keys.
 
 Any ideas? Getting a rather large headache mulling over this.
 
 
  Hi,
 
  as your structure is always the same you could just loop through all
  elements and subelements and use unset() to remove the unwanted array
  elements:
 
  foreach ($foo as $key = $value) {
 
  foreach ($value as $subkey = $subvalue) {
 
  // put your check logic here
  if ($foo[$key][$subkey]['expires'] == '') {
 
 unset($foo[$key][$subkey]);
  }
  }
  }
 
  What do you think?

 Well this is what I have right now, but the problem is the logic which
 checks to see for each domain which is the last expired date. I have
 three nested for loops right now, and not getting anywhere :(

Maybe it works if you put the expires value in a seperate array, sort it and
then you can get the key of the first one and use unset():

foreach ($foo as $key = $value) {

 $tempArray = array();

 foreach ($value as $subkey = $subvalue) {

 // add expires value only to the temporary array for
sorting
 $tempArray[$subkey] = $foo[$key][$subkey]['expires'];
 }

 // sort array by value descending
 arsort($tempArray);

 // get first (and therefore highest timestamp) key/value pair
 $firstEntry = each($tempArray);
 $notneededSubkey = $firstEntry['key'];

 // now unset the array value with the not needed subkey
 unset($foo[$key][$notneededSubkey]);
}

Have not tried it but may work. Hope you see my point.

Regards, Torsten Roehr

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



Re: [PHP] Re: php accelerator for php5rc1 ?

2004-04-19 Thread David Herring
Hi Thomas,

Thanks for the correction.

My current undertanding is that zend-acelerator, phpa, turck-mmache and 
apc do not
support PHP5.0rc1 ? Is there any accelerator that does ?

Thx dave

Thomas Seifert wrote:

On Sat, 17 Apr 2004 19:01:21 +0100 [EMAIL PROTECTED] (David Herring) wrote:

 

The latest Zend optimiser - 3.60 does not support php 5 - is there any 
alternative accelerators which do ?
   

uhm, afaik the optimiser is not an accelerator, more kind of a loader for
encrypted files.
You would have to use the zend-accelerator, phpa, turck-mmcache, apc or similar 
products.


thomas

 



--

David Herring
---
Netfm Ltd
T: 07092 140694
M: 07766 086179
F: 07092 337656
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: Array Sorting Headaches

2004-04-19 Thread Burhan Khalid
Torsten Roehr wrote:

Burhan Khalid [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Torsten Roehr wrote:


Burhan Khalid [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

Greetings everyone :

 Having a hard time with this one. I have a multi-dim array
$foo[$x][$y]['key'], where $x and $y are numeric. Here is some sample
data

[ snipped ]


I need to filter the results so that I get the latest expiry date for
each product.  The expires field actually contains a timestamp.  So for
the sample array above, the resultant array would have only keys 0 and
2, filtering out all the rest.  There are around 180+ main entries, with
any number of sub entries, but each sub entry has the same four keys.
Any ideas? Getting a rather large headache mulling over this.


Hi,

as your structure is always the same you could just loop through all
elements and subelements and use unset() to remove the unwanted array
elements:
foreach ($foo as $key = $value) {

   foreach ($value as $subkey = $subvalue) {

   // put your check logic here
   if ($foo[$key][$subkey]['expires'] == '') {
  unset($foo[$key][$subkey]);
   }
   }
}
What do you think?
Well this is what I have right now, but the problem is the logic which
checks to see for each domain which is the last expired date. I have
three nested for loops right now, and not getting anywhere :(


Maybe it works if you put the expires value in a seperate array, sort it and
then you can get the key of the first one and use unset():
foreach ($foo as $key = $value) {

 $tempArray = array();

 foreach ($value as $subkey = $subvalue) {

 // add expires value only to the temporary array for
sorting
 $tempArray[$subkey] = $foo[$key][$subkey]['expires'];
 }
 // sort array by value descending
 arsort($tempArray);
 // get first (and therefore highest timestamp) key/value pair
 $firstEntry = each($tempArray);
 $notneededSubkey = $firstEntry['key'];
 // now unset the array value with the not needed subkey
 unset($foo[$key][$notneededSubkey]);
}
Have not tried it but may work. Hope you see my point.
Well, it does some sorting, but not quite what I'm after :(

I've managed to get the list so that all the (sub) entries are sorted in 
the correct order.  Now its just a matter of finding the highest expire 
date for /each/ domain, and delete the other entries for that domain. 
So, in the end, all that's left is one entry per domain, with its latest 
expire date.

Hopefully this makes it a bit clearer.

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


Re: [PHP] Re: Array Sorting Headaches

2004-04-19 Thread Torsten Roehr
 Well, it does some sorting, but not quite what I'm after :(

 I've managed to get the list so that all the (sub) entries are sorted in
 the correct order.  Now its just a matter of finding the highest expire
 date for /each/ domain, and delete the other entries for that domain.
 So, in the end, all that's left is one entry per domain, with its latest
 expire date.

 Hopefully this makes it a bit clearer.

OK, so it's just the other way round - I see. Instead of deleting the entry
with the highest expiry date we delete all the others:

foreach ($foo as $key = $value) {

  $tempArray = array();

  foreach ($value as $subkey = $subvalue) {

  // add expires value only to the temporary array for
sorting
  $tempArray[$subkey] = $foo[$key][$subkey]['expires'];
  }

  // sort array by value descending
  arsort($tempArray);

  /* new stuff starts here */
  // remove the entry with the latest expiry (the first array
element)
  array_push($tempArray);

  // now unset all remaining/not needed entries
  foreach ($tempArray as $tempKey = $tempValue) {

  unset($foo[$key][$tempKey]);
  }
}

By the way, isn't there a way to filter this stuff BEFORE or WHILE the whole
array is created?

Regards, Torsten

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



Re: [PHP] Re: php accelerator for php5rc1 ?

2004-04-19 Thread Elfyn McBratney
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello David

On Monday 19 Apr 2004 08:34, David Herring wrote:
 Hi Thomas,

 Thanks for the correction.

 My current undertanding is that zend-acelerator, phpa, turck-mmache and
 apc do not
 support PHP5.0rc1 ? Is there any accelerator that does ?


Although Turck MMCache doesn't yet officially support PHP5, it works (very 
well here).  If your able to test it with PHP5 and send bugs when/if you get 
any problems, then it might be ready sooner. :)

Elfyn

 Thomas Seifert wrote:
 On Sat, 17 Apr 2004 19:01:21 +0100 [EMAIL PROTECTED] (David Herring) 
wrote:
 The latest Zend optimiser - 3.60 does not support php 5 - is there any
 alternative accelerators which do ?
 
 uhm, afaik the optimiser is not an accelerator, more kind of a loader
  for encrypted files.
 You would have to use the zend-accelerator, phpa, turck-mmcache, apc or
  similar products.

- -- 
Elfyn McBratney, EMCB
mailto:[EMAIL PROTECTED]
http://www.emcb.co.uk/

PGP Key ID: 0x456548B4
PGP Key Fingerprint:
  29D5 91BB 8748 7CC9 650F  31FE 6888 0C2A 4565 48B4

Error: quote_machine(): Dry humour detected.

 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 
 ~  Linux london 2.6.5-emcb-243 #2 i686 GNU/Linux  ~ 
 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAg6a1aIgMKkVlSLQRAoPOAKCKtRqolmvH7zWWIgvQCSjCd1jdGgCgnHkC
/w/ofhJWCaox6YmuCT2NUh0=
=S7tI
-END PGP SIGNATURE-

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



[PHP] C or C++

2004-04-19 Thread Brent Clark
Hi All

Just a quick question, is PHP written in C or C++.

Kind Regards
Brent Clark

Re: [PHP] Re: php accelerator for php5rc1 ?

2004-04-19 Thread Thomas Seifert
Hi David,

I'm not quite sure if its worth the trouble to officially support
a php-version which is not yet stable.
I remember that, at least, turck-mmcache has unofficial support for php5.


thomas

David Herring ([EMAIL PROTECTED]) schrieb:


 Hi Thomas,

 Thanks for the correction.

 My current undertanding is that zend-acelerator, phpa, turck-mmache and
 apc do not
 support PHP5.0rc1 ? Is there any accelerator that does ?

 Thx dave


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



Re: [PHP] Regexp hyperlink

2004-04-19 Thread Martin Visser
Thanks alot!

It's indeed an ingenious way of doing it!

Martin

Richard Harb schreef:

A while ago I've been looking at some piece of code of the tikiwiki
project to see how they did some of their magic...
Basically they run through the whole text and if they found something
that was translated they made a hash and replaced the actual text with
it and stored the link in an assoc array.
when all occurrences of translatable elements were found they ran
through the array and replaced all hashes with the translated text.
I found that to be quite an ingenious way of doing it ...
Then again it might have misread/misinterpreted the code :)
Richard

Sunday, April 18, 2004, 10:08:51 PM, thus was written:
 

I can't figure out how to do this.
   

 

I've four different methods for changing a piece of text into a hyperlink.
the text:
[link=www.hotmail.com]hotmail[/link] 
[link=http://www.hotmail.com]hotmail[/link] www.hotmail.com 
http://www.hotmail.com
   

 

what it should become (offcourse in HTML it will change to a real 
hyperlink):
a href=http://www.hotmail.com; target=_blankhotmail/a a 
href=http://www.hotmail.com; target=_blankhotmail/a a 
href=http://www.hotmail.com; target=_blankwww.hotmail.com/a a
href=http://www.hotmail.com;
target=_blankhttp://www.hotmail.com/a
   

 

i've got this regexps, at this point there are two different ones and I
would like to combine them (not really necessary):
1.
   $text= str_replace([link=http://;, [link=, $text);
   $text= preg_replace(/\[link=(.+)\](.+)\[\/link\]/U, a 
href=\http://\\1\; target=\_blank\\\2/a, $text);
   

 

2.
   $text= 
preg_replace(!(((http(s?)://)|(www|home\.))([-a-z0-9.]{2,}\.[a-z]{2,4}(:[0-9]+)?)((/([^\s]*[^\s.,\'])?)?)((\?([^\s]*[^\s.,\'])?)?))!i,
a href=\http\\4://\\5\\6\\8\\9\ target=\_blank\\\1/a, $text);
// I copied this one, maybe someone knows a better one?
   

 

the problem is that it's replaced a second time resulting in this:
a href=a href=http://www.hotmail.com 
   

target=_blankhttp://www.hotmail.com/a]hotmail[/link] [link=a 
 

href=http://www.hotmail.com; target=_blankwww.hotmail.com/a 
   

target=_blankhotmail/a a href=http://www.hotmail.com; 
target=_blankwww.hotmail.com/a a href=http://www.hotmail.com; 
target=_blankhttp://www.hotmail.com/a

 

the last two (without the [link=] part) are working
   



Re: [PHP] Re: Array Sorting Headaches

2004-04-19 Thread Burhan Khalid
Torsten Roehr wrote:

Well, it does some sorting, but not quite what I'm after :(

I've managed to get the list so that all the (sub) entries are sorted in
the correct order.  Now its just a matter of finding the highest expire
date for /each/ domain, and delete the other entries for that domain.
So, in the end, all that's left is one entry per domain, with its latest
expire date.
Hopefully this makes it a bit clearer.


OK, so it's just the other way round - I see. Instead of deleting the entry
with the highest expiry date we delete all the others:
foreach ($foo as $key = $value) {

  $tempArray = array();

  foreach ($value as $subkey = $subvalue) {

  // add expires value only to the temporary array for
sorting
  $tempArray[$subkey] = $foo[$key][$subkey]['expires'];
  }
  // sort array by value descending
  arsort($tempArray);
  /* new stuff starts here */
  // remove the entry with the latest expiry (the first array
element)
  array_push($tempArray);
  // now unset all remaining/not needed entries
  foreach ($tempArray as $tempKey = $tempValue) {
  unset($foo[$key][$tempKey]);
  }
}
By the way, isn't there a way to filter this stuff BEFORE or WHILE the whole
array is created?
Thanks for the help. I'll give that snippet a try and see what comes out.

The array is a result of a rather nasty SQL statement running against a 
database (which I didn't design). Unfortunately, the way the database is 
designed, its very difficult to extract the domain information.

I am in the process of rewriting the entire thing as a Java application, 
hopefully that will make things a bit clearer, since I'll also be 
refactoring the database schema.

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


php-general Digest 19 Apr 2004 12:20:42 -0000 Issue 2714

2004-04-19 Thread php-general-digest-help

php-general Digest 19 Apr 2004 12:20:42 - Issue 2714

Topics (messages 183785 through 183799):

Re: session var puzzle
183785 by: Tom Rogers
183787 by: Larry Brown

Problems compiling a DSO in BSD/OS 5.1
183786 by: The Doctor

Re: why doesn't this work ?
183788 by: Andy Ladouceur

Re: Array Sorting Headaches
183789 by: Burhan Khalid
183791 by: Torsten Roehr
183793 by: Burhan Khalid
183794 by: Torsten Roehr
183799 by: Burhan Khalid

Re: Why are Session Variables carried over into a brand new browser window?
183790 by: Rob Adams

Re: php accelerator for php5rc1 ?
183792 by: David Herring
183795 by: Elfyn McBratney
183797 by: Thomas Seifert

C or C++
183796 by: Brent Clark

Re: Regexp hyperlink
183798 by: Martin Visser

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--
---BeginMessage---
Hi,

Monday, April 19, 2004, 8:46:02 AM, you wrote:
KB Dear list,
KB I am sorry for the second posting, but this is going
KB to drive me to drink something other than lattes! 

KB I have one page, index.php.  when it calls mod_sub, a
KB directory type of page is printed.  Here I am trying
KB to set a session var of the most recently selected
KB category to allow the user to return the to same place
KB in the directory.

KB when I do this:
KB $_SESSION['CategoryID'] = 230; in mod_sub

KB then in mod_profile:
KB print($_SESSION['CategoryID']);
KB will print 230

KB when I do this:
KB $Tmp = 230;
KB $_SESSION['CategoryID'] = $Tmp; in mod_sub

KB in mod_profile:
KB print($_SESSION['CategoryID']);
KB will print 230

KB BUT, when I do this:
KB $_SESSION['CategoryID'] = $Data['ID']; in mod_sub
KB $_SESSION['CategoryID'] = intval($Data['ID']);


KB in mod_profile:
KB print($_SESSION['CategoryID']);
KB will print '' and 0

KB I am setting several other session variables
KB throughout the code without any unexpected behavior. 
KB I have even tried changing the index to something odd
KB in case I am resetting 'CategoryID' somewhere and
KB forgotten it.  But no matter what I try, once I set it
KB = $Data['ID'] I get the odd result.

KB BTW, if I print $_SESSION['CategoryID'] from mod_sub
KB right after setting, it holds the expected value. 
KB This is really frustrating, I must be missing
KB something basic about the way session vars can be set.


KB Kathleen


put this at the top of each page and see if you get any undefined
variables warnings as it may be a problem of variable scope

error_reporting(E_ALL);


-- 
regards,
Tom
---End Message---
---BeginMessage---
In the last pair of examples where it fails, you know you are first
assigning the value of $Data['ID'] to the $_SESSION['CategoryID'] and the
over-writing that value with the value of intval($Data['ID'])?  Why are you
assigning $Data['ID'] to it if you are going to overwrite it?  If those
other tests work then I doubt that it is a session problem.  I'd
double-check to make sure that $Data['ID'] is holding a reasonable value.

-Original Message-
From: Kathleen Ballard [mailto:[EMAIL PROTECTED]
Sent: Sunday, April 18, 2004 6:46 PM
To: [EMAIL PROTECTED]
Subject: [PHP] session var puzzle


Dear list,
I am sorry for the second posting, but this is going
to drive me to drink something other than lattes!

I have one page, index.php.  when it calls mod_sub, a
directory type of page is printed.  Here I am trying
to set a session var of the most recently selected
category to allow the user to return the to same place
in the directory.

when I do this:
$_SESSION['CategoryID'] = 230; in mod_sub

then in mod_profile:
print($_SESSION['CategoryID']);
will print 230

when I do this:
$Tmp = 230;
$_SESSION['CategoryID'] = $Tmp; in mod_sub

in mod_profile:
print($_SESSION['CategoryID']);
will print 230

BUT, when I do this:
$_SESSION['CategoryID'] = $Data['ID']; in mod_sub
$_SESSION['CategoryID'] = intval($Data['ID']);


in mod_profile:
print($_SESSION['CategoryID']);
will print '' and 0

I am setting several other session variables
throughout the code without any unexpected behavior.
I have even tried changing the index to something odd
in case I am resetting 'CategoryID' somewhere and
forgotten it.  But no matter what I try, once I set it
= $Data['ID'] I get the odd result.

BTW, if I print $_SESSION['CategoryID'] from mod_sub
right after setting, it holds the expected value.
This is really frustrating, I must be missing
something basic about the way session vars can be set.


Kathleen

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---End Message---
---BeginMessage---
Can someone tell me where to start?

I was able to compile a DSO in BSD/OS 4.3.1 .  I try to use the same setup
in BSD/OS 

Re: [PHP] Re: Array Sorting Headaches

2004-04-19 Thread Torsten Roehr
  OK, so it's just the other way round - I see. Instead of deleting the
entry
  with the highest expiry date we delete all the others:
 
  foreach ($foo as $key = $value) {
 
$tempArray = array();
 
foreach ($value as $subkey = $subvalue) {
 
// add expires value only to the temporary array for
  sorting
$tempArray[$subkey] = $foo[$key][$subkey]['expires'];
}
 
// sort array by value descending
arsort($tempArray);
 
/* new stuff starts here */
// remove the entry with the latest expiry (the first array
  element)
array_push($tempArray);
 
// now unset all remaining/not needed entries
foreach ($tempArray as $tempKey = $tempValue) {
 
unset($foo[$key][$tempKey]);
}
  }
 
  By the way, isn't there a way to filter this stuff BEFORE or WHILE the
whole
  array is created?

 Thanks for the help. I'll give that snippet a try and see what comes out.

 The array is a result of a rather nasty SQL statement running against a
 database (which I didn't design). Unfortunately, the way the database is
 designed, its very difficult to extract the domain information.

 I am in the process of rewriting the entire thing as a Java application,
 hopefully that will make things a bit clearer, since I'll also be
 refactoring the database schema.

Please let me know if it works. I'm sure there's a more elegant way to do
it.

 Many thanks,
 Burhan

You're welcome ;)

Torsten

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



[PHP] Best practice for creating mysql database structure for menus navigation

2004-04-19 Thread dr. zoidberg
Hello,

What will be the best database structure for creating web site 
navigation, menus with submenus (unlimited levels).

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


[PHP] Re: Best practice for creating mysql database structure for menus navigation

2004-04-19 Thread Torsten Roehr
Dr. Zoidberg [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hello,

 What will be the best database structure for creating web site
 navigation, menus with submenus (unlimited levels).

I'd suggest 2 id columns:

CREATE TABLE menu (
  menuItemID int(11) NOT NULL auto_increment,
  parentMenuItemID int(11) NOT NULL default '0',
  label varchar(255) NOT NULL default '',
  PRIMARY KEY (menuItemID),
  INDEX parentMenuItemID (parentMenuItemID)
) TYPE=myISAM;

At the top level parentMenuItemID is 0, otherwise it's the value of its
parent menuItem. Then you recursively load the menu structure. I think there
are some good PEAR classes to do this.

Regards,

Torsten Roehr

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



[PHP] Re: C or C++

2004-04-19 Thread Eric Bolikowski

Brent Clark [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi All

Just a quick question, is PHP written in C or C++.

Kind Regards
Brent Clark

It is written i C.
One hint is that PHP is procedural, and the same is C.
Maybe some beautieful day someone willl write a C++ version :)

Eric

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



[PHP] Help with shorting this please

2004-04-19 Thread Don Myers
PHP gurus. I know this can be made shorter but I can't seem to figure out
how.

This is a PHP CLI script I use to go through a directory listing a act upon
file matching the same prefix and/or suffix if supplied. This is the code I
use now.

// set up the prefix and/or suffix if I want to match on certain files
$deleteprefix = ;
$deletesuffix = ;

// Open the folder
$dir_handle = @opendir($rootpath) or die(Unable to open .$rootpath. hot
folder\n);

// Loop through the files
while ($file = readdir($dir_handle)) {

if (substr($file,0,1)  .) {
// tests
if (($deleteprefix == ) and ($deletesuffix == )) {
// if both are empty just send anything
logger(Deleted: .$file. Last Modified: .date(F j, Y
,filemtime($rootpath.$file)));
unlink($rootpath.$file);
} elseif (($deleteprefix != ) and ($deletesuffix != )) {
// if both have something test both
if ((substr($file,0,strlen($deleteprefix)) == $deleteprefix)
and (substr($file,-strlen($deletesuffix)) == $deletesuffix)) {
logger(Deleted: .$file. Last Modified: .date(F j, Y
,filemtime($rootpath.$file)));
unlink($rootpath.$file);
}
} elseif (($deleteprefix == ) and ($deletesuffix != )) {
// if prefix is empty but suffix is not
if (substr($file,-strlen($deletesuffix)) == $deletesuffix) {
logger(Deleted: .$file. Last Modified: .date(F j, Y
,filemtime($rootpath.$file)));
unlink($rootpath.$file);
}
} elseif (($deleteprefix != ) and ($deletesuffix == )) {
// if suffix is empty but prefix is not
if (substr($file,0,strlen($deleteprefix)) == $deleteprefix)
{
logger(Deleted: .$file. Last Modified: .date(F j, Y
,filemtime($rootpath.$file)));
unlink($rootpath.$file);
}
}

}
}

As you can see I test the filename 4 times depending on if the prefix or
suffix was supplied. Can somebody help me make this shorter? I don't think
all those tests are necessary if I could figure out the syntax.

DMyers

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



[PHP] Why NNTP is not default protocol for php groups

2004-04-19 Thread T. H. Grejc
Hello,

I've seen this subject before, but never really got any answer. PHP have 
news server at news.php.net but it is 'always' down and it is only a 
mailing list mirror, so some messages get lost or get 'out of thread'.

I dont have to say that you will save your self, and to us, subscribers 
a lot of bandwidth. I host my own mail server and e-mail is charged even 
if I dont read it. If I read newsgroups, i will download headers only 
and than messages I want to red. This way you will save at least 30% 
bandwidth because many people would download only messages they want to 
read. Now you have to mail every subscriber.

If somebody still prefer mailing lists, you can easily create 
news-ezmlm gateway, but focus is that NNTP is the primary way to 
communicate (and to have good news server, not the broken one like now. 
I bet that current mailing list server can host double subscribers news 
server).

What do other subscribers think?

TNX and sorry for bad English.

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


Re: [PHP] addslashes vs. mysql_real_escape_string

2004-04-19 Thread Hardik Doshi
Thank you John.

Currently i am using PEAR DB abstration layer. Which
function should i use to escape the ' character? There
are couple of functions in the PEAR DB documentation
so i don't know which one should i use.

Hardik 
 
--- John W. Holmes [EMAIL PROTECTED] wrote:
 Richard Davey wrote:
 
  Does mysql_real_escape_string (or
 mysql_escape_string) do anything
  extra that addslashes() doesn't? In the examples
 in the manual it is
  just used to escape the ' character, but that is
 exactly what
  addslashes() will do anyway.
 
 real_escape_string() takes the current character set
 into consideration 
 when it escapes characters. Probably 99% of the time
 it's going to 
 behave like addslashes(), but it's still good to use
 it because you're 
 letting the database determine what needs to be
 escaped rather than just 
 assuming it's only the characters covered by
 addslashes().
 
  Is mysql_real_escape_string tolerant of magic
 quotes? i.e. will you
  end up with double-quoted strings like: it\\'s a
 lovely day if you
  call it too many times?
 
 Yes, you'll end up with extra backslashes. If you
 ever see it\'s a 
 lovely day in your database, then you're escaping
 the string more than 
 once. You shouldn't see escape characters in your
 database or have to 
 stripslashes() anything coming out of your database
 (unless you have 
 magic_quotes_runtime() enabled).
 
 -- 
 ---John Holmes...
 
 Amazon Wishlist:
 www.amazon.com/o/registry/3BEXC84AB3A5E/
 
 php|architect: The Magazine for PHP Professionals –
 www.phparch.com
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 





__
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash

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



Re: [PHP] Best practice for creating mysql database structure for menus navigation

2004-04-19 Thread Marco Schuler
Hi

Am Mo, 2004-04-19 um 15.22 schrieb dr. zoidberg:
 Hello,
 
 What will be the best database structure for creating web site 
 navigation, menus with submenus (unlimited levels).

If you are fine with oop, than maybe 

http://pear.php.net/package/DB_NestedSet

would be worth a look. Renderers for different menu-types are also
included.

-- 
Regards
 Marco

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



Re: [PHP] addslashes vs. mysql_real_escape_string

2004-04-19 Thread John W. Holmes
From: Hardik Doshi [EMAIL PROTECTED]
 Currently i am using PEAR DB abstration layer. Which
 function should i use to escape the ' character? There
 are couple of functions in the PEAR DB documentation
 so i don't know which one should i use.

I don't use PEAR DB, but it looks like quoteSmart() is what I'd use.

---John Holmes...

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



Re: [PHP] Help with shorting this please

2004-04-19 Thread Kelly Hallman
Apr 19 at 10:03am, Don Myers wrote:
 PHP gurus. I know this can be made shorter but I can't seem to figure
 out how. This is a PHP CLI script I use to go through a directory
 listing a act upon file matching the same prefix and/or suffix if
 supplied. This is the code I use now.

First of all, I made some stylistic changes. I prefer to
interpolate {$variables} like so or to use sprintf().

I changed your variable name $file, as there is a built-in function file().
I couldn't say if that actually would conflict or not, because I would never
do that :) Avoiding that type of potential conflict is just a good habit.

To shorten the code, I think you could just test the prefix and suffix
without checking which of them are set. I didn't test your code, but I
imagine your code would also evaluate as you expect, were they blank or
not. Same with the regex here; however, I didn't test this code either.

Hopefully this type of optimization is what you were looking for.
- Kelly


// constant; preferred date format
define('DATE_FMT','F j, Y');

// set file prefix and suffix
$deleteprefix = ;
$deletesuffix = ;

// create regex pattern
$regexpattern = sprintf('/^%s.*%s$/',$deleteprefix,$deletesuffix);

// open folder or die!
$dir_handle = @opendir($rootpath) or
die(Unable to open {$rootpath}: not folder\n);

// loop through files in directory
while ($fname = readdir($dir_handle)) {

   // remove files matching the prefix/suffix, that don't start with dot
   if (preg_match($regexpattern,$fname)  substr($fname,0,1) != '.') {
  $modtime = date(DATE_FMT,filemtime($rootpath.$fname));
  logger(sprintf('Deleted: %s Last Modified: %s',$fname,$modtime));
  unlink($rootpath.$fname); }

}

-- 
Kelly Hallman
// Ultrafancy

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



[PHP] How to disable browser's back- and refresh-Button

2004-04-19 Thread Marco Schuler
Hi

I want to prevent the user to use the browser's back-/refresh-button in
my multipage registration form (as well as in other forms). How can I do
this?

Thanks for your help!

-- 
Regards
 Marco

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



Re: [PHP] Help with shorting this please

2004-04-19 Thread Curt Zirzow
* Thus wrote Don Myers ([EMAIL PROTECTED]):
 PHP gurus. I know this can be made shorter but I can't seem to figure out
 how.
 
 This is a PHP CLI script I use to go through a directory listing a act upon
 file matching the same prefix and/or suffix if supplied. This is the code I
 use now.
 
 // set up the prefix and/or suffix if I want to match on certain files
 $deleteprefix = ;
 $deletesuffix = ;
 

$match = $deleteprefix*$deletesuffix;

foreach (glob($rootpath.$match) as $file) {
  logger(Deleted: .$file. Last Modified: .date(F j, 
Y,filemtime($rootpath.$file)));
  unlink($rootpath.$file);
}


Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

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



Re: [PHP] How to disable browser's back- and refresh-Button

2004-04-19 Thread John Nichel
Marco Schuler wrote:
Hi

I want to prevent the user to use the browser's back-/refresh-button in
my multipage registration form (as well as in other forms). How can I do
this?
Thanks for your help!

You can't with PHP.

--
***
*  _  __   __  __   _  * John  Nichel *
* | |/ /___ __ \ \/ /__ _ _| |__ ___  __ ___ _ __  * 716.856.9675 *
* | ' / -_) _` \ \/\/ / _ \ '_| / /(_-_/ _/ _ \ '  \ * 737 Main St. *
* |_|\_\___\__, |\_/\_/\___/_| |_\_\/__(_)__\___/_|_|_|* Suite #150   *
*  |___/   * Buffalo, NY  *
* http://www.KegWorks.com[EMAIL PROTECTED] * 14203 - 1321 *
***
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] How to disable browser's back- and refresh-Button

2004-04-19 Thread John W. Holmes
From: Marco Schuler [EMAIL PROTECTED]

 I want to prevent the user to use the browser's back-/refresh-button in
 my multipage registration form (as well as in other forms). How can I do
 this?

You don't. I decide when I want to go back and/or refresh, not you. You need
to program your application to handle the event when it occurs.

---John Holmes...

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



Re: [PHP] How to disable browser's back- and refresh-Button

2004-04-19 Thread Marco Schuler
Hi

Am Mo, 2004-04-19 um 17.18 schrieb John Nichel:
 Marco Schuler wrote:
  Hi
  
  I want to prevent the user to use the browser's back-/refresh-button in
  my multipage registration form (as well as in other forms). How can I do
  this?
  
  Thanks for your help!
  
 
 You can't with PHP.

It's going OT in this case, sorry! But how to do it then? JavaScript?
And if yes: how?

-- 
Regards
 Marco

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



Re: [PHP] How to disable browser's back- and refresh-Button

2004-04-19 Thread Marco Schuler
Hi

Am Mo, 2004-04-19 um 17.25 schrieb John W. Holmes:
 From: Marco Schuler [EMAIL PROTECTED]
 
  I want to prevent the user to use the browser's back-/refresh-button in
  my multipage registration form (as well as in other forms). How can I do
  this?
 
 You don't. I decide when I want to go back and/or refresh, not you. You need
 to program your application to handle the event when it occurs.

Ok. But what is the strategy then to determin this?

-- 
Regards
 Marco

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



Re: [PHP] Why NNTP is not default protocol for php groups

2004-04-19 Thread Curt Zirzow
* Thus wrote T. H. Grejc ([EMAIL PROTECTED]):
 Hello,
 
 I've seen this subject before, but never really got any answer. PHP have 
 news server at news.php.net but it is 'always' down and it is only a 
 mailing list mirror, so some messages get lost or get 'out of thread'.

I've never had any problems with news.php.net being down or loosing
messages.  As for 'out of thread', that is usually due to the
person's email/newsreader client not replying correctly to a
thread.


Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

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



Re: [PHP] How to disable browser's back- and refresh-Button

2004-04-19 Thread Elfyn McBratney
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello Marco,

On Monday 19 Apr 2004 16:39, Marco Schuler wrote:
 Hi

 Am Mo, 2004-04-19 um 17.18 schrieb John Nichel:
  Marco Schuler wrote:
   Hi
  
   I want to prevent the user to use the browser's back-/refresh-button in
   my multipage registration form (as well as in other forms). How can I
   do this?
  
   Thanks for your help!
 
  You can't with PHP.

 It's going OT in this case, sorry! But how to do it then? JavaScript?
 And if yes: how?

I doubt this is even possible let alone portable accross different browsers.  
But if it is, Javascript would be the way to go.  Where to look for examples?  
I don't know..  try Google.

Elfyn

- -- 
Elfyn McBratney, EMCB
mailto:[EMAIL PROTECTED]
http://www.emcb.co.uk/

PGP Key ID: 0x456548B4
PGP Key Fingerprint:
  29D5 91BB 8748 7CC9 650F  31FE 6888 0C2A 4565 48B4

Error: quote_machine(): Dry humour detected.

 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 
 ~  Linux london 2.6.5-emcb-243 #2 i686 GNU/Linux  ~ 
 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAg/3raIgMKkVlSLQRAkkrAJ42jS3hXotR4JUSqiOwcrsQU0cTLQCdGTEk
+lbzpPO75dKAns0qZu6+5Z8=
=7RSu
-END PGP SIGNATURE-

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



Re: [PHP] How to disable browser's back- and refresh-Button

2004-04-19 Thread John Nichel
Marco Schuler wrote:
Hi

Am Mo, 2004-04-19 um 17.25 schrieb John W. Holmes:

From: Marco Schuler [EMAIL PROTECTED]

I want to prevent the user to use the browser's back-/refresh-button in
my multipage registration form (as well as in other forms). How can I do
this?
You don't. I decide when I want to go back and/or refresh, not you. You need
to program your application to handle the event when it occurs.


Ok. But what is the strategy then to determin this?

http://www.google.com/search?hl=enie=UTF-8oe=UTF-8q=javascript+disable+back+buttonbtnG=Google+Search

--
***
*  _  __   __  __   _  * John  Nichel *
* | |/ /___ __ \ \/ /__ _ _| |__ ___  __ ___ _ __  * 716.856.9675 *
* | ' / -_) _` \ \/\/ / _ \ '_| / /(_-_/ _/ _ \ '  \ * 737 Main St. *
* |_|\_\___\__, |\_/\_/\___/_| |_\_\/__(_)__\___/_|_|_|* Suite #150   *
*  |___/   * Buffalo, NY  *
* http://www.KegWorks.com[EMAIL PROTECTED] * 14203 - 1321 *
***
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] How to disable browser's back- and refresh-Button

2004-04-19 Thread James E Hicks III
On Monday 19 April 2004 12:22 pm, Marco Schuler wrote:
 Hi

 I want to prevent the user to use the browser's back-/refresh-button in
 my multipage registration form (as well as in other forms). How can I do
 this?


If you look back in the archives of this list you will see the way that I did 
this. It wasn't more than a month ago that I posted it. Basically whenever I 
displayed a form I included a hidden tag with form_id that is saved in DB. 
When user submits form check that form_id exists in DB then delete it. If the 
form_id was found in DB, process form. If the form_id was not found in the 
DB, do not process the form and alert the user that they shouldn't be using 
the back button, refresh button, or pressing submit more than once.

James

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



RE: [PHP] How to disable browser's back- and refresh-Button

2004-04-19 Thread Hawkes, Richard
Yes, I think unconstructive e-mails are a little rude aren't they? 

So here's a bit of JavaScript that removes everything! I'll let you fiddle
with the settings:

html
head
titleExample/title
script language=JavaScript
  function openWindow(webPage)
  {
window.open (webPage, 'helpwindow', config='height=300, width=600,
toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no,
directories=no, status=no');
  }
/script
/head
body
a href=javascript:openWindow('whatever.html')WHATEVER!/a
/body
/html


-Original Message-
From: Marco Schuler [mailto:[EMAIL PROTECTED]
Sent: 19 April 2004 17:40
To: [EMAIL PROTECTED]
Subject: Re: [PHP] How to disable browser's back- and refresh-Button


Hi

Am Mo, 2004-04-19 um 17.18 schrieb John Nichel:
 Marco Schuler wrote:
  Hi
  
  I want to prevent the user to use the browser's back-/refresh-button in
  my multipage registration form (as well as in other forms). How can I do
  this?
  
  Thanks for your help!
  
 
 You can't with PHP.

It's going OT in this case, sorry! But how to do it then? JavaScript?
And if yes: how?

-- 
Regards
 Marco

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


==
This message is for the sole use of the intended recipient. If you received
this message in error please delete it and notify us. If this message was
misdirected, CSFB does not waive any confidentiality or privilege. CSFB
retains and monitors electronic communications sent through its network.
Instructions transmitted over this system are not binding on CSFB until they
are confirmed by us. Message transmission is not guaranteed to be secure.
==

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



Re: [PHP] How to disable browser's back- and refresh-Button

2004-04-19 Thread Arthur Pelkey
on any current browser simply removing the button from view, does not 
remove the function, but i guess it is a start

Hawkes, Richard wrote:

Yes, I think unconstructive e-mails are a little rude aren't they? 

So here's a bit of JavaScript that removes everything! I'll let you fiddle
with the settings:
html
head
titleExample/title
script language=JavaScript
  function openWindow(webPage)
  {
window.open (webPage, 'helpwindow', config='height=300, width=600,
toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no,
directories=no, status=no');
  }
/script
/head
body
a href=javascript:openWindow('whatever.html')WHATEVER!/a
/body
/html
-Original Message-
From: Marco Schuler [mailto:[EMAIL PROTECTED]
Sent: 19 April 2004 17:40
To: [EMAIL PROTECTED]
Subject: Re: [PHP] How to disable browser's back- and refresh-Button
Hi

Am Mo, 2004-04-19 um 17.18 schrieb John Nichel:

Marco Schuler wrote:

Hi

I want to prevent the user to use the browser's back-/refresh-button in
my multipage registration form (as well as in other forms). How can I do
this?
Thanks for your help!

You can't with PHP.


It's going OT in this case, sorry! But how to do it then? JavaScript?
And if yes: how?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] How to disable browser's back- and refresh-Button

2004-04-19 Thread Chris W. Parker
Hawkes, Richard mailto:[EMAIL PROTECTED]
on Monday, April 19, 2004 8:31 AM said:

 Yes, I think unconstructive e-mails are a little rude aren't they?

i agree... but i didn't see any unconstructive emails. did you?

 So here's a bit of JavaScript that removes everything! I'll let you
 fiddle with the settings:

seeing that this is not a javascript list i don't see how it could be
construed as rude that no one (except you, such a gracious and
open-minded person are you) provided an answer.




chris.

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



Re: [PHP] How to disable browser's back- and refresh-Button

2004-04-19 Thread John Nichel
Hawkes, Richard wrote:
Yes, I think unconstructive e-mails are a little rude aren't they? 
As opposed to asking an offtopic question to which there are hundreds of 
answers to if one would just ask on the right list or, (perish the 
thought) go to http://www.google.com?

So here's a bit of JavaScript that removes everything! I'll let you fiddle
with the settings:
html
head
titleExample/title
script language=JavaScript
  function openWindow(webPage)
  {
window.open (webPage, 'helpwindow', config='height=300, width=600,
toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no,
directories=no, status=no');
  }
/script
/head
body
a href=javascript:openWindow('whatever.html')WHATEVER!/a
/body
/html
And this stops me from right clicking on the page and choosing Back how?

--
***
*  _  __   __  __   _  * John  Nichel *
* | |/ /___ __ \ \/ /__ _ _| |__ ___  __ ___ _ __  * 716.856.9675 *
* | ' / -_) _` \ \/\/ / _ \ '_| / /(_-_/ _/ _ \ '  \ * 737 Main St. *
* |_|\_\___\__, |\_/\_/\___/_| |_\_\/__(_)__\___/_|_|_|* Suite #150   *
*  |___/   * Buffalo, NY  *
* http://www.KegWorks.com[EMAIL PROTECTED] * 14203 - 1321 *
***
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] How to disable browser's back- and refresh-Button

2004-04-19 Thread Richard Davey
Hello Marco,

Monday, April 19, 2004, 5:22:26 PM, you wrote:

MS I want to prevent the user to use the browser's back-/refresh-button in
MS my multipage registration form (as well as in other forms). How can I do
MS this?

There is NO foolproof way to do this. You can open your form in a new
browser window that does not display those buttons, but you still
cannot protect against someone right-clicking the form and then
picking Back or Refresh. Even with JavaScript that disables
right-clicking, users can circumvent this simply by disabling
JavaScript.

The more logical solution is to code a form system that can handle
users going back a page without erroring.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



Re: [PHP] addslashes vs. mysql_real_escape_string

2004-04-19 Thread Justin Patrin
John W. Holmes wrote:

From: Hardik Doshi [EMAIL PROTECTED]

Currently i am using PEAR DB abstration layer. Which
function should i use to escape the ' character? There
are couple of functions in the PEAR DB documentation
so i don't know which one should i use.


I don't use PEAR DB, but it looks like quoteSmart() is what I'd use.

---John Holmes...
You may also want to look into quoteIdentifier for table and column 
names as well.

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


Re: [PHP] Why NNTP is not default protocol for php groups

2004-04-19 Thread Justin Patrin
Curt Zirzow wrote:

* Thus wrote T. H. Grejc ([EMAIL PROTECTED]):

Hello,

I've seen this subject before, but never really got any answer. PHP have 
news server at news.php.net but it is 'always' down and it is only a 
mailing list mirror, so some messages get lost or get 'out of thread'.


I've never had any problems with news.php.net being down or loosing
messages.  As for 'out of thread', that is usually due to the
person's email/newsreader client not replying correctly to a
thread.
Curt
Same for me, I've used the newsgroup interface for quite a while now and 
it's never been down or lost messages on me. It's likely that the out 
of thread thing is a difference between your newsgroup client's 
threading code and your mail readers threading code. Some programs (such 
as mutt) can also use subject matching for threads while most others 
only use headers.

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


[PHP] oo question

2004-04-19 Thread Chris W. Parker
hi.

i've recently realized that the little oo code i've written is
actually not very oo at all. it's more like procedural code wrapped in a
class.

armed with my new knowledge i'm in the process of modifying my current
classes to be more oo (or what i like to this is more oo). so i'm going
to ask two questions and show two different examples stripped down to
their bare minimums as to not flood the list with code.

1. my question has to do with abstraction (i think that's the right
word).

CLASS AS IT STANDS CURRENTLY:

class Customer
{
function get_customer_info($customer_id)
{
// grab data from db

// return data in form of array
}
}

USAGE:
?php

$customer_id = 45;

$cust = new Customer;

$customer_data = $cust-get_customer_info($customer_id);

echo first name: {$customer_data[0]['fname']}\n;
echo last name: {$customer_data[0]['lname']}\n;
echo age: {$customer_data[0]['age']}\n;
?

PROPOSED CHANGE:

class Customer
{
var $fname;
var $lname;
var $age;

function Customer($customer_id = 0)
{
if($customer_id  0)
{
$this-initialize_customer($customer_id);
}
}

function initialize_customer($customer_id)
{
// grab data from db

$this-fname = $...[0]['fname'];
$this-lname = $...[0]['lname'];
$this-age   = $...[0]['age'];
}

function first_name($fname = )
{
if(empty($fname))
{
return $this-fname;
}
else
{
$this-fname = $fname;
}
}

function last_name(...)
{
// same as above but with last name
}

function age(...)
{
// same as above but with age
}
}


?php

$customer_id = 45;

$cust = new Customer($customer_id);

echo first name: .$cust-first_name().\n;
echo last name: .$cust-last_name().\n;
echo age name: .$cust-age().\n;
?


so although the second class has a lot more code in it, it also allows
me to change what happens behinds the scenes (i.e. variable names) more
easily. for example the customer will always have a first_name but i
may not always want to use $fname to represent it within the class.

this revised class, in my limited experience, seems to be much more oo
than my current class.

seeing as how this email turned out longer than i had planned i will
only be asking one question at this time. in fact i can't even remember
what my second question was anyway. :)


any and all comments are appreciated!


thanks,
chris.

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



RE: [PHP] oo question

2004-04-19 Thread Edward Peloke
so, would you add a function to return all if you wish?  I am finally
breaking my habits with php and trying the oo approach also.  So, this:
function Customer($customer_id = 0)

doesn't always set the customer_id to 0 even when you pass one in?

Eddie

-Original Message-
From: Chris W. Parker [mailto:[EMAIL PROTECTED]
Sent: Monday, April 19, 2004 1:33 PM
To: [EMAIL PROTECTED]
Subject: [PHP] oo question


hi.

i've recently realized that the little oo code i've written is
actually not very oo at all. it's more like procedural code wrapped in a
class.

armed with my new knowledge i'm in the process of modifying my current
classes to be more oo (or what i like to this is more oo). so i'm going
to ask two questions and show two different examples stripped down to
their bare minimums as to not flood the list with code.

1. my question has to do with abstraction (i think that's the right
word).

CLASS AS IT STANDS CURRENTLY:

class Customer
{
function get_customer_info($customer_id)
{
// grab data from db

// return data in form of array
}
}

USAGE:
?php

$customer_id = 45;

$cust = new Customer;

$customer_data = $cust-get_customer_info($customer_id);

echo first name: {$customer_data[0]['fname']}\n;
echo last name: {$customer_data[0]['lname']}\n;
echo age: {$customer_data[0]['age']}\n;
?

PROPOSED CHANGE:

class Customer
{
var $fname;
var $lname;
var $age;

function Customer($customer_id = 0)
{
if($customer_id  0)
{
$this-initialize_customer($customer_id);
}
}

function initialize_customer($customer_id)
{
// grab data from db

$this-fname = $...[0]['fname'];
$this-lname = $...[0]['lname'];
$this-age   = $...[0]['age'];
}

function first_name($fname = )
{
if(empty($fname))
{
return $this-fname;
}
else
{
$this-fname = $fname;
}
}

function last_name(...)
{
// same as above but with last name
}

function age(...)
{
// same as above but with age
}
}


?php

$customer_id = 45;

$cust = new Customer($customer_id);

echo first name: .$cust-first_name().\n;
echo last name: .$cust-last_name().\n;
echo age name: .$cust-age().\n;
?


so although the second class has a lot more code in it, it also allows
me to change what happens behinds the scenes (i.e. variable names) more
easily. for example the customer will always have a first_name but i
may not always want to use $fname to represent it within the class.

this revised class, in my limited experience, seems to be much more oo
than my current class.

seeing as how this email turned out longer than i had planned i will
only be asking one question at this time. in fact i can't even remember
what my second question was anyway. :)


any and all comments are appreciated!


thanks,
chris.

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

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



[PHP] How to disable browser's back button, refresh button and multiple clicks of submit buttons using PHP.

2004-04-19 Thread James E Hicks III
This is the only way that I have been able to insure that the users can not 
use any of the bad buttons (back,refresh,double-click submit). The 
java-script solutions will only work for users that have java-script enabled.

I put the following in my authenticate.php which is included at the top of 
every page.

authenticate.php
?
if ($_POST['form_id'] != ''){
mysql_select_db(form_authentication);
$query = select count(*) as valid_form from form_id where form_id = 
'.$_POST['form_id'].';
extract(mysql_fetch_array(mysql_query($query)));
if ( $valid_form  1 ){
include(warn_doubleclick.php);
exit;
} else {
mysql_select_db(form_authentication);
$query = delete from form_id where form_id = 
'.$_POST['form_id'].';
mysql_query($query);
}
}
/*
MORE AUTHENTICATE STUFF HERE
*/
function create_form_id(){
mysql_select_db(form_authentication);
$new_form_id = uniqid(rand(),1);
$query = insert into form_id values ( '$new_form_id' );
mysql_query($query);
$form_field = input type=\hidden\ name=\form_id\ 
value=\$new_form_id\;
return $form_field;
}
?


Then inside every form that I want to protect from back button , refresh 
button or double-clicking of the submit button I echo the results of 
create_form_id inside the form tag. I also remember to include 
authenticate.php which is going to actually stop the user from resubmitting 
the same form.

?php
include(authenticate.php);
include(header.php);
echo form action=\.$_SERVER['PHP_SELF'].\ method=\POST\;
echo input type=\text\ name=\test\;
echo create_form_id();
echo /form;
include(footer.php);
?

Here is an example warn_doubleclick.php that you can edit to your taste. This 
is what the users will be redirected to if they break the button rules.

?php
include(header.php);
echo (BRBRh2You have double clicked the submit button titledb);
echo ($_POST['submit']./b or attempted to process this form twice by using 
the back button or the refresh button./h2);
echo (BRBRa href=index.phpReturn to Program/a);
include(footer.php);
?

Here is the SQL to create necessary DB and table.

CREATE DATABASE form_authentication;
CREATE TABLE form_id (
  form_id varchar(50) NOT NULL default ''
) TYPE=MyISAM;

James Hicks

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



[PHP] Re: oo question

2004-04-19 Thread Torsten Roehr
so although the second class has a lot more code in it, it also allows
me to change what happens behinds the scenes (i.e. variable names) more
easily. for example the customer will always have a first_name but i
may not always want to use $fname to represent it within the class.
this revised class, in my limited experience, seems to be much more oo
than my current class.
seeing as how this email turned out longer than i had planned i will
only be asking one question at this time. in fact i can't even remember
what my second question was anyway. :)
any and all comments are appreciated!
thanks,
chris.

Hi Chris,

the second approach is definitely much, much better and the right way to go.
But what exactly is your QUESTION?
One personal suggestion: you could directly put the code from
initialize_customer() into the constructor.

Regards,

Torsten Roehr

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



RE: [PHP] oo question

2004-04-19 Thread Chris W. Parker
Edward Peloke mailto:[EMAIL PROTECTED]
on Monday, April 19, 2004 10:49 AM said:

 this: function Customer($customer_id = 0)
 
 doesn't always set the customer_id to 0 even when you pass one in?

no. that is the default value for a function if *no* value is passed in.



chris.

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



RE: [PHP] oo question

2004-04-19 Thread Chris W. Parker
Chris W. Parker 
on Monday, April 19, 2004 11:03 AM said:

 Edward Peloke mailto:[EMAIL PROTECTED]
 on Monday, April 19, 2004 10:49 AM said:
 
 this: function Customer($customer_id = 0)
 
 doesn't always set the customer_id to 0 even when you pass one in?
 
 no. that is the default value for a function if *no* value is passed
 in.

wait, i should have said yes, it does not always set the customer_id to
0 even when you pass one in.



c.

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



RE: [PHP] Re: oo question

2004-04-19 Thread Chris W. Parker
Torsten Roehr mailto:[EMAIL PROTECTED]
on Monday, April 19, 2004 10:46 AM said:

 the second approach is definitely much, much better and the right way
 to go. But what exactly is your QUESTION?

oh yeah.. umm... i guess at this point it would be which is better?...

as i was writing the email it sort of went in a different direction than
i had originally planned... 

 One personal suggestion: you could directly put the code from
 initialize_customer() into the constructor.

but i'm thinking that i might, at some point, want to use that method
after the object has been instantiated. i can't think of a specific
case, but i'm only imagining that it's possible.



chris.

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



RE: [PHP] Re: oo question

2004-04-19 Thread Edward Peloke
Chris,

Are you thinking of having a class like this for each of the tables in your
db?  I am trying to build myself some reusable code and am trying to think
through the best way to do it.  I have started playing with java and
hibernate and it has classes for each table so I was thinking of doing the
same thing with php.

Eddie

-Original Message-
From: Chris W. Parker [mailto:[EMAIL PROTECTED]
Sent: Monday, April 19, 2004 2:07 PM
To: Torsten Roehr; [EMAIL PROTECTED]
Subject: RE: [PHP] Re: oo question


Torsten Roehr mailto:[EMAIL PROTECTED]
on Monday, April 19, 2004 10:46 AM said:

 the second approach is definitely much, much better and the right way
 to go. But what exactly is your QUESTION?

oh yeah.. umm... i guess at this point it would be which is better?...

as i was writing the email it sort of went in a different direction than
i had originally planned...

 One personal suggestion: you could directly put the code from
 initialize_customer() into the constructor.

but i'm thinking that i might, at some point, want to use that method
after the object has been instantiated. i can't think of a specific
case, but i'm only imagining that it's possible.



chris.

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

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



Re: [PHP] oo question

2004-04-19 Thread Jordi Canals
Chris W. Parker wrote:
hi.

i've recently realized that the little oo code i've written is
actually not very oo at all. it's more like procedural code wrapped in a
class.
armed with my new knowledge i'm in the process of modifying my current
classes to be more oo (or what i like to this is more oo). so i'm going
to ask two questions and show two different examples stripped down to
their bare minimums as to not flood the list with code.
1. my question has to do with abstraction (i think that's the right
word).
Really, the best of OO programing is the code abstraction, and code 
re-use. You should make your classes that way, as you second example does.

With that on mind, you can change everything on yor classes without 
cnaging a single line of the code uses them. Just, you have to maintain 
the plublic methods used on your code, but this public functions have 
not to work the same way from one release to the next ...

Usualy try to do that when developing a class, and you will have nice 
results in the future. Some of my classes have almost nothing about the 
original class, but method names ... and that classes continue working 
with old code that uses the first release of the class.

If sometime in the future a method gets obsolete, what I do is maintain 
it for a while as a dummy method (which does nothing).

In my opinion, your classes will contain much code than a procedural 
design, but abstraction and reuse are much more usefull than short code.

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


Re: [PHP] Re: oo question

2004-04-19 Thread Torsten Roehr
Chris W. Parker [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Torsten Roehr mailto:[EMAIL PROTECTED]
on Monday, April 19, 2004 10:46 AM said:

 the second approach is definitely much, much better and the right way
 to go. But what exactly is your QUESTION?

oh yeah.. umm... i guess at this point it would be which is better?...

as i was writing the email it sort of went in a different direction than
i had originally planned...

 One personal suggestion: you could directly put the code from
 initialize_customer() into the constructor.

but i'm thinking that i might, at some point, want to use that method
after the object has been instantiated. i can't think of a specific
case, but i'm only imagining that it's possible.

OK, though I've not needed this anywhere else in my classes yet. But another
suggestion. You can save a lot of code by generalizing/abstracting the
assignment of your DB result to the class attributes. I'm doing this:

class Base
{
/**
 * Sets properties based on supplied SQL result array with associative
indices
 *
 * @param array $dbResult
 */
function initFromResultSet($dbResult = array())
{
// if a non-empty SQL result set is supplied
if  (is_array($dbResult)  count($dbResult)  0)
{
// get class properties as array
$classProperties =
array_keys(get_class_vars(get_class($this)));

// array keys become object properties with respective value
foreach ($dbResult as $key = $value)
{
// only set values for properties that exist in
the class
if  (in_array($key, $classProperties))
{
$this-$key = $value;
}
}
}
}
}

Then my 'real' class inherits from Base and calls the initFromResultSet()
method:

class Person extends Base() {

function Person($personID) {

// if a valid personID is supplied, get data from DB
if  (Validate::number($personID, array('min' = 1)))
{
// get person data from DB
$query= 'SELECT * FROM ' . TABLE_PERSONS . '
WHERE personID = ' . $personID;
$DB_result= $db-query($query);

   // if person with given ID exists, set attributes
   if   (is_a($DB_result, 'DB_result') 
$DB_result-numRows() == 1)
{

$this-initFromResultSet($DB_result-fetchRow());
}

// else set error and show list again
else{
// handle error
}
}
}
}

Of course the DB result must be an associative array with the column names
being equal to your class attributes. This saves a lot of code and can be
used in any class.

Regards,

Torsten

chris.

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



Re: [PHP] How to disable browser's back button, refresh button and multiple clicks of submit buttons using PHP.

2004-04-19 Thread Marco Schuler
Hi James

Thanks for your realy constructive post! I'll try that out and maybe
come back with some questions (hopefully not) :-)

-- 
Regards
 Marco

Am Mo, 2004-04-19 um 19.42 schrieb James E Hicks III:
 This is the only way that I have been able to insure that the users can not 
 use any of the bad buttons (back,refresh,double-click submit). The 
 java-script solutions will only work for users that have java-script enabled.
 
 I put the following in my authenticate.php which is included at the top of 
 every page.
 
 authenticate.php
 ?
 if ($_POST['form_id'] != ''){
 mysql_select_db(form_authentication);
 $query = select count(*) as valid_form from form_id where form_id = 
 '.$_POST['form_id'].';
 extract(mysql_fetch_array(mysql_query($query)));
 if ( $valid_form  1 ){
 include(warn_doubleclick.php);
 exit;
 } else {
 mysql_select_db(form_authentication);
 $query = delete from form_id where form_id = 
 '.$_POST['form_id'].';
 mysql_query($query);
 }
 }
 /*
 MORE AUTHENTICATE STUFF HERE
 */
 function create_form_id(){
 mysql_select_db(form_authentication);
 $new_form_id = uniqid(rand(),1);
 $query = insert into form_id values ( '$new_form_id' );
 mysql_query($query);
 $form_field = input type=\hidden\ name=\form_id\ 
 value=\$new_form_id\;
 return $form_field;
 }
 ?
 
 
 Then inside every form that I want to protect from back button , refresh 
 button or double-clicking of the submit button I echo the results of 
 create_form_id inside the form tag. I also remember to include 
 authenticate.php which is going to actually stop the user from resubmitting 
 the same form.
 
 ?php
 include(authenticate.php);
 include(header.php);
 echo form action=\.$_SERVER['PHP_SELF'].\ method=\POST\;
 echo input type=\text\ name=\test\;
 echo create_form_id();
 echo /form;
 include(footer.php);
 ?
 
 Here is an example warn_doubleclick.php that you can edit to your taste. This 
 is what the users will be redirected to if they break the button rules.
 
 ?php
 include(header.php);
 echo (BRBRh2You have double clicked the submit button titledb);
 echo ($_POST['submit']./b or attempted to process this form twice by using 
 the back button or the refresh button./h2);
 echo (BRBRa href=index.phpReturn to Program/a);
 include(footer.php);
 ?
 
 Here is the SQL to create necessary DB and table.
 
 CREATE DATABASE form_authentication;
 CREATE TABLE form_id (
   form_id varchar(50) NOT NULL default ''
 ) TYPE=MyISAM;
 
 James Hicks

-- 
Regards
 Marco

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



[PHP] PHP and HTTP requests

2004-04-19 Thread Aleksei Ivanov
Hi,

I realize it's a stupid question but I need a simple solution.. I'd like to get 
contence from script-generated webpage (I send a regquest via get or post method to a 
page and it generates a response page - how do get that page as a string? Get the 
source of the page). It's obvious that it cannot be shown with file functions. Only 
solution I was mentioned vas CURL package but I'd like to solve this with standard 
functions. Is it possible? 

Thanks in advance
Aleksei

-
Hot Mobiil - helinad, logod ja piltsõnumid!
http://portal.hot.ee

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



RE: [PHP] Re: oo question

2004-04-19 Thread Michal Migurski
  One personal suggestion: you could directly put the code from
  initialize_customer() into the constructor.

 but i'm thinking that i might, at some point, want to use that method
 after the object has been instantiated. i can't think of a specific
 case, but i'm only imagining that it's possible.

It could be useful when retrieving real data is expensive.

I've been recently working with a data set that is derived from a
highly-relational database served over HTTP via XML. It's time consuming
to pull new information about a record and not all information is used
everywhere, so I've been using a structure similar to yours with a
lazy-load component -- the data source isn't actually accessed for a
particular piece of information until that piece of information is
specifically requested.

In the example below, properties one and two might refer to linked or
nested objects, each with a high cost of retrieval. The database access
code that is now in your initialize_customer() method gets split up into
logical chunks, and placed in the property_*() methods.

Paraphrased/contrived example:

class thing
{
var $id;
var $property_one;
var $property_two;

function thing($id)
{
$this-id = $id;
}

function get_property_one()
{
if(!$this-property_one) {
// perform request for property one,
// set $this-property_one
}
return $this-property_one;
}

function get_property_two()
{
if(!$this-property_two) {
// perform request for property two,
// set $this-property_two
}
return $this-property_two;
}
}


-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html

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



Re: [PHP] PHP and HTTP requests

2004-04-19 Thread Michal Migurski
 I realize it's a stupid question but I need a simple solution.. I'd like
 to get contence from script-generated webpage (I send a regquest via get
 or post method to a page and it generates a response page - how do get
 that page as a string? Get the source of the page). It's obvious that it
 cannot be shown with file functions. Only solution I was mentioned vas
 CURL package but I'd like to solve this with standard functions. Is it
 possible?

fopen() can support streams, if your configuration allows it:
http://php.net/manual/en/function.fopen.php

Alternatively, you can use the socket functions to hand-roll an HTTP
request, in the event that you need stricter control over POST contents or
specific headers.
http://php.net/manual/en/ref.sockets.php

Or, if you're on a unix system, and curl's available as an executable, and
you consider exec to be a standard function, there's always this:
$response = shell_exec(curl http://www.example.com;);

I always use last method that in preference to the curl functions.
I find them incredibly overengineered. :)

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html

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



Re: [PHP] PHP and HTTP requests

2004-04-19 Thread Richard Davey
Hello Aleksei,

Monday, April 19, 2004, 7:39:43 PM, you wrote:

AI I realize it's a stupid question but I need a simple
AI solution.. I'd like to get contence from script-generated webpage
AI (I send a regquest via get or post method to a page and it
AI generates a response page - how do get that page as a string? Get
AI the source of the page). It's obvious that it cannot be shown with
AI file functions. Only solution I was mentioned vas CURL package but
AI I'd like to solve this with standard functions. Is it possible? 

You can perform a GET request using the standard file functions (fopen
for example) because all the parameters can be passed on the Query
String).

However to make your life easier, and to support POST methods, just
get yourself the excellent free class - Snoopy. I think the web site
is just snoopy.sourceforge.net

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



Re: [PHP] PHP and HTTP requests

2004-04-19 Thread John W. Holmes
From: Aleksei Ivanov [EMAIL PROTECTED]

 I realize it's a stupid question but I need a simple solution.. I'd
 like to get contence from script-generated webpage (I send a
 regquest via get or post method to a page and it generates a
 response page - how do get that page as a string? Get the
 source of the page). It's obvious that it cannot be shown with
 file functions. Only solution I was mentioned vas CURL package
 but I'd like to solve this with standard functions. Is it possible?

$page =
file_get_contents('http://www.domain.com/page.php?param1=value1param2=value
2');

---John Holmes...

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



[PHP] Re: PHP and HTTP requests

2004-04-19 Thread Torsten Roehr
Aleksei Ivanov [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi,

 I realize it's a stupid question but I need a simple solution.. I'd like
to get contence from script-generated webpage
(I send a regquest via get or post method to a page and it generates a
response page - how do get that page as a string?  Get the source of the
page). It's obvious that it cannot be shown with file functions. Only
solution I was mentioned vas  CURL package but I'd like to solve this with
standard functions. Is it possible?

Hi Aleksei,

it might be possible to realize with PHP's output buffering functions. You
could store the output of the dynamic page you would like to get in the
buffer and then pull it into a variable. I don't have any experience with it
but take a look here:

http://de3.php.net/manual/en/function.ob-start.php

Maybe the user comments help. Just an idea.

Regards,
Torsten Roehr


 Thanks in advance
 Aleksei

 -
 Hot Mobiil - helinad, logod ja piltsõnumid!
 http://portal.hot.ee

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



[PHP] PHP Web Hosting

2004-04-19 Thread Martin, Stanley G [Contractor for Sprint]
Some time ago I put up a web site on Domehost.com.  Everything has been
working great and I had a couple questions for their Tech Support but
haven't received any feedback from them, they don't answer their phones.
Also, it is stated on their site that a company called Wintek Computing
took them over last year.  I can't contact them either.  Does anyone
know anything that may have happened here?  I suspect I need to find
another web hosting company before my site just goes away.

Stanley G. Martin
System Administrator
Sprint - EAS Business Intelligence 
[EMAIL PROTECTED]




Re: [PHP] PHP Web Hosting

2004-04-19 Thread Adam Voigt
Not sure about that particular host, but if your looking for one with
good features, and high reliability, I would suggest Spenix.

http://www.spenix.com

I asked them a question about my hosting plan (not even a support
request) at 9PM and was sent a response within 5 minutes. Very good
support, I would definitely recommend them.


On Mon, 2004-04-19 at 15:14, Martin, Stanley G [Contractor for Sprint]
wrote:
 Some time ago I put up a web site on Domehost.com.  Everything has been
 working great and I had a couple questions for their Tech Support but
 haven't received any feedback from them, they don't answer their phones.
 Also, it is stated on their site that a company called Wintek Computing
 took them over last year.  I can't contact them either.  Does anyone
 know anything that may have happened here?  I suspect I need to find
 another web hosting company before my site just goes away.
 
 Stanley G. Martin
 System Administrator
 Sprint - EAS Business Intelligence 
 [EMAIL PROTECTED]
-- 

Adam Voigt
[EMAIL PROTECTED]

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



[PHP] Pear Layout question

2004-04-19 Thread Chris

I asked this on the pear list and haven't received an answer. Hopefully
someone here can help.

I want to move to pear for some of my development/consulting needs. I
have only been exposed to pear for a script that I myself purchased, so
I am not that familiar with it. I know that pear is already installed on
my server, but I cannot speak for future clients. I would like to be
able to give my customers a zip file with my script and all the needed
pear modules. I've looked over the documentation and I did not see
anything touching on this.

What is an effective directory setup for this? Does this seem acceptable?

PEAR
--DB
--HTTP
--SOAP
--NET
--etc

Thanks
Chris

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



RE: [PHP] PHP Web Hosting

2004-04-19 Thread Edward Peloke
I use www.ht-tech.net   very good and reliable.

Eddie

-Original Message-
From: Adam Voigt [mailto:[EMAIL PROTECTED]
Sent: Monday, April 19, 2004 3:21 PM
To: Martin, Stanley G [Contractor for Sprint]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP Web Hosting


Not sure about that particular host, but if your looking for one with
good features, and high reliability, I would suggest Spenix.

http://www.spenix.com

I asked them a question about my hosting plan (not even a support
request) at 9PM and was sent a response within 5 minutes. Very good
support, I would definitely recommend them.


On Mon, 2004-04-19 at 15:14, Martin, Stanley G [Contractor for Sprint]
wrote:
 Some time ago I put up a web site on Domehost.com.  Everything has been
 working great and I had a couple questions for their Tech Support but
 haven't received any feedback from them, they don't answer their phones.
 Also, it is stated on their site that a company called Wintek Computing
 took them over last year.  I can't contact them either.  Does anyone
 know anything that may have happened here?  I suspect I need to find
 another web hosting company before my site just goes away.
 
 Stanley G. Martin
 System Administrator
 Sprint - EAS Business Intelligence 
 [EMAIL PROTECTED]
-- 

Adam Voigt
[EMAIL PROTECTED]

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

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



Re: [PHP] oo question

2004-04-19 Thread Kelly Hallman
Chris,

Apr 19 at 10:33am, Chris W. Parker wrote:
 my question has to do with abstraction (i think that's the word).

I think what you're talking about here is encapsulation. And yes, you are
correct to point out that the second approach allows the more
encapsulation of the object's data. Using methods to set or get the data
stored in the object provides an interface to the object, whereas
accessing the object's properties directly isn't a true interface.

 PROPOSED CHANGE:
 class Customer {
...
function initialize_customer($customer_id) {
// grab data from db
$this-fname = $...[0]['fname'];
$this-lname = $...[0]['lname'];
$this-age   = $...[0]['age'];}

This is perfectly fine, but if you want to use those get/set methods as an 
interface, you're better off not setting the properties as above...

How about something like this:
(also took some liberties with the variable/method names...)

class Customer {

var $res = array();
var $id, $fname, $lname;

function Customer($id=null) {
$id === null || $this-initCustomer($id); }

function firstName($fname=null) {
$fname === null || $this-res['fname'] = $fname;
return $this-res['fname']; }

function lastName($lname=null) {
$lname === null || $this-res['lname'] = $lname;
return $this-res['lname']; }
...
function initCustomer($id=null) {
$id === null || $this-id = $id;
$row = $db-getOne($query); // grab assoc array of db row...
return $this-res = $row; }

function exportCustomer() { return $this-res; }

I think that may better illustrate the benefit of the interface. You can
store the data inside the object, but thanks to encapsulation only the
object itself needs to know how to access or manipulate the data that is
stored inside. As a user of the object, you never need to know what the
internals of the object are. As the developer, you don't need to worry if
you want to change the structure, as long as the interface remains intact.

Since you really don't want to go TOO far with the OO in PHP4, you can 
always store the simple scalar data in the object's properties, and just 
use that as a defacto interface.. for instance $obj-id = 35; is not much 
different from $obj-id(35), and $x = $obj-id; is similar to $obj-id();
Decide which you prefer, but encapsulation is an important OO concept.

My point: it's redundant to have $obj-fname and $obj-firstName(),
and may encourage mixing the way you access the object data from your 
code, which could potentially defeat the purpose of the get/set method.

On that note, you may be interested in the __call(), __get() and __set()
magic methods in PHP5, as they will give you the best of both worlds.
...Among many other nice OO feature improvements in PHP5...

-- 
Kelly Hallman
// Ultrafancy

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



Re: [PHP] PHP Web Hosting

2004-04-19 Thread Arthur Pelkey
any hosting provider that gives me a 500 internal server error when i 
try to navigate to their packages, will get overlooked by me ;)

Edward Peloke wrote:

I use www.ht-tech.net   very good and reliable.

Eddie

-Original Message-
From: Adam Voigt [mailto:[EMAIL PROTECTED]
Sent: Monday, April 19, 2004 3:21 PM
To: Martin, Stanley G [Contractor for Sprint]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP Web Hosting
Not sure about that particular host, but if your looking for one with
good features, and high reliability, I would suggest Spenix.
http://www.spenix.com

I asked them a question about my hosting plan (not even a support
request) at 9PM and was sent a response within 5 minutes. Very good
support, I would definitely recommend them.
On Mon, 2004-04-19 at 15:14, Martin, Stanley G [Contractor for Sprint]
wrote:
Some time ago I put up a web site on Domehost.com.  Everything has been
working great and I had a couple questions for their Tech Support but
haven't received any feedback from them, they don't answer their phones.
Also, it is stated on their site that a company called Wintek Computing
took them over last year.  I can't contact them either.  Does anyone
know anything that may have happened here?  I suspect I need to find
another web hosting company before my site just goes away.
Stanley G. Martin
System Administrator
Sprint - EAS Business Intelligence 
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] PHP Web Hosting

2004-04-19 Thread Edward Peloke
I just clicked the link and get there fine...


-Original Message-
From: Arthur Pelkey [mailto:[EMAIL PROTECTED]
Sent: Monday, April 19, 2004 3:34 PM
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP Web Hosting


any hosting provider that gives me a 500 internal server error when i 
try to navigate to their packages, will get overlooked by me ;)

Edward Peloke wrote:

 I use www.ht-tech.net   very good and reliable.
 
 Eddie
 
 -Original Message-
 From: Adam Voigt [mailto:[EMAIL PROTECTED]
 Sent: Monday, April 19, 2004 3:21 PM
 To: Martin, Stanley G [Contractor for Sprint]
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] PHP Web Hosting
 
 
 Not sure about that particular host, but if your looking for one with
 good features, and high reliability, I would suggest Spenix.
 
 http://www.spenix.com
 
 I asked them a question about my hosting plan (not even a support
 request) at 9PM and was sent a response within 5 minutes. Very good
 support, I would definitely recommend them.
 
 
 On Mon, 2004-04-19 at 15:14, Martin, Stanley G [Contractor for Sprint]
 wrote:
 
Some time ago I put up a web site on Domehost.com.  Everything has been
working great and I had a couple questions for their Tech Support but
haven't received any feedback from them, they don't answer their phones.
Also, it is stated on their site that a company called Wintek Computing
took them over last year.  I can't contact them either.  Does anyone
know anything that may have happened here?  I suspect I need to find
another web hosting company before my site just goes away.

Stanley G. Martin
System Administrator
Sprint - EAS Business Intelligence 
[EMAIL PROTECTED]

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

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



Re: [PHP] PHP Web Hosting

2004-04-19 Thread Arthur Pelkey
sometimes it `loads` a blank white page, when i refresh I get a 500 
internal server error, tried 20-25 times in a row, oh well

Edward Peloke wrote:

I just clicked the link and get there fine...

-Original Message-
From: Arthur Pelkey [mailto:[EMAIL PROTECTED]
Sent: Monday, April 19, 2004 3:34 PM
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP Web Hosting
any hosting provider that gives me a 500 internal server error when i 
try to navigate to their packages, will get overlooked by me ;)

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


[PHP] Re: Pear Layout question

2004-04-19 Thread Torsten Roehr
Chris [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

I asked this on the pear list and haven't received an answer. Hopefully
someone here can help.

I want to move to pear for some of my development/consulting needs. I
have only been exposed to pear for a script that I myself purchased, so
I am not that familiar with it. I know that pear is already installed on
my server, but I cannot speak for future clients. I would like to be
able to give my customers a zip file with my script and all the needed
pear modules. I've looked over the documentation and I did not see
anything touching on this.

What is an effective directory setup for this? Does this seem acceptable?

PEAR
--DB
--HTTP
--SOAP
--NET
--etc

Thanks
Chris

Hi Chris,

look at the require_once statements in the PEAR classes to see which
directories are expected by the packages. But your draft looks OK.

Regards,
Torsten Roehr

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



Re: [PHP] Pear Layout question

2004-04-19 Thread Adrian Madrid
Chris wrote:

I asked this on the pear list and haven't received an answer. Hopefully
someone here can help.
I want to move to pear for some of my development/consulting needs. I
have only been exposed to pear for a script that I myself purchased, so
I am not that familiar with it. I know that pear is already installed on
my server, but I cannot speak for future clients. I would like to be
able to give my customers a zip file with my script and all the needed
pear modules. I've looked over the documentation and I did not see
anything touching on this.
What is an effective directory setup for this? Does this seem acceptable?

PEAR
--DB
--HTTP
--SOAP
--NET
--etc
Thanks
Chris
 

This is the closest you will get with the documentation:

http://pear.php.net/manual/en/installation.shared.php

Maybe what you need to do is follow those steps on a shared host and 
package that in a zip.

--
Adrian Madrid
http://www.hyperxmedia.com
HyperX Media
45 West 9000 South, Unit 2
Sandy, UT 84020
Office: 801.566.0670

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

Re: [PHP] PHP Web Hosting

2004-04-19 Thread John Nichel
Arthur Pelkey wrote:
any hosting provider that gives me a 500 internal server error when i 
try to navigate to their packages, will get overlooked by me ;)
A, comeon.  Where's you sense of adventure?  :o :)

--
***
*  _  __   __  __   _  * John  Nichel *
* | |/ /___ __ \ \/ /__ _ _| |__ ___  __ ___ _ __  * 716.856.9675 *
* | ' / -_) _` \ \/\/ / _ \ '_| / /(_-_/ _/ _ \ '  \ * 737 Main St. *
* |_|\_\___\__, |\_/\_/\___/_| |_\_\/__(_)__\___/_|_|_|* Suite #150   *
*  |___/   * Buffalo, NY  *
* http://www.KegWorks.com[EMAIL PROTECTED] * 14203 - 1321 *
***
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Re: oo question

2004-04-19 Thread Kelly Hallman
Apr 19 at 11:06am, Chris W. Parker wrote:
 Torsten Roehr mailto:[EMAIL PROTECTED]
  One personal suggestion: you could directly put the code from
  initialize_customer() into the constructor.
 
 but i'm thinking that i might, at some point, want to use that method
 after the object has been instantiated. i can't think of a specific
 case, but i'm only imagining that it's possible.

You could conceivably call the constructor as any other method, such as
$obj-Customer(35); ...so, you could collapse it all into a single method.

I think that is not as logical, and you may want to change the
functionality of the constructor later, independent of the method to that
loads the data from the DB, so personally I'd leave it.

Further, I think it's best to keep the constructor as simple as possible,
and try to avoid the temptation of doing too much fancy work there. (Save 
it for a convenient use, like what you have done...)

Reason being, you may want to use the object more generically later.
Perhaps you would write a script that queried the whole user table, and
instantiated many Customer objects.

Sometimes putting too much into the constructor can add overhead if you
want to create lightweight instances of the object for another purpose
that you're not envisioning at the moment.

-- 
Kelly Hallman
// Ultrafancy

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



Re: [PHP] PHP Web Hosting

2004-04-19 Thread Arthur Pelkey
I am all for adventure when money goes into my wallet, the same cannot 
be said for the opposite ;)

John Nichel wrote:

Arthur Pelkey wrote:

any hosting provider that gives me a 500 internal server error when i 
try to navigate to their packages, will get overlooked by me ;)


A, comeon.  Where's you sense of adventure?  :o :)

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


RE: [PHP] PHP Web Hosting

2004-04-19 Thread Vail, Warren
Guess you're not married  ;-)

Warren Vail


-Original Message-
From: Arthur Pelkey [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 19, 2004 12:54 PM
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP Web Hosting


I am all for adventure when money goes into my wallet, the same cannot 
be said for the opposite ;)

John Nichel wrote:

 Arthur Pelkey wrote:
 
 any hosting provider that gives me a 500 internal server error when i
 try to navigate to their packages, will get overlooked by me ;)
 
 
 A, comeon.  Where's you sense of adventure?  :o :)
 

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

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



Re: [PHP] PHP Web Hosting

2004-04-19 Thread Daniel Clark
I'm using www.phpwebhosting.com


 On Mon, 2004-04-19 at 15:14, Martin, Stanley G [Contractor for Sprint]
 wrote:
 Some time ago I put up a web site on Domehost.com.  Everything has been
 working great and I had a couple questions for their Tech Support but
 haven't received any feedback from them, they don't answer their phones.
 Also, it is stated on their site that a company called Wintek Computing
 took them over last year.  I can't contact them either.  Does anyone
 know anything that may have happened here?  I suspect I need to find
 another web hosting company before my site just goes away.

 Stanley G. Martin
 System Administrator
 Sprint - EAS Business Intelligence
 [EMAIL PROTECTED]
 --

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



Re: [PHP] PHP Web Hosting

2004-04-19 Thread John Nichel
Greg Donald wrote:
Your signature is twice the rfc1855 suggested limit.

http://www.faqs.org/rfcs/rfc1855.html

 - If you include a signature keep it short.  Rule of thumb is no longer
than 4 lines.

And the RFC1885 'guidelines' are also almost 10 years old.  I think most 
people today have a fast enough connection to handle the 500+/- bytes of 
my signatureeven if they're still on dial-up.  Of course, I could be 
mistaken and there may still be someone out there using 900baud. ;)

--
***
*  _  __   __  __   _  * John  Nichel *
* | |/ /___ __ \ \/ /__ _ _| |__ ___  __ ___ _ __  * 716.856.9675 *
* | ' / -_) _` \ \/\/ / _ \ '_| / /(_-_/ _/ _ \ '  \ * 737 Main St. *
* |_|\_\___\__, |\_/\_/\___/_| |_\_\/__(_)__\___/_|_|_|* Suite #150   *
*  |___/   * Buffalo, NY  *
* http://www.KegWorks.com[EMAIL PROTECTED] * 14203 - 1321 *
***
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP Web Hosting

2004-04-19 Thread Richard Davey
Hello Stanley,

Monday, April 19, 2004, 8:14:25 PM, you wrote:

MSGCfS Some time ago I put up a web site on Domehost.com.  Everything has been
MSGCfS working great and I had a couple questions for their Tech Support but
MSGCfS haven't received any feedback from them, they don't answer their phones.
MSGCfS Also, it is stated on their site that a company called Wintek Computing
MSGCfS took them over last year.  I can't contact them either.  Does anyone
MSGCfS know anything that may have happened here?  I suspect I need to find
MSGCfS another web hosting company before my site just goes away.

Ditch them and go with Pair Networks (www.pair.com).
Easily the best out there, have used them since 1997!

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



RE: [PHP] PHP Web Hosting

2004-04-19 Thread Martin, Stanley G [Contractor for Sprint]
I've received a number of suggestions as to where I should go to for my
web hosting but it doesn't seem that anyone has any experience with
Domehost. This brings up another question; transferring my Domain name.
If I do move to another hosting site, can I take my domain name with me?

Stanley G. Martin
System Administrator
Sprint - EAS Business Intelligence 
913.762.8667
913.221.8241  PCS
[EMAIL PROTECTED]


-Original Message-
From: Richard Davey [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 19, 2004 3:26 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP Web Hosting

Hello Stanley,

Monday, April 19, 2004, 8:14:25 PM, you wrote:

MSGCfS Some time ago I put up a web site on Domehost.com.  Everything
has been
MSGCfS working great and I had a couple questions for their Tech
Support but
MSGCfS haven't received any feedback from them, they don't answer their
phones.
MSGCfS Also, it is stated on their site that a company called Wintek
Computing
MSGCfS took them over last year.  I can't contact them either.  Does
anyone
MSGCfS know anything that may have happened here?  I suspect I need to
find
MSGCfS another web hosting company before my site just goes away.

Ditch them and go with Pair Networks (www.pair.com).
Easily the best out there, have used them since 1997!

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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

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



[PHP] Finding Screen Size

2004-04-19 Thread I.A. Gray
Hello.

I know it's easy to find the screen res of a user from javascript- but I
want to let my PHP script know what the resolution is.  Is this possible? I
would like the easiest way possible- I'd rather not resort to
sessions/cookies.  Is there a way to make a variable available to PHP?  I
find the get_browser function really useful for the browser info but it
doesn't tell me the res.

many thanks,

Ian Gray

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



Re: [PHP] PHP Web Hosting

2004-04-19 Thread John Nichel
Martin, Stanley G [Contractor for Sprint] wrote:
I've received a number of suggestions as to where I should go to for my
web hosting but it doesn't seem that anyone has any experience with
Domehost. This brings up another question; transferring my Domain name.
If I do move to another hosting site, can I take my domain name with me?
More than likely, your domain name isn't registered with Domehost, but 
with a registar (most hosting companies use a third party registar). 
That's not to say that you can't move it though...as long as you're one 
of the contacts listed for it (do a whois).

--
***
*  _  __   __  __   _  * John  Nichel *
* | |/ /___ __ \ \/ /__ _ _| |__ ___  __ ___ _ __  * 716.856.9675 *
* | ' / -_) _` \ \/\/ / _ \ '_| / /(_-_/ _/ _ \ '  \ * 737 Main St. *
* |_|\_\___\__, |\_/\_/\___/_| |_\_\/__(_)__\___/_|_|_|* Suite #150   *
*  |___/   * Buffalo, NY  *
* http://www.KegWorks.com[EMAIL PROTECTED] * 14203 - 1321 *
***
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] PHP Web Hosting

2004-04-19 Thread Julien Wadin
Of course
You just have to change the DNS of your domain
Your hosteur MUST let you change

-Message d'origine-
De : Martin, Stanley G [Contractor for Sprint]
[mailto:[EMAIL PROTECTED]
Envoye : lundi 19 avril 2004 21:35
A : Richard Davey; [EMAIL PROTECTED]
Objet : RE: [PHP] PHP Web Hosting


I've received a number of suggestions as to where I should go to for my
web hosting but it doesn't seem that anyone has any experience with
Domehost. This brings up another question; transferring my Domain name.
If I do move to another hosting site, can I take my domain name with me?

Stanley G. Martin
System Administrator
Sprint - EAS Business Intelligence 
913.762.8667
913.221.8241  PCS
[EMAIL PROTECTED]


-Original Message-
From: Richard Davey [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 19, 2004 3:26 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP Web Hosting

Hello Stanley,

Monday, April 19, 2004, 8:14:25 PM, you wrote:

MSGCfS Some time ago I put up a web site on Domehost.com.  Everything
has been
MSGCfS working great and I had a couple questions for their Tech
Support but
MSGCfS haven't received any feedback from them, they don't answer their
phones.
MSGCfS Also, it is stated on their site that a company called Wintek
Computing
MSGCfS took them over last year.  I can't contact them either.  Does
anyone
MSGCfS know anything that may have happened here?  I suspect I need to
find
MSGCfS another web hosting company before my site just goes away.

Ditch them and go with Pair Networks (www.pair.com).
Easily the best out there, have used them since 1997!

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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

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

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



Re: [PHP] Why NNTP is not default protocol for php groups

2004-04-19 Thread Red Wingate
Same here, just installed some Newsgroup Software and everything works
just fine for me :-)
 -- red

Justin Patrin wrote:

Curt Zirzow wrote:

* Thus wrote T. H. Grejc ([EMAIL PROTECTED]):

Hello,

I've seen this subject before, but never really got any answer. PHP 
have news server at news.php.net but it is 'always' down and it is 
only a mailing list mirror, so some messages get lost or get 'out of 
thread'.


I've never had any problems with news.php.net being down or loosing
messages.  As for 'out of thread', that is usually due to the
person's email/newsreader client not replying correctly to a
thread.
Curt


Same for me, I've used the newsgroup interface for quite a while now and 
it's never been down or lost messages on me. It's likely that the out 
of thread thing is a difference between your newsgroup client's 
threading code and your mail readers threading code. Some programs (such 
as mutt) can also use subject matching for threads while most others 
only use headers.

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


Re: [PHP] Why NNTP is not default protocol for php groups

2004-04-19 Thread Red Wingate
Same here, just installed some Newsgroup Software and everything works
just fine for me :-)
 -- red

Justin Patrin wrote:

Curt Zirzow wrote:

* Thus wrote T. H. Grejc ([EMAIL PROTECTED]):

Hello,

I've seen this subject before, but never really got any answer. PHP 
have news server at news.php.net but it is 'always' down and it is 
only a mailing list mirror, so some messages get lost or get 'out of 
thread'.


I've never had any problems with news.php.net being down or loosing
messages.  As for 'out of thread', that is usually due to the
person's email/newsreader client not replying correctly to a
thread.
Curt


Same for me, I've used the newsgroup interface for quite a while now and 
it's never been down or lost messages on me. It's likely that the out 
of thread thing is a difference between your newsgroup client's 
threading code and your mail readers threading code. Some programs (such 
as mutt) can also use subject matching for threads while most others 
only use headers.

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


Re: [PHP] PHP Web Hosting

2004-04-19 Thread Greg Donald
On Mon, 2004-04-19 at 15:19, John Nichel wrote:
 And the RFC1885 'guidelines' are also almost 10 years old.  I think most 
 people today have a fast enough connection to handle the 500+/- bytes of 
 my signatureeven if they're still on dial-up.  Of course, I could be 
 mistaken and there may still be someone out there using 900baud. ;)

You missed the point.  But that's ok, I fixed the issue on my end.

:0
* ^From:.*kegworks.com.*
/dev/null


-- 
Greg Donald
[EMAIL PROTECTED]

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



Re: [PHP] Finding Screen Size

2004-04-19 Thread Larry E . Ullman
I know it's easy to find the screen res of a user from javascript- but 
I
want to let my PHP script know what the resolution is.  Is this 
possible? I
would like the easiest way possible- I'd rather not resort to
sessions/cookies.  Is there a way to make a variable available to PHP? 
 I
find the get_browser function really useful for the browser info but it
doesn't tell me the res.
This comes up occasionally here so you can check the archives for 
different solutions. But the basic answer is that you CANNOT use PHP to 
find the screen size. You must use JavaScript and then pass these 
values to PHP using cookies, forms, etc.

Larry

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


Re: [PHP] PHP Web Hosting

2004-04-19 Thread John Nichel
Greg Donald wrote:
On Mon, 2004-04-19 at 15:19, John Nichel wrote:

And the RFC1885 'guidelines' are also almost 10 years old.  I think most 
people today have a fast enough connection to handle the 500+/- bytes of 
my signatureeven if they're still on dial-up.  Of course, I could be 
mistaken and there may still be someone out there using 900baud. ;)


You missed the point.  But that's ok, I fixed the issue on my end.

:0
* ^From:.*kegworks.com.*
/dev/null

I'm happy for you.  Now you just keep quoting outdated guidelines and 
the Internet will be a safer place.

--
***
*  _  __   __  __   _  * John  Nichel *
* | |/ /___ __ \ \/ /__ _ _| |__ ___  __ ___ _ __  * 716.856.9675 *
* | ' / -_) _` \ \/\/ / _ \ '_| / /(_-_/ _/ _ \ '  \ * 737 Main St. *
* |_|\_\___\__, |\_/\_/\___/_| |_\_\/__(_)__\___/_|_|_|* Suite #150   *
*  |___/   * Buffalo, NY  *
* http://www.KegWorks.com[EMAIL PROTECTED] * 14203 - 1321 *
***
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Pear Layout question

2004-04-19 Thread Kelly Hallman
Apr 19 at 7:30pm, Chris wrote:
 I would like to be able to give my customers a zip file with my script
 and all the needed pear modules. I've looked over the documentation and
 I did not see anything touching on this.
 
 PEAR
 --DB
 --HTTP
 --SOAP
 --NET
 ...

As long as the directory containing the PEAR files is in your include
path, and it mimics the same structure as the PEAR directory you have on
the server (where PEAR is installed) you should be good to go.

-- 
Kelly Hallman

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



RE: [PHP] Finding Screen Size

2004-04-19 Thread electroteque
I dont want to start any flames, but there could be a possibility

http://sharkysoft.com/tutorials/jsa/content/037.html

 -Original Message-
 From: I.A. Gray [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 20, 2004 6:36 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Finding Screen Size
 
 
 Hello.
 
 I know it's easy to find the screen res of a user from javascript- but I
 want to let my PHP script know what the resolution is.  Is this 
 possible? I
 would like the easiest way possible- I'd rather not resort to
 sessions/cookies.  Is there a way to make a variable available to PHP?  I
 find the get_browser function really useful for the browser info but it
 doesn't tell me the res.
 
 many thanks,
 
 Ian Gray
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

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



RE: [PHP] Finding Screen Size

2004-04-19 Thread electroteque
actually this could also work

http://www.faqts.com/knowledge_base/view.phtml/aid/131

 -Original Message-
 From: electroteque [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 20, 2004 7:00 AM
 To: I.A. Gray; [EMAIL PROTECTED]
 Subject: RE: [PHP] Finding Screen Size


 I dont want to start any flames, but there could be a possibility

 http://sharkysoft.com/tutorials/jsa/content/037.html

  -Original Message-
  From: I.A. Gray [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, April 20, 2004 6:36 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP] Finding Screen Size
 
 
  Hello.
 
  I know it's easy to find the screen res of a user from javascript- but I
  want to let my PHP script know what the resolution is.  Is this
  possible? I
  would like the easiest way possible- I'd rather not resort to
  sessions/cookies.  Is there a way to make a variable available
 to PHP?  I
  find the get_browser function really useful for the browser info but it
  doesn't tell me the res.
 
  many thanks,
 
  Ian Gray
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php

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

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



[PHP] Cookies

2004-04-19 Thread Fidencio Monroy
Hi all, is there a way to check is a browser is accepting my cookies?
 
Tnx


Re: [PHP] PHP Web Hosting

2004-04-19 Thread Russell P Jones
http://www.networkeleven.com

I have been using these folks for about a year and a half now. They have
done numerous custom builds for me and will do it within 15 minutes of
your request. Pretty amazing customer service.

Russ Jones

On Mon, 19 Apr 2004, Daniel Clark wrote:

 I'm using www.phpwebhosting.com


  On Mon, 2004-04-19 at 15:14, Martin, Stanley G [Contractor for Sprint]
  wrote:
  Some time ago I put up a web site on Domehost.com.  Everything has been
  working great and I had a couple questions for their Tech Support but
  haven't received any feedback from them, they don't answer their phones.
  Also, it is stated on their site that a company called Wintek Computing
  took them over last year.  I can't contact them either.  Does anyone
  know anything that may have happened here?  I suspect I need to find
  another web hosting company before my site just goes away.
 
  Stanley G. Martin
  System Administrator
  Sprint - EAS Business Intelligence
  [EMAIL PROTECTED]
  --

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



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



RE: [PHP] Cookies

2004-04-19 Thread Chris W. Parker
Fidencio Monroy mailto:[EMAIL PROTECTED]
on Monday, April 19, 2004 2:35 PM said:

 Hi all, is there a way to check is a browser is accepting my cookies?

yes that's easy. set the cookie and then test for it. if you can read
the cookie back you're all set! if not, the person is not accepting
cookies. one thing to note, i think you have to change pages or refresh
the current page before you can read the cookie. i.e. you can't read and
write on the same page... ? i'm not totally sure.



chris.

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



Re: [PHP] Unwanted e-mails

2004-04-19 Thread Lester Caine
OK 72 Hours later I got 6 bounce messages back related to Fridays eMails 
direct to lists.php.net ( one of which is yet another attempt to 
unsubscribe from php-db )

From - Mon Apr 19 20:43:21 2004
X-UIDL: 381838
X-Mozilla-Status: 0001
X-Mozilla-Status2: 1000
Received: from pop.lsces.co.uk by lscserver (VPOP3) with POP3; Mon, 19 Apr 2004 20:40:04 +0100
Return-path: 
Delivery-date: Mon, 19 Apr 2004 20:30:30 +0100
Received: from dswu27.btconnect.com ([193.113.154.28])
	by mx1.mail.uk.clara.net with smtp (Exim 4.30)
	id 1BFeTO-000KR9-8m
	for [EMAIL PROTECTED]; Mon, 19 Apr 2004 20:30:30 +0100
Received: from btconnect.com by dswu27.btconnect.com id [EMAIL PROTECTED]; Mon, 19 Apr 2004 20:27:04 +0100
Message-Type: Delivery Report
X400-Received: by /ADMD= /C=WW/; Relayed; Mon, 19 Apr 2004 20:27:02 +0100
X400-Received: by mta dswu27-hme1 in /ADMD= /C=WW/; Relayed; Mon, 19 Apr 2004 20:27:02 +0100
X400-MTS-Identifier: [/ADMD= /C=WW/;dswu27.btc:172167:20040419192702]
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Date: Mon, 19 Apr 2004 20:27:04 +0100
Message-ID: dswu27.btc:172167:20040419192702@btconnect.com
Content-Identifier: Re: (091)PHP(...
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status; boundary=---Multi-Part-Report-Level-1-1-17210
X-Envelope-To: [EMAIL PROTECTED]
X-Clara-Scan: content scanned according to recipient preferences
X-claradeliver-Version: 4.22.15
X-UIDL: 1082403030.78602.chaos.uk.clara.net
X-RCPT: lester
Status: U 
Subject: Delivery Report (failure) for [EMAIL PROTECTED]

-Multi-Part-Report-Level-1-1-17210

This report relates to your message:
Subject: Re: [PHP] Unwanted e-mails,
Message-ID: [EMAIL PROTECTED],
To: [EMAIL PROTECTED]
of Mon, 19 Apr 2004 19:27:02 +

Your message was not delivered to:
[EMAIL PROTECTED]
for the following reason:
Diagnostic was Unable to transfer, Message timed out
Information Message timed out
The Original Message follows:

-Multi-Part-Report-Level-1-1-17210
Content-Type: message/delivery-status
Reporting-MTA: x400; mta dswu27-hme1 in /ADMD= /C=WW/
Arrival-Date: Fri, 16 Apr 2004 19:24:38 +
DSN-Gateway: dns; dswu27.btconnect.com
X400-Conversion-Date: Mon, 19 Apr 2004 20:27:05 +0100
X400-Content-Correlator: Subject: Re: [PHP] Unwanted e-mails,
Message-ID: [EMAIL PROTECTED],
To: [EMAIL PROTECTED]
Original-Envelope-Id: [/ADMD= /C=WW/;[EMAIL PROTECTED]
X400-Content-Identifier: Re: (091)PHP(...
X400-Encoded-Info: ia5-text
Original-Recipient: rfc822; [EMAIL PROTECTED]
Final-Recipient: x400; /RFC-822=php-general(a)lists.php.net/ADMD= /C=WW/
Action: failed
Status: 4.4.7
Diagnostic-Code: Reason 1 (Unable-To-Transfer); Diagnostic 5 (Maximum-Time-Expired)
X400-Supplementary-Info: Message timed out
X400-Originally-Specified-Recipient-Number: 1
X400-Last-Trace: Fri, 16 Apr 2004 19:24:38 +
-Multi-Part-Report-Level-1-1-17210
Content-Type: text/rfc822-headers
Received: from gateway.btopenworld.com (actually host 185.136.40.217.in-addr.arpa) by 
dswu27 with SMTP-CUST (XT-PP) with ESMTP; Fri, 16 Apr 2004 20:24:38 +0100
Received: from gateway (127.0.0.1) by gateway.btopenworld.com (Worldmail 1.3.167) for 
[EMAIL PROTECTED]; 16 Apr 2004 20:36:02 +0100
Delivery-Date: Fri, 16 Apr 2004 20:16:43 +0100
Received: from pb1.pair.com (actually host 4.131.92.216.in-addr.arpa) by dswu194 with 
SMTP (XT-PP); Fri, 16 Apr 2004 20:16:39 +0100
Received: (qmail 19076 invoked by uid 1010); 16 Apr 2004 19:16:10 -
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
list-help: mailto:[EMAIL PROTECTED]
list-unsubscribe: mailto:[EMAIL PROTECTED]
list-post: mailto:[EMAIL PROTECTED]
Delivered-To: mailing list [EMAIL PROTECTED]
Received: (qmail 19063 invoked by uid 1010); 16 Apr 2004 19:16:10 -
Delivered-To: [EMAIL PROTECTED]
Delivered-To: [EMAIL PROTECTED]
Message-ID: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Date: Fri, 16 Apr 2004 20:19:39 +0100
From: Lester Caine [EMAIL PROTECTED]
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113
X-Accept-Language: en, en-us
MIME-Version: 1.0
References: [EMAIL PROTECTED]
In-Reply-To: [EMAIL PROTECTED]
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Posted-By: 81.138.11.136
Subject: Re: [PHP] Unwanted e-mails
-Multi-Part-Report-Level-1-1-17210--
.
Can anybody tell me what is wrong with this?

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] PHP Web Hosting

2004-04-19 Thread Justin Palmer
I have used hostrocket.com and ipowerweb.com with good success.  I don't
think that it is my place per say to tell you who to host with, for I
don't want to give bad advise, if it does not work for you.  I do have a
resource that might be helpful. Here it is http://webhostingforums.com/

Regards,

Justin Palmer



-Original Message-
From: Russell P Jones [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 19, 2004 2:37 PM
To: Daniel Clark
Cc: [EMAIL PROTECTED]; Martin, Stanley G [Contractor for Sprint];
[EMAIL PROTECTED]
Subject: Re: [PHP] PHP Web Hosting


http://www.networkeleven.com

I have been using these folks for about a year and a half now. They have
done numerous custom builds for me and will do it within 15 minutes of
your request. Pretty amazing customer service.

Russ Jones

On Mon, 19 Apr 2004, Daniel Clark wrote:

 I'm using www.phpwebhosting.com


  On Mon, 2004-04-19 at 15:14, Martin, Stanley G [Contractor for 
  Sprint]
  wrote:
  Some time ago I put up a web site on Domehost.com.  Everything has 
  been working great and I had a couple questions for their Tech 
  Support but haven't received any feedback from them, they don't 
  answer their phones. Also, it is stated on their site that a 
  company called Wintek Computing took them over last year.  I can't 
  contact them either.  Does anyone know anything that may have 
  happened here?  I suspect I need to find another web hosting 
  company before my site just goes away.
 
  Stanley G. Martin
  System Administrator
  Sprint - EAS Business Intelligence [EMAIL PROTECTED]
  --

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



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

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



Re: [PHP] Why NNTP is not default protocol for php groups

2004-04-19 Thread T. H. Grejc
Red Wingate wrote:

Same here, just installed some Newsgroup Software and everything works
just fine for me :-)
OK then, I live in East Europe, so maybe my location is to blame for 
frequent news server down time.

But, there is still question of bandwidth. Why php.net don't want to 
save some bandwidth, to them and to all of us as setting news server as 
primary way to host groups? News server as it is now is not great tool 
to follow discussions. You dont have correct threading and other news 
specific features.

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


Re: [PHP] Cookies

2004-04-19 Thread Jordi Canals
Fidencio Monroy wrote:

Hi all, is there a way to check is a browser is accepting my cookies?
 
Tnx

Take a look to the function get_browser(), perhaps could help.

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


Re: [PHP] Unwanted e-mails

2004-04-19 Thread Andy B
i know i got tons of those before... all i did was block the btconnect
address and be done with it just ignore them at least thats all i did


- Original Message - 
From: Lester Caine [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 19, 2004 6:02 PM
Subject: Re: [PHP] Unwanted e-mails


 OK 72 Hours later I got 6 bounce messages back related to Fridays eMails
 direct to lists.php.net ( one of which is yet another attempt to
 unsubscribe from php-db )

  From - Mon Apr 19 20:43:21 2004
  X-UIDL: 381838
  X-Mozilla-Status: 0001
  X-Mozilla-Status2: 1000
  Received: from pop.lsces.co.uk by lscserver (VPOP3) with POP3; Mon, 19
Apr 2004 20:40:04 +0100
  Return-path: 
  Delivery-date: Mon, 19 Apr 2004 20:30:30 +0100
  Received: from dswu27.btconnect.com ([193.113.154.28])
  by mx1.mail.uk.clara.net with smtp (Exim 4.30)
  id 1BFeTO-000KR9-8m
  for [EMAIL PROTECTED]; Mon, 19 Apr 2004 20:30:30 +0100
  Received: from btconnect.com by dswu27.btconnect.com id
[EMAIL PROTECTED]; Mon, 19 Apr 2004 20:27:04 +0100
  Message-Type: Delivery Report
  X400-Received: by /ADMD= /C=WW/; Relayed; Mon, 19 Apr 2004 20:27:02
+0100
  X400-Received: by mta dswu27-hme1 in /ADMD= /C=WW/; Relayed; Mon, 19 Apr
2004 20:27:02 +0100
  X400-MTS-Identifier: [/ADMD= /C=WW/;dswu27.btc:172167:20040419192702]
  From: [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Date: Mon, 19 Apr 2004 20:27:04 +0100
  Message-ID: dswu27.btc:172167:20040419192702@btconnect.com
  Content-Identifier: Re: (091)PHP(...
  MIME-Version: 1.0
  Content-Type: multipart/report; report-type=delivery-status;
boundary=---Multi-Part-Report-Level-1-1-17210
  X-Envelope-To: [EMAIL PROTECTED]
  X-Clara-Scan: content scanned according to recipient preferences
  X-claradeliver-Version: 4.22.15
  X-UIDL: 1082403030.78602.chaos.uk.clara.net
  X-RCPT: lester
  Status: U
  Subject: Delivery Report (failure) for [EMAIL PROTECTED]
 
  -Multi-Part-Report-Level-1-1-17210
 
  This report relates to your message:
  Subject: Re: [PHP] Unwanted e-mails,
  Message-ID: [EMAIL PROTECTED],
  To: [EMAIL PROTECTED]
 
  of Mon, 19 Apr 2004 19:27:02 +
 
  Your message was not delivered to:
  [EMAIL PROTECTED]
  for the following reason:
  Diagnostic was Unable to transfer, Message timed out
  Information Message timed out
 
  The Original Message follows:
 
  -Multi-Part-Report-Level-1-1-17210
  Content-Type: message/delivery-status
 
  Reporting-MTA: x400; mta dswu27-hme1 in /ADMD= /C=WW/
  Arrival-Date: Fri, 16 Apr 2004 19:24:38 +
  DSN-Gateway: dns; dswu27.btconnect.com
  X400-Conversion-Date: Mon, 19 Apr 2004 20:27:05 +0100
  X400-Content-Correlator: Subject: Re: [PHP] Unwanted e-mails,
  Message-ID: [EMAIL PROTECTED],
  To: [EMAIL PROTECTED]
  Original-Envelope-Id: [/ADMD= /C=WW/;[EMAIL PROTECTED]
  X400-Content-Identifier: Re: (091)PHP(...
  X400-Encoded-Info: ia5-text
 
  Original-Recipient: rfc822; [EMAIL PROTECTED]
  Final-Recipient: x400; /RFC-822=php-general(a)lists.php.net/ADMD= /C=WW/
  Action: failed
  Status: 4.4.7
  Diagnostic-Code: Reason 1 (Unable-To-Transfer); Diagnostic 5
(Maximum-Time-Expired)
  X400-Supplementary-Info: Message timed out
  X400-Originally-Specified-Recipient-Number: 1
  X400-Last-Trace: Fri, 16 Apr 2004 19:24:38 +
 
  -Multi-Part-Report-Level-1-1-17210
  Content-Type: text/rfc822-headers
 
  Received: from gateway.btopenworld.com (actually host
185.136.40.217.in-addr.arpa) by dswu27 with SMTP-CUST (XT-PP) with ESMTP;
Fri, 16 Apr 2004 20:24:38 +0100
  Received: from gateway (127.0.0.1) by gateway.btopenworld.com (Worldmail
1.3.167) for [EMAIL PROTECTED]; 16 Apr 2004 20:36:02 +0100
  Delivery-Date: Fri, 16 Apr 2004 20:16:43 +0100
  Received: from pb1.pair.com (actually host 4.131.92.216.in-addr.arpa) by
dswu194 with SMTP (XT-PP); Fri, 16 Apr 2004 20:16:39 +0100
  Received: (qmail 19076 invoked by uid 1010); 16 Apr 2004 19:16:10 -
  Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
  Precedence: bulk
  list-help: mailto:[EMAIL PROTECTED]
  list-unsubscribe: mailto:[EMAIL PROTECTED]
  list-post: mailto:[EMAIL PROTECTED]
  Delivered-To: mailing list [EMAIL PROTECTED]
  Received: (qmail 19063 invoked by uid 1010); 16 Apr 2004 19:16:10 -
  Delivered-To: [EMAIL PROTECTED]
  Delivered-To: [EMAIL PROTECTED]
  Message-ID: [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Date: Fri, 16 Apr 2004 20:19:39 +0100
  From: Lester Caine [EMAIL PROTECTED]
  User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6)
Gecko/20040113
  X-Accept-Language: en, en-us
  MIME-Version: 1.0
  References: [EMAIL PROTECTED]
  In-Reply-To:
[EMAIL PROTECTED]
  Content-Type: text/plain; charset=us-ascii; format=flowed
  Content-Transfer-Encoding: 7bit
  X-Posted-By: 81.138.11.136
  Subject: Re: [PHP] Unwanted e-mails
 
  -Multi-Part-Report-Level-1-1-17210--
  .

 Can anybody tell me what is wrong with this?

 -- 
 Lester Caine
 -
 L.S.Caine Electronic Services

 -- 
 PHP General Mailing List 

Re: [PHP] Unwanted e-mails

2004-04-19 Thread Lester Caine
Andy B wrote:

i know i got tons of those before... all i did was block the btconnect
address and be done with it just ignore them at least thats all i did
BUT that does not help at all. btconnect is my service provider, and I 
have to send my eMails through them. The messages are caused by 
lists.php.net not accepting my messages 

- Original Message - 
From: Lester Caine [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 19, 2004 6:02 PM
Subject: Re: [PHP] Unwanted e-mails



OK 72 Hours later I got 6 bounce messages back related to Fridays eMails
direct to lists.php.net ( one of which is yet another attempt to
unsubscribe from php-db )

From - Mon Apr 19 20:43:21 2004
X-UIDL: 381838
X-Mozilla-Status: 0001
X-Mozilla-Status2: 1000
Received: from pop.lsces.co.uk by lscserver (VPOP3) with POP3; Mon, 19
Apr 2004 20:40:04 +0100

Return-path: 
Delivery-date: Mon, 19 Apr 2004 20:30:30 +0100
Received: from dswu27.btconnect.com ([193.113.154.28])
by mx1.mail.uk.clara.net with smtp (Exim 4.30)
id 1BFeTO-000KR9-8m
for [EMAIL PROTECTED]; Mon, 19 Apr 2004 20:30:30 +0100
Received: from btconnect.com by dswu27.btconnect.com id
[EMAIL PROTECTED]; Mon, 19 Apr 2004 20:27:04 +0100

Message-Type: Delivery Report
X400-Received: by /ADMD= /C=WW/; Relayed; Mon, 19 Apr 2004 20:27:02
+0100

X400-Received: by mta dswu27-hme1 in /ADMD= /C=WW/; Relayed; Mon, 19 Apr
2004 20:27:02 +0100

X400-MTS-Identifier: [/ADMD= /C=WW/;dswu27.btc:172167:20040419192702]
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Date: Mon, 19 Apr 2004 20:27:04 +0100
Message-ID: dswu27.btc:172167:20040419192702@btconnect.com
Content-Identifier: Re: (091)PHP(...
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary=---Multi-Part-Report-Level-1-1-17210

X-Envelope-To: [EMAIL PROTECTED]
X-Clara-Scan: content scanned according to recipient preferences
X-claradeliver-Version: 4.22.15
X-UIDL: 1082403030.78602.chaos.uk.clara.net
X-RCPT: lester
Status: U
Subject: Delivery Report (failure) for [EMAIL PROTECTED]
-Multi-Part-Report-Level-1-1-17210

This report relates to your message:
Subject: Re: [PHP] Unwanted e-mails,
Message-ID: [EMAIL PROTECTED],
To: [EMAIL PROTECTED]
of Mon, 19 Apr 2004 19:27:02 +

Your message was not delivered to:
[EMAIL PROTECTED]
for the following reason:
Diagnostic was Unable to transfer, Message timed out
Information Message timed out
The Original Message follows:

-Multi-Part-Report-Level-1-1-17210
Content-Type: message/delivery-status
Reporting-MTA: x400; mta dswu27-hme1 in /ADMD= /C=WW/
Arrival-Date: Fri, 16 Apr 2004 19:24:38 +
DSN-Gateway: dns; dswu27.btconnect.com
X400-Conversion-Date: Mon, 19 Apr 2004 20:27:05 +0100
X400-Content-Correlator: Subject: Re: [PHP] Unwanted e-mails,
Message-ID: [EMAIL PROTECTED],
To: [EMAIL PROTECTED]
Original-Envelope-Id: [/ADMD= /C=WW/;[EMAIL PROTECTED]
X400-Content-Identifier: Re: (091)PHP(...
X400-Encoded-Info: ia5-text
Original-Recipient: rfc822; [EMAIL PROTECTED]
Final-Recipient: x400; /RFC-822=php-general(a)lists.php.net/ADMD= /C=WW/
Action: failed
Status: 4.4.7
Diagnostic-Code: Reason 1 (Unable-To-Transfer); Diagnostic 5
(Maximum-Time-Expired)

X400-Supplementary-Info: Message timed out
X400-Originally-Specified-Recipient-Number: 1
X400-Last-Trace: Fri, 16 Apr 2004 19:24:38 +
-Multi-Part-Report-Level-1-1-17210
Content-Type: text/rfc822-headers
Received: from gateway.btopenworld.com (actually host
185.136.40.217.in-addr.arpa) by dswu27 with SMTP-CUST (XT-PP) with ESMTP;
Fri, 16 Apr 2004 20:24:38 +0100
Received: from gateway (127.0.0.1) by gateway.btopenworld.com (Worldmail
1.3.167) for [EMAIL PROTECTED]; 16 Apr 2004 20:36:02 +0100

Delivery-Date: Fri, 16 Apr 2004 20:16:43 +0100
Received: from pb1.pair.com (actually host 4.131.92.216.in-addr.arpa) by
dswu194 with SMTP (XT-PP); Fri, 16 Apr 2004 20:16:39 +0100

Received: (qmail 19076 invoked by uid 1010); 16 Apr 2004 19:16:10 -
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
list-help: mailto:[EMAIL PROTECTED]
list-unsubscribe: mailto:[EMAIL PROTECTED]
list-post: mailto:[EMAIL PROTECTED]
Delivered-To: mailing list [EMAIL PROTECTED]
Received: (qmail 19063 invoked by uid 1010); 16 Apr 2004 19:16:10 -
Delivered-To: [EMAIL PROTECTED]
Delivered-To: [EMAIL PROTECTED]
Message-ID: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Date: Fri, 16 Apr 2004 20:19:39 +0100
From: Lester Caine [EMAIL PROTECTED]
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6)
Gecko/20040113

X-Accept-Language: en, en-us
MIME-Version: 1.0
References: [EMAIL PROTECTED]
In-Reply-To:
[EMAIL PROTECTED]

Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Posted-By: 81.138.11.136
Subject: Re: [PHP] Unwanted e-mails
-Multi-Part-Report-Level-1-1-17210--
.
Can anybody tell me what is wrong with this?

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To 

Re: [PHP] Unwanted e-mails

2004-04-19 Thread Andy B
i guess that would be a slight problem then
- Original Message - 
From: Lester Caine [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 19, 2004 6:36 PM
Subject: Re: [PHP] Unwanted e-mails


 Andy B wrote:

  i know i got tons of those before... all i did was block the btconnect
  address and be done with it just ignore them at least thats all i
did

 BUT that does not help at all. btconnect is my service provider, and I
 have to send my eMails through them. The messages are caused by
 lists.php.net not accepting my messages 

  - Original Message - 
  From: Lester Caine [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Monday, April 19, 2004 6:02 PM
  Subject: Re: [PHP] Unwanted e-mails
 
 
 
 OK 72 Hours later I got 6 bounce messages back related to Fridays eMails
 direct to lists.php.net ( one of which is yet another attempt to
 unsubscribe from php-db )
 
 
 From - Mon Apr 19 20:43:21 2004
 X-UIDL: 381838
 X-Mozilla-Status: 0001
 X-Mozilla-Status2: 1000
 Received: from pop.lsces.co.uk by lscserver (VPOP3) with POP3; Mon, 19
 
  Apr 2004 20:40:04 +0100
 
 Return-path: 
 Delivery-date: Mon, 19 Apr 2004 20:30:30 +0100
 Received: from dswu27.btconnect.com ([193.113.154.28])
 by mx1.mail.uk.clara.net with smtp (Exim 4.30)
 id 1BFeTO-000KR9-8m
 for [EMAIL PROTECTED]; Mon, 19 Apr 2004 20:30:30 +0100
 Received: from btconnect.com by dswu27.btconnect.com id
 
  [EMAIL PROTECTED]; Mon, 19 Apr 2004 20:27:04
+0100
 
 Message-Type: Delivery Report
 X400-Received: by /ADMD= /C=WW/; Relayed; Mon, 19 Apr 2004 20:27:02
 
  +0100
 
 X400-Received: by mta dswu27-hme1 in /ADMD= /C=WW/; Relayed; Mon, 19
Apr
 
  2004 20:27:02 +0100
 
 X400-MTS-Identifier: [/ADMD= /C=WW/;dswu27.btc:172167:20040419192702]
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Date: Mon, 19 Apr 2004 20:27:04 +0100
 Message-ID: dswu27.btc:172167:20040419192702@btconnect.com
 Content-Identifier: Re: (091)PHP(...
 MIME-Version: 1.0
 Content-Type: multipart/report; report-type=delivery-status;
 
  boundary=---Multi-Part-Report-Level-1-1-17210
 
 X-Envelope-To: [EMAIL PROTECTED]
 X-Clara-Scan: content scanned according to recipient preferences
 X-claradeliver-Version: 4.22.15
 X-UIDL: 1082403030.78602.chaos.uk.clara.net
 X-RCPT: lester
 Status: U
 Subject: Delivery Report (failure) for [EMAIL PROTECTED]
 
 -Multi-Part-Report-Level-1-1-17210
 
 This report relates to your message:
 Subject: Re: [PHP] Unwanted e-mails,
 Message-ID: [EMAIL PROTECTED],
 To: [EMAIL PROTECTED]
 
 of Mon, 19 Apr 2004 19:27:02 +
 
 Your message was not delivered to:
 [EMAIL PROTECTED]
 for the following reason:
 Diagnostic was Unable to transfer, Message timed out
 Information Message timed out
 
 The Original Message follows:
 
 -Multi-Part-Report-Level-1-1-17210
 Content-Type: message/delivery-status
 
 Reporting-MTA: x400; mta dswu27-hme1 in /ADMD= /C=WW/
 Arrival-Date: Fri, 16 Apr 2004 19:24:38 +
 DSN-Gateway: dns; dswu27.btconnect.com
 X400-Conversion-Date: Mon, 19 Apr 2004 20:27:05 +0100
 X400-Content-Correlator: Subject: Re: [PHP] Unwanted e-mails,
 Message-ID: [EMAIL PROTECTED],
 To: [EMAIL PROTECTED]
 Original-Envelope-Id: [/ADMD= /C=WW/;[EMAIL PROTECTED]
 X400-Content-Identifier: Re: (091)PHP(...
 X400-Encoded-Info: ia5-text
 
 Original-Recipient: rfc822; [EMAIL PROTECTED]
 Final-Recipient: x400; /RFC-822=php-general(a)lists.php.net/ADMD=
/C=WW/
 Action: failed
 Status: 4.4.7
 Diagnostic-Code: Reason 1 (Unable-To-Transfer); Diagnostic 5
 
  (Maximum-Time-Expired)
 
 X400-Supplementary-Info: Message timed out
 X400-Originally-Specified-Recipient-Number: 1
 X400-Last-Trace: Fri, 16 Apr 2004 19:24:38 +
 
 -Multi-Part-Report-Level-1-1-17210
 Content-Type: text/rfc822-headers
 
 Received: from gateway.btopenworld.com (actually host
 
  185.136.40.217.in-addr.arpa) by dswu27 with SMTP-CUST (XT-PP) with
ESMTP;
  Fri, 16 Apr 2004 20:24:38 +0100
 
 Received: from gateway (127.0.0.1) by gateway.btopenworld.com
(Worldmail
 
  1.3.167) for [EMAIL PROTECTED]; 16 Apr 2004 20:36:02 +0100
 
 Delivery-Date: Fri, 16 Apr 2004 20:16:43 +0100
 Received: from pb1.pair.com (actually host 4.131.92.216.in-addr.arpa)
by
 
  dswu194 with SMTP (XT-PP); Fri, 16 Apr 2004 20:16:39 +0100
 
 Received: (qmail 19076 invoked by uid 1010); 16 Apr 2004 19:16:10 -
 Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
 Precedence: bulk
 list-help: mailto:[EMAIL PROTECTED]
 list-unsubscribe: mailto:[EMAIL PROTECTED]
 list-post: mailto:[EMAIL PROTECTED]
 Delivered-To: mailing list [EMAIL PROTECTED]
 Received: (qmail 19063 invoked by uid 1010); 16 Apr 2004 19:16:10 -
 Delivered-To: [EMAIL PROTECTED]
 Delivered-To: [EMAIL PROTECTED]
 Message-ID: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Date: Fri, 16 Apr 2004 20:19:39 +0100
 From: Lester Caine [EMAIL PROTECTED]
 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6)
 
  Gecko/20040113
 
 X-Accept-Language: en, en-us
 MIME-Version: 1.0
 References:
[EMAIL PROTECTED]
 

RE: [PHP] oo question

2004-04-19 Thread Chris W. Parker
Kelly Hallman mailto:[EMAIL PROTECTED]
on Monday, April 19, 2004 12:34 PM said:

 I think what you're talking about here is encapsulation.

in that case what is abstraction?

 PROPOSED CHANGE:
 class Customer {
...
function initialize_customer($customer_id) {
// grab data from db
$this-fname = $...[0]['fname'];
$this-lname = $...[0]['lname'];
$this-age   = $...[0]['age'];}

i see my code has been run through the kellytron 5000. ;)

 class Customer {
 
 var $res = array();

what does $res stand for? result?

 var $id, $fname, $lname;
 
 function Customer($id=null) {
 $id === null || $this-initCustomer($id); }

what is the above line equivalent to and why is '$id == null' not
sufficient?

 My point: it's redundant to have $obj-fname and $obj-firstName(),
 and may encourage mixing the way you access the object data from your
 code, which could potentially defeat the purpose of the get/set
 method.

i see what you mean.


thanks,
chris.

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



RE: [PHP] Unwanted e-mails

2004-04-19 Thread Chris W. Parker
Lester Caine mailto:[EMAIL PROTECTED]
on Monday, April 19, 2004 3:37 PM said:

 Andy B wrote:
 
 i know i got tons of those before... all i did was block the
 btconnect address and be done with it just ignore them at least
 thats all i did 

yeah me too. these come in all the time.

 BUT that does not help at all. btconnect is my service provider, and I
 have to send my eMails through them. The messages are caused by
 lists.php.net not accepting my messages 

but your messages *ARE* getting accepted otherwise i would not be
reading this email right now!




chris.

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



RE: [PHP] oo question

2004-04-19 Thread Kelly Hallman
Apr 19 at 3:46pm, Chris W. Parker wrote:
 Kelly Hallman mailto:[EMAIL PROTECTED]
  I think what you're talking about here is encapsulation.
 
 in that case what is abstraction?

I suppose it's pretty similar, but I believe that encapsulation is the
pedantic term for hiding the data structure behind an object's interface.  
I generally would consider something abstraction when it enables you to
access any number of things from a common interface, such as a database
abstraction layer is an API to interfacing to different RDBMS.

  PROPOSED CHANGE:
  class Customer {
 ...
 function initialize_customer($customer_id) {
 // grab data from db
 $this-fname = $...[0]['fname'];
 $this-lname = $...[0]['lname'];
 $this-age   = $...[0]['age'];}
 
 i see my code has been run through the kellytron 5000. ;)

Dude, it just kills me to not compact the code, at least in a list post ;)
Python! Python did it to me!

  class Customer {
  
  var $res = array();
 
 what does $res stand for? result?

Yeah. Generally, I like compact! :) However, I am consistent throughout my 
code, so it makes sense if you spend enough time there! :)

  var $id, $fname, $lname;
  
  function Customer($id=null) {
  $id === null || $this-initCustomer($id); }
 
 what is the above line equivalent to

Equivalent to:
if ($id !== null) { $this-initCustomer($id); }

The conditional:
if ($id === null) { $this-initCustomer($id); }
could also be written as:
$id === null  $this-initCustomer($id);

I just find that more succinct.

 and why is '$id == null' not sufficient?

Because where $id = 0;
($id ==  null) == true;
due to casting, yet
($id === null) == false;

=== is explicit equality, the operands must also be the same type.
also note that !== vs. != is like === vs. ==

for example:
null == 0 == false == array() == ''
where === would cause all to evaluate false

Doesn't mean it'd be insufficient, but it would allow you to pass a zero
to the method, and differentiate between it and the default value of null.

-- 
Kelly Hallman

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



[PHP] Images PHP

2004-04-19 Thread Tim Thorburn
Hi,

I've created a small program that allows users to upload an image, and then 
resize that image one or more times depending on the desired outcome (once 
for web documents, twice for photo galleries, etc).  Anyways, it seems that 
a large number of my clients are using older digital cameras to show case 
their businesses (most often resorts).  This usually means taking pictures 
in poor lighting conditions which leaves the images either so black you 
can't see anything or completely washed out.  I've seen a few functions on 
php.net that speak of changing color options, but so far these seem to be 
simple make this purple square red now types.  Is there something built 
into PHP, or a 3rd party function that I'm not aware of, that would do 
simple color correction on uploaded files?  I'm looking for a very quick 
and cheap auto levels like function found within Photoshop.

Any idea if this is even possible?

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


Re: [PHP] Unwanted e-mails

2004-04-19 Thread Andy B
 BUT that does not help at all. btconnect is my service provider, and I
 have to send my eMails through them. The messages are caused by
 lists.php.net not accepting my messages 

but your messages *ARE* getting accepted otherwise i would not be
reading this email right now!




chris.

when i talked to my internet people about those sorts of emails like
btconnect and pandasoft virus warnings all they told me was that some
spammer person had probably tagged the php mailinglist database of email
addresses and are now bouncing emails around all the php mailing list
people... it happened to be figured out that way at least on my end because
the mysql mailing list server sent me an email today saying that it had
received lots of emails that bounced off my email address and will now take
me off the list the next time it happens.. so even though that list email is
valid the bounces to that list are spammers trying to do whatever it is they
get their highs out of.

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



  1   2   >