[PHP] MySQL 4.0 + PHP 4

2003-01-22 Thread Joe Stump
Anyone out there have anything to share as to using PHP4+MySQL4. I've been
hearing good things on the MySQL list about v4.0 and I'm thinking of
upgrading, since I run a rather small server.

Thanks!


--Joe

ps. PHP list responders please respond directly. I'm not currently
subscribed.

--
Joe Stump <[EMAIL PROTECTED]>
http://www.joestump.net



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




Re: [PHP] how to read the stuff that got piped ("|") to the script?

2003-05-27 Thread Joe Stump
If you're on any UNIX:



  $fp = fopen('/dev/stdin','r');

  if($fp)
  {
while(!feof($fp))
{
  $line = trim(fgets($fp,4096));
  echo $line."\n";
}
  }
?>

On Tuesday, May 27, 2003, at 06:17 PM, Marco Weber wrote:

hi,

i've a simple question:

how can i read the stuff that got piped ("|") to the php-script?

i.e. "ls -l | /home/myuser/phpscript.php"



thanks in advance for any help



Marco Weber



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

--
Joe Stump - [EMAIL PROTECTED]
http://www.jerum.com
"Software never has bugs. It just develops random features."
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] strtr question

2003-05-29 Thread Joe Stump
You could do this a number of ways:

eregi(), ereg() or str_replace() ...



That will output "Whats up?"

--Joe

--
Joe Stump <[EMAIL PROTECTED]>
http://www.joestump.net
"Label makers are proof God wants Sys Admins to be happy."

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 28, 2003 7:42 AM
To: [EMAIL PROTECTED]
Subject: [PHP] strtr question



I want to remove unwanted characters from filenames of files uploaded to
our server. I am currently using strtr to do this. I have a few characters
that are being removed but I would also like a single quote to be removed
if it is in the filename. I think it has to be escaped in the command
though. How do I do this?

TIA,

Ed



-- 
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] Variables don't pass... *sniff*

2003-05-29 Thread Joe Stump
While I wholey support the concept of using appropriate globals ($_POST,
$_GET, $_COOKIE, etc.) I'd like to make one point abundantly clear:

"While it doesn't guarantee that data has not been forged, it does require
an attacker to guess the right kind of forging."

-- http://us4.php.net/registerglobals

Thus a brute force attack (forging all variables types: post, cookie, and
get) could break a system (unless you were doing an amazing amount of
checking). Basically, I wanted everyone who uses this feature to be aware it
does not make them ammune to the type of attack it is used to prevent.

To prevent a brute force as I describe (but not prevent forged cookies by
any means) you could do:



--Joe

--
Joe Stump <[EMAIL PROTECTED]>
http://www.joestump.net
"Label makers are proof God wants Sys Admins to be happy."

-Original Message-
From: Wendell Brown [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 28, 2003 7:43 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP] Variables don't pass... *sniff*


On Wed, 28 May 2003 16:30:17 +0200, [EMAIL PROTECTED] wrote:

>Howcome? I don't think I understand that...

Check this out.

http://us4.php.net/registerglobals



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

2003-05-29 Thread Joe Stump
Have you read up on regular expressions? They'll do just what you're looking
for:



http://www.php.net/ereg_replace

--Joe

--
Joe Stump <[EMAIL PROTECTED]>
http://www.joestump.net
"Label makers are proof God wants Sys Admins to be happy."

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 28, 2003 7:49 AM
To: Joe Stump
Subject: RE: [PHP] strtr question



 Yes this would be great only I'm not substituting a single character
found in a filename but a host of characters found in filenames.

Ed

On Wed, 28 May 2003, Joe Stump wrote:

> You could do this a number of ways:
>
> eregi(), ereg() or str_replace() ...
>
> 
>   $string = "What's up?";
>   $string = str_replace("'",'',$string);
>   echo $string."\n";
>
> ?>
>
> That will output "Whats up?"
>
> --Joe
>
> --
> Joe Stump <[EMAIL PROTECTED]>
> http://www.joestump.net
> "Label makers are proof God wants Sys Admins to be happy."
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 28, 2003 7:42 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] strtr question
>
>
>
> I want to remove unwanted characters from filenames of files uploaded to
> our server. I am currently using strtr to do this. I have a few characters
> that are being removed but I would also like a single quote to be removed
> if it is in the filename. I think it has to be escaped in the command
> though. How do I do this?
>
> TIA,
>
> Ed
>
>
>
> --
> 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] thumbnails

2003-05-29 Thread Joe Stump
I'd definitely generate them on the fly for him. I personally use the *NIX
program "convert" which comes with imagemagick. It works great and is easy
to use.

General Steps:

1.) Copy big image to location
2.) Use convert to make a thumbnail and name it 't_'.$image_name
3.) Put image name in a db someplace
4.) Just prefix $image_name with 't_' to get the thumbnail

I'm sure there are ways to do this within GD, but I've found Convert to be
more flexible. I have a class you can download at:

http://www.joestump.net/files/software/convert/

--Joe

--
Joe Stump <[EMAIL PROTECTED]>
http://www.joestump.net
"Label makers are proof God wants Sys Admins to be happy."

-Original Message-
From: Edward Peloke [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 28, 2003 7:54 AM
To: [EMAIL PROTECTED] Php. Net
Subject: [PHP] thumbnails


Ok,

I know thumbnails have been discussed and I have looked at the archives, I
am just looking for opinions.  I am doing a small website for a used vehicle
dealer.  I need to make it as easy as possible for him to add new vehicles.
I plan to just give him a form for the information, and a place to upload a
picture.  The main page will have the thumbnails of all the vehicles and as
you click on each one, you will see the normal sized photo.

Should I:

1.  Allow him to upload one picture and then somehow generate a thumbnail
from that?
   If so, should I generate the thumbnail when the picture is uploaded and
keep the original picture and the thumbnail on the
server or
   generate the thumbnail on the fly when the page is loaded...and only
store the original picture?

2.  Should I have him generate thumbnails and upload both pictures to the
server?


Thanks,
Eddie


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

2003-05-30 Thread Joe Stump
I prefer apt-get -u dist-upgrade ;)

If you follow the static compile in the INSTALL file that comes with the PHP
source you can compile it in a matter of minutes.

--Joe


--
Joe Stump <[EMAIL PROTECTED]>
http://www.joestump.net
"Label makers are proof God wants Sys Admins to be happy."

-Original Message-
From: Edward Peloke [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 29, 2003 7:39 AM
To: [EMAIL PROTECTED] Php. Net
Subject: [PHP] easy update


Ok,  I enroll in the school of 'If it ain't broke, don't fix it' and my
version of PHP has worked just fine so I never saw a reason to update.  Now,
I think I will take the plunge.  I can barely remember configuring apache
and php originally so is there an easy route to install the latest php
version?

Thanks,
Eddie


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



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



RE: [PHP] Re: PHP OOP x Procedural Performance

2003-05-30 Thread Joe Stump
In my experience OOP isn't any faster/slower. I've used it on sites that get
30M hits a month; so if it's gonna break I'd have seen it by now.

One thing I'd like to abundantly point out is that NOT EVERYTHING BELONGS IN
OOP! For instance, if you're building classes that output HTML - you've
skipped a few chapters in your OOP design books.

OOP with PHP is lacking as far as complex application development (PHP5
looks to fix this), but it works great for base classes. I usually program
CORE functionality in OOP (ie. Basket for e-commerce which keeps track of
users' baskets). The rest of the code is procedural (ie. code that does
basic math and organizes the page).

--Joe

--
Joe Stump <[EMAIL PROTECTED]>
http://www.joestump.net
"Label makers are proof God wants Sys Admins to be happy."

-Original Message-
From: rush [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 29, 2003 8:02 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: PHP OOP x Procedural Performance


"William N. Zanatta" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
>   It is a known issue that function calls are expensive for the processor.
>
>   The OOP let us better organize the code but, thinking in function (or
> method) calls it may be more expensive than in the procedural form.
>
>   My question is, has anyone made any tests regarding the performance of
> OOP versus procedural language? Is it a good choice to code in OOP with
> PHP ?

I would say, that web app model is so inefficient in itself, that you can
hardly do anything to make things significantly worse or better performance
wise. Also OOP is extensively used in other environments, and unless you are
coding critical device drivers, it is rarely to "expensive" in terms of
processing time.

So my advice would be use OOP, and take benefit of better organization of
your code.

Just my 2c.

rush
--
http://www.templatetamer.com/





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



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



RE: [PHP] Links in e-mail

2003-05-30 Thread Joe Stump
Most MUA's will convert http://* or www.* to a link. Otherwise you'll have
to send MIME encoded HTML with  tags. The problem with the
second solution is that not all MUA's (ie. mutt) support MIME encoded HTML
messages.

--Joe

--
Joe Stump <[EMAIL PROTECTED]>
http://www.joestump.net
"Label makers are proof God wants Sys Admins to be happy."

-Original Message-
From: christian tischler [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 29, 2003 8:14 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Links in e-mail


I use mail() to send e-mail automatically.

But all I can send is text. I would like to send links, but can figure out
how to make them work.

Thanks,

Christian



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



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



RE: [PHP] Re: PHP OOP x Procedural Performance

2003-05-30 Thread Joe Stump
Sure ...

I'm of the belief that OOP (in PHP anyways) has great use for core
libraries. Core libraries, by their nature, generally don't output HTML.
It's a core libraries job to separate logic and presentation. How portable
is your library that outputs HTML for a guy who wants PDF/WAP/XML output?

For instance, I have a product class that does various things to format
product *data* prior to my procedural scripts putting it into my Smarty
templates. If that product class outputted the data in HTML it would be
useless to me for WAP users or a script that generated PDF versions of our
online catalog.

--Joe

--
Joe Stump <[EMAIL PROTECTED]>
http://www.joestump.net
"Label makers are proof God wants Sys Admins to be happy."

-Original Message-
From: Johnson, Kirk [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 29, 2003 8:21 AM
To: 'Joe Stump'; [EMAIL PROTECTED]
Subject: RE: [PHP] Re: PHP OOP x Procedural Performance


> One thing I'd like to abundantly point out is that NOT
> EVERYTHING BELONGS IN
> OOP! For instance, if you're building classes that output
> HTML - you've
> skipped a few chapters in your OOP design books.

Joe,

I am curious about this opinion, could you elaborate a bit, please? I am not
an OOP programmer, and I'm just interested in your thoughts on this, if you
have time.

Kirk



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



RE: [PHP] Assignment operator questions

2003-05-31 Thread Joe Stump
Exactly what you just did will work ...



$a, $b and $c all are 1 now.

--Joe


--
Joe Stump <[EMAIL PROTECTED]>
http://www.joestump.net
"Label makers are proof God wants Sys Admins to be happy."

-Original Message-
From: Andrew D. Luebke [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 11:47 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Assignment operator questions


Is it possible to do the following in PHP a = b = c;  Which in C, for 
instance would set b and a equal to c.  Thanks.

Andrew.



-- 
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 newbie question

2001-01-10 Thread Joe Stump

This is my weekly flamebait on the subject of unset variables and checking 
against those. 

isset() fails on form elements (ie a text box that is left empty) therefore the
variable will be set, but it will be set to '' - to check thoroughly you would
have to do if(isset($var) && !empty($var)) or, my personal favorite, is the
if(strlen($var)) 

empty() acts really wierd when values are set to 0 and isset() doesn't always
catch everything you need done.

--Joe

On Wed, Jan 10, 2001 at 11:12:56AM -0800, David Tod Sigafoos wrote:
> Hello Neil,
> 
> Wednesday, January 10, 2001, 10:33:09 AM, you wrote:
> 
> 
> >> : 
> >> 
> >> $a evaluates to false, the ! reverses it, and it prints "Hello, World!"
> 
> NZ> What is bothering me is the following: if variables that are not assigned
> NZ> a value were to evaluate to false then since false is the same as the
> NZ> number 1 the following PHP script should print the number 1 but instead
> NZ> prints nothing:
> 
> NZ> 
> 
> NZ> How is this behavior justified?
> 
> The operation (! $a) must return something .. true or false.  The only
> other option would be to crash the system to a debugger with a nasty
> message about the developer should have checked the variable cause it
> wasn't assigned.
> 
> For this reason if you are unsure about the state try
> 
> If (isset($a) {
>   If (! $a) {
>   }
>   Else {
>   }
> }
> 
> Something like this always works.
> 
> 
> -- 
> DSig `
> David Tod Sigafoos  ( O O )
> mailto:[EMAIL PROTECTED] ___oOOo__( )__oOOo___
> 
> Using 'The Bat' 1.48f
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

---
Joe Stump
PHP Programmer
www.Care2.com


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




Re: Re[2]: [PHP] declaring variables in class definitions

2001-01-10 Thread Joe Stump

They don't break the classes per se, but it definately promotes good OOP 
structure. Keep this in mind for PHP 5 and PHP 6 which might (who knows) bring
us more strict OOP rules (ie private and public variables). In which case your
classes would have to be entirely rewritten instead of just putting a public:
or private: in front of your already defined variables.

--Joe

On Wed, Jan 10, 2001 at 01:55:34PM -0500, [EMAIL PROTECTED] wrote:
> 
> Max,
> 
> Thanks for your response.
> 
> Assigning something to $d->somevar when it is not declared in the
> definition works fine.
> 
> As far as I can tell, and from what we have found here, there is 
> absolutly no reason whatsoever to define variables in class definitions.
> 
> If someone can show me me a reason , other than a pure aesthetics,
> why this is nessesary I would sure like to know.  If anyone could
> show me at least one example where not defining variables in class
> definitions would somehow break the class, I would like to see it. 
> 
> 
> Thanks,
> Sam
> 
> 
> >> $d->somevar = true;
> >> and the next call to $d->b() will print nothing.
> >> But you won't be able to assign a value to $somevar, if it is not
> >> declared in the class.
> 
> sic> This does not appear to be true.  With error reporting set to max, and the 
> sic> variables not defined in the class ( $somevar,$somevar2 and $somevar3 ),
> sic> the following will echo out:
> sic> Not set
> sic> empty
> sic> value of somevar2
> sic> value of somevar3
> 
> sic> class a {
> sic>function b(){
> sic>  if (!isset($this->somevar))
> sic>   echo "Not set";
> sic>  if (empty($this->somevar))
> sic>  echo "empty";
> sic>   }
> sic>}
> sic> $d = new a;
> $d->b();
> $d->somevar2 = "value of somevar2";
> $d->somevar3 = "value of somevar3";
> echo $d->somevar2;
> echo $d->somevar3;
> 
> try to assign something to $d->somevar if it is not declared in the
> definition.
> 
> 
> >> the method b() of the class a will break if you don't declare $somevar
> >> in the class definition. In the string "if (!isset($this->somevar))"
> >> it would throw an error saying that you have no variable named 'somevar' in
> >> you class.
> 
> sic>  This does not appear to be true either, see above.
> 
> bad practice anyway
> 
> 
> Get your free email from AltaVista at http://altavista.iname.com
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

---
Joe Stump
PHP Programmer
www.Care2.com


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




Re: [PHP] input processor function

2001-01-10 Thread Joe Stump

This is how I usually do it:



Then you have an array of values in $f

then just do :

while(list($key,$val) = each($f))
{
  $$key = strip_tags($val);
}

Which will then create a variable $firstname and put a strip_tags of $val into
it (leaving your original $f array intact for future use)

--Joe


On Wed, Jan 10, 2001 at 02:45:55PM -0500, Jon Rosenberg wrote:
> I want to process information submitted by a form, but I want to clean up
> the info before I use it.   I have about 40 form fields, of several field
> types.  If I only had a few form fields, I would do ths manually, but since
> I have so many my code will be much neater to do it with a function.  I want
> to loop through all the POST vars and do a strip_tags() and trim() on each
> one.
> 
> Is this how I should be doing this?  The code below works how I want it to.
> However, I would prefer, for performance/memory issues to not perform this
> on unneeded fields, such as radio buttons and select boxes where the
> information is already formatted how I want.  Is there any way to only
> perform this on text boxes and textarea fields?  THanks!
> 
> foreach ( $HTTP_POST_VARS as $key=>$value )
>  {
> $value=strip_tags($value);
> $value=trim($value);
> // for debugging use only  print all the variables from web form
>  print "$key = $value";
>  }
> 
> -
> Jonathan Rosenberg
> Be fierce, be fabulous, change the world!
> 
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

---
Joe Stump
PHP Programmer
www.Care2.com


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




Re: [PHP] MySQL SELECT performance suggestions

2001-01-10 Thread Joe Stump

You can use KEY() which will add extra keys to the table.

--Joe

On Wed, Jan 10, 2001 at 12:58:37PM -0700, [EMAIL PROTECTED] wrote:
> Could someone suggest some options here for performance improvement?
> 
> I have a table with about 300,000 entries/records by 7 columns/fields.  All of 
> the information varies from entry, but only one field can be declared as UNIQUE.
> 
> I have PHP perform SELECT queries on the table, and I need to display the 
> results in a format of: "viewing $top to ($top+$depth) of $numrows found"
> 
> I haven't found a way to determine $numrows without performing a second SELECT 
> in this format:
> 
> $numrows = mysql_num_rows (db_query("SELECT * FROM products WHERE 
> $product_query"));
> if ( $numrows < $depth ) { $depth = $numrows; }
> $qid = db_query("SELECT * FROM products WHERE $product_query LIMIT $top, 
> $depth");
> 
> So, this takes about twice as long as it would without figuring the $numrows.  
> Does anyone have any suggestions as far as what can be done to speed this up?  
> Assume that the table in question is optimized with indexing and UNIQUE values.
> 
> Thanks.
> 
> Lee Howard
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

---
Joe Stump
PHP Programmer
www.Care2.com


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




Re: [PHP] variables not being passes between php pages

2001-01-10 Thread Joe Stump

Well if you aren't posting to your add.php page (ie method="post" 
action="add.php") then you need to pass them via the add.php?var=foo&varb=bar 
method. 

--Joe


On Wed, Jan 10, 2001 at 12:02:54PM -0800, jeff fitzmyers wrote:
> I am working on the nice tutorial at
> http://designmagick.50megs.com/postgresql-tutorial/ 
> 
> I have my test.php and add.php pages created and just
> can't seem to pass variables to the add.php page
> -- not even simple things like $user!
> 
> phpinfo() shows HTTP_POST_VARS["firstname"] = Jeff so
> php knows about the vaariables but
> doesn't seem to tell the new page.
> 
> What am I doing wrong??
> 
> __
> Do You Yahoo!?
> Yahoo! Photos - Share your holiday photos online!
> http://photos.yahoo.com/
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

---
Joe Stump
PHP Programmer
www.Care2.com


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




Re: [PHP] constants inside of a string

2001-01-10 Thread Joe Stump

print "the max is ".MAX;

--Joe

On Wed, Jan 10, 2001 at 12:12:08PM -0800, jeff saenz wrote:
> how do you use defines inside of a string...
> 
> e.g.
> 
> define(MAX,2);
> print  "the max is MAX";
> 
> this obv does not work
> 
> jeff
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

---
Joe Stump
PHP Programmer
www.Care2.com


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




Re: [PHP] constants inside of a string

2001-01-10 Thread Joe Stump

I'm not sure about that one - I think most variables work. No better way to find
out than to try it ;o)

--Joe


On Wed, Jan 10, 2001 at 12:21:01PM -0800, jeff saenz wrote:
> what about inside of a here doc
> 
> print << this is the MAX
> HERE
> 
> Joe Stump wrote:
> 
> > print "the max is ".MAX;
> >
> > --Joe
> >
> > On Wed, Jan 10, 2001 at 12:12:08PM -0800, jeff saenz wrote:
> > > how do you use defines inside of a string...
> > >
> > > e.g.
> > >
> > > define(MAX,2);
> > > print  "the max is MAX";
> > >
> > > this obv does not work
> > >
> > > jeff
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> > ---
> > Joe Stump
> > PHP Programmer
> > www.Care2.com
> 

---
Joe Stump
PHP Programmer
www.Care2.com


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




Re: [PHP] 2d array?

2001-01-10 Thread Joe Stump

I'll give it a whirl ...

$array_of_page_titles = array(
'aboutus.php' => 'All about our company',
'index.php' => 'Welcome to www.server.com!',
'foo.php' => 'I\'m a worthless script!'
);

Then ...



$file should be the name of the file - there is a PHP variable for this but
I'm drawing a blank right now.

--Joe

On Wed, Jan 10, 2001 at 08:40:21PM -0500, Kurth Bemis wrote:
> i'm confused by the method the go about this.
> 
> i want to have a location: home / company / about on a page like 
> server.com/company/aboutus.php
> 
> i'm thinking that i can use an array containing the page name and then 
> search the array and return the page title.  now - how do i do this with an 
> array?  I know that i've seen it done like aboutus.php:About Company or 
> something.  Its hard to explain - can anyone help me?
> 
> ~kurth
> Kurth Bemis - Network/Systems Administrator, USAExpress.net/Ozone Computer
> 
> People disagree with me.  I just ignore them.
>  -- Linus Torvalds, regarding the use of C++ for the Linux kernel
> 
> [EMAIL PROTECTED] | http://www.usaexpress.net/kurth
> PGP key available - http://www.usaexpress.net/kurth/pgp
> 
> Fight Weak Encryption!  Donate your wasted CPU cycles to Distributed.net 
> (http://www.distributed.net)
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

Joe Stump, PHP Hacker
[EMAIL PROTECTED]
http://www.miester.org/


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




Re: [PHP] Autonomous Mass Mail List System (Broadcast Email)

2001-01-10 Thread Joe Stump

Sure - I did this with qmail. In your .qmail file or any file that passes the
incoming mail to /dev/stdin you need to pipe it to a php script. It will look
like this:



I had email addresses setup like ezmlm - 
ie [EMAIL PROTECTED] or on the other hand
[EMAIL PROTECTED] - then just parse out the
To: address and replace the = with a @ (dashes as well with something else) and
remove the email.

--Joe



On Wed, Jan 10, 2001 at 06:49:16PM -0700, Jason Beebe wrote:
> Hey Everyone,
> 
> I'm working a project for one of the company's websites. they have a subscription 
>mailing list that the user signs up their email address to receies periodical 
>emailings.
> 
> The email addresses are stored in a flat txt file. 1 email per line. I could also 
>convert it to a coma delimited txt file if it would be easier.
> 
> So, they've had problem with people who no longer want to receive emails, and one's 
>that bounce for whatever reason, generally a bad email address.
> 
> What I am trying to find out if who has some information to set up a system where we 
>will send out our emails to the subscribers with our mailing list manager. when i 
>customer respondes with a certain command in the body or subject (like unsubscribe) 
>or if the mail bounces, I'd like it to search out the email address and delete it.
> 
> Now, I know there's lists like majordomo that do something similar. But I'm looking 
>for something a little more straightforward.
> 
> I also know this may be more along the lines of shell scripting, but I thought some 
>of you ingenious people may have already done something similar or have some ideas on 
>where to start. thanks.

-- 

Joe Stump, PHP Hacker
[EMAIL PROTECTED]
http://www.miester.org/


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




Re: [PHP] FORM problem

2001-01-10 Thread Joe Stump

Have you tried looking at addslashes() ??? Or am I not understanding the problem
here. Just remember to deliminate the "'s and ''s before entering them into the
db.


--Joe

On Wed, Jan 10, 2001 at 08:19:24PM -0500, Romulo Roberto Pereira wrote:
> Hello!
> 
> I am having a problem when people copy and paste text inside a TEXTAREA in a form 
>that contains double quotes ' " ' . 
> 
> The first file is a simple form. The second one is a php script that treats the data 
>from the user and stores in a MySQL table. Onyone has any ideas? I need to use 
>javascript to treat the variables before I execute submit?
> 
> Thank you,
> 
> Rom

-- 

Joe Stump, PHP Hacker
[EMAIL PROTECTED]
http://www.miester.org/


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




Re: [PHP] case ?

2001-01-10 Thread Joe Stump

require includes the file BEFORE any processing is done - so yes it will be
included - you need to use include() instead.

--Joe

On Wed, Jan 10, 2001 at 11:17:43PM -0500, Jon Rosenberg wrote:
> I know this is kinda silly.  but, if I have the following, will the file
> only be included when the case is matched or does require always bring in
> the file regarless?
> 
> case blah:
> require('include.php');
> do something
> break;
> 
> -
> Jonathan Rosenberg
> Be fierce, be fabulous, change the world!
> 
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

Joe Stump, PHP Hacker
[EMAIL PROTECTED]
http://www.miester.org/


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




Re: [PHP] money data type cause problem in connection to Mssql7.0

2001-01-12 Thread Joe Stump

Why not use float?

--Joe

On Fri, Jan 12, 2001 at 05:19:59PM -, [EMAIL PROTECTED] wrote:
> Hi,
>  
> I have got a problem that I canot connect to mssql 7.0 tables with PHP if it 
> contains field in "money" data type. When I change the "monty" type to 
> interger or other types, everything fine.  The fact is that I have to 
> use "money" data type.
>  
> Can somebody help me please?
>  
> Thanks in advance.
>  
> Michael Luk
> 
> 
> 
> This message was sent using i-Office Webmail - Powered by i-Server.
> For more information visit http://www.i-serverbox.com
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

Joe Stump, PHP Hacker
[EMAIL PROTECTED]
http://www.miester.org/


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




Re: [PHP] Looking for a freeware PHP/MySQL classifieds script

2001-01-12 Thread Joe Stump

Did you try freshmeat.net ???

--Joe

On Fri, Jan 12, 2001 at 11:14:45AM -0600, John Guynn wrote:
> I found one but it's written in German and I have enough trouble with
> English (my native language).
> 
> Any suggestions?
> 
> John Guynn
> 
> This email brought to you by RFCs 821 and 1225.
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

Joe Stump, PHP Hacker
[EMAIL PROTECTED]
http://www.miester.org/


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




Re: [PHP] load balancing with php/apache?

2001-01-13 Thread Joe Stump

> http://www.linuxvirtualserver.org/

We use LVS on our website - it works great! We have 2 load balancers with the
HA package and 6 PHP webservers running behind it (with a central DB server).

In short, it's possible and works quite well. BTW We user FreeBSD for webservers
if that's any help (though linux, NT, solaris, etc would all work)

--Joe




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

-- 

Joe Stump, PHP Hacker
[EMAIL PROTECTED]
http://www.miester.org/


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




Re: [PHP] load balancing with php/apache?

2001-01-13 Thread Joe Stump

I work with Jer - we use DB based session management. You log in - get a cookie
and everything is handled with that session id.

--Joe

On Sat, Jan 13, 2001 at 02:43:19PM -0600, Cal Evans wrote:
> When you say "handled by us" do you mean you:
> 
> 1) Write the sess_* files to a shared drive
> 2) Store them in the database
> 3) ignore them totally, who needs users anyhow?
> 4) some other option?
> 
> Cal
> http://www.calevans.com
> 
> 
> -Original Message-
> From: jeremy brand [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, January 13, 2001 2:20 PM
> To: Cal Evans
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] load balancing with php/apache?
> 
> 
> We have a centralized DB server.  Sessions are handled by us, the
> programmers, not the cluster.
> 
> Jeremy
> 
> Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
> http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more
> Get your own Free, Private email at http://www.smackdown.com/
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>""   -- Quoted from Yahoo! homepage, http://www.yahoo.com
> 
> On Sat, 13 Jan 2001, Cal Evans wrote:
> 
> > Date: Sat, 13 Jan 2001 11:51:01 -0600
> > From: Cal Evans <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Subject: RE: [PHP] load balancing with php/apache?
> >
> > How does it deal with sessions? Or do use store sessions in the database?
> >
> > Cal
> >
> > -Original Message-
> > From: Joe Stump [mailto:[EMAIL PROTECTED]]
> > Sent: Saturday, January 13, 2001 11:22 AM
> > To: Rasmus Lerdorf
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: [PHP] load balancing with php/apache?
> >
> >
> > > http://www.linuxvirtualserver.org/
> >
> > We use LVS on our website - it works great! We have 2 load balancers with
> > the
> > HA package and 6 PHP webservers running behind it (with a central DB
> > server).
> >
> > In short, it's possible and works quite well. BTW We user FreeBSD for
> > webservers
> > if that's any help (though linux, NT, solaris, etc would all work)
> >
> > --Joe
> >
> >
> >
> >
> > > http://linas.org/linux/load.html
> > >
> > > -Rasmus
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> > --
> >
> > Joe Stump, PHP Hacker
> > [EMAIL PROTECTED]
> > http://www.miester.org/
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

Joe Stump, PHP Hacker
[EMAIL PROTECTED]
http://www.miester.org/


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




Re: [PHP] load balancing with php/apache?

2001-01-13 Thread Joe Stump

> Any of the above.  It's up to you.  Most people probably store the session info in a 
>database.  But you could also do it in a shared drive. But I got a little static a 
>while ago when I suggested storing shared session data on an NFS mounted drive. NFSes 
>are too slow I guess.

Whoever said NFS is slow hasn't used a NetApp

--Joe


> 
> Michael
> 
> 
> On Saturday, January 13, 2001, at 03:43 PM, Cal Evans wrote:
> 
> > When you say "handled by us" do you mean you: 
> >  
> > 1) Write the sess_* files to a shared drive 
> > 2) Store them in the database 
> > 3) ignore them totally, who needs users anyhow? 
> > 4) some other option? 
> >  
> > Cal 
> > http://www.calevans.com 
> >  
> >  
> > -Original Message- 
> > From: jeremy brand [mailto:[EMAIL PROTECTED]] 
> > Sent: Saturday, January 13, 2001 2:20 PM 
> > To: Cal Evans 
> > Cc: [EMAIL PROTECTED] 
> > Subject: RE: [PHP] load balancing with php/apache? 
> >  
> >  
> > We have a centralized DB server.  Sessions are handled by us, the 
> > programmers, not the cluster. 
> >  
> > Jeremy 
> >  
> > Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED] 
> > http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
> > Get your own Free, Private email at http://www.smackdown.com/ 
> > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
> >""   -- Quoted from Yahoo! homepage, http://www.yahoo.com 
> >  
> > On Sat, 13 Jan 2001, Cal Evans wrote: 
> >  
> > > Date: Sat, 13 Jan 2001 11:51:01 -0600 
> > > From: Cal Evans <[EMAIL PROTECTED]> 
> > > To: [EMAIL PROTECTED] 
> > > Subject: RE: [PHP] load balancing with php/apache? 
> > > 
> > > How does it deal with sessions? Or do use store sessions in the database? 
> > > 
> > > Cal 
> > > 
> > > -Original Message- 
> > > From: Joe Stump [mailto:[EMAIL PROTECTED]] 
> > > Sent: Saturday, January 13, 2001 11:22 AM 
> > > To: Rasmus Lerdorf 
> > > Cc: [EMAIL PROTECTED] 
> > > Subject: Re: [PHP] load balancing with php/apache? 
> > > 
> > > 
> > > > http://www.linuxvirtualserver.org/ 
> > > 
> > > We use LVS on our website - it works great! We have 2 load balancers with 
> > > the 
> > > HA package and 6 PHP webservers running behind it (with a central DB 
> > > server). 
> > > 
> > > In short, it's possible and works quite well. BTW We user FreeBSD for 
> > > webservers 
> > > if that's any help (though linux, NT, solaris, etc would all work) 
> > > 
> > > --Joe 
> > > 
> > > 
> > > 
> > > 
> > > > http://linas.org/linux/load.html 
> > > > 
> > > > -Rasmus 
> > > > 
> > > > 
> > > > -- 
> > > > PHP General Mailing List (http://www.php.net/) 
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED] 
> > > > For additional commands, e-mail: [EMAIL PROTECTED] 
> > > > To contact the list administrators, e-mail: [EMAIL PROTECTED] 
> > > 
> > > -- 
> > > 
> > > Joe Stump, PHP Hacker 
> > > [EMAIL PROTECTED] 
> > > http://www.miester.org/ 
> > > 
> > > 
> > > -- 
> > > PHP General Mailing List (http://www.php.net/) 
> > > To unsubscribe, e-mail: [EMAIL PROTECTED] 
> > > For additional commands, e-mail: [EMAIL PROTECTED] 
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED] 
> > > 
> > > 
> > > 
> > > -- 
> > > PHP General Mailing List (http://www.php.net/) 
> > > To unsubscribe, e-mail: [EMAIL PROTECTED] 
> > > For additional commands, e-mail: [EMAIL PROTECTED] 
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED] 
> > > 
> > > 
> >  
> >  
> > -- 
> > PHP General Mailing List (http://www.php.net/) 
> > To unsubscribe, e-mail: [EMAIL PROTECTED] 
> > For additional commands, e-mail: [EMAIL PROTECTED] 
> > To contact the list administrators, e-mail: [EMAIL PROTECTED] 
> >  
> >  
> >  
> > --  
> > PHP General Mailing List (http://www.php.net/) 
> > To unsubscribe, e-mail: [EMAIL PROTECTED] 
> > For additional commands, e-mail: [EMAIL PROTECTED] 
> > To contact the list administrators, e-mail: [EMAIL PROTECTED] 
> >  
> >  
> >  
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

Joe Stump, PHP Hacker
[EMAIL PROTECTED]
http://www.miester.org/


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




Re: [PHP] PHP vs JSP

2001-01-14 Thread Joe Stump

This has been covered extensively in the archives - just an FYI.

--Joe

On Sun, Jan 14, 2001 at 10:10:56PM -0600, Cal Evans wrote:
> Actually, I understand what he's trying to say, even if I don't agree with
> him. The main problem people have had with load balancing is sessions.  If a
> particular scripting language *cough*ASP stores session information in
> memory then the load balancing system has to always send the session from a
> given user to the same server. (during that session)
> 
> IMHO, the easiest way to do this (without writing your own session handling
> scheme and then telling people about it but not divulging details!)  ;) is
> to store the session info in a database.  Using a central database for all
> sessions, any server can get to the session info for any user.
> 
> I've just finished leading a team on a large scale JSP application.  While
> it is slower to develop in (Java has a high learning curve, IMHO) The
> servlet engine we are using, JRun is fairly fast.  Our bottle neck right now
> seems to be a poorly tuned Oracle database.
> 
> My $0.02,
> Cal
> http://www.calevans.com
> 
> 
> -Original Message-
> From: Alex Black [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, January 14, 2001 7:02 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] PHP vs JSP
> 
> 
> http://www.zdnet.com/enterprise/stories/linux/0,12249,2646052,00.html
> 
> gah:
> 
> "Also, any organization doing clustering or failover with PHP is in largely
> uncharted waters. "
> 
> what _bull_!
> 
> what does loadbalancing and clustering have to do with any scripting
> language? this guy is obviously one of those dilettantes that things CFML is
> the holy grail :P
> 
> anyway, that article is wrong, _except_ the part about JSP:
> -slow
> -extremely time consuming
> -friggin annoying :)
> 
> I've worked on a couple of projects with JSP, and decided to use PHP to
> build binarycloud. 'nuff said :)
> 
> _alex
> 
> 
> 
> --
> Alex Black, Head Monkey
> [EMAIL PROTECTED]
> 
> The Turing Studio, Inc.
> http://www.turingstudio.com
> 
> vox+510.666.0074
> fax+510.666.0093
> 
> Saul Zaentz Film Center
> 2600 Tenth St Suite 433
> Berkeley, CA 94710-2522
> 
> 
> 
> 
> > From: [EMAIL PROTECTED] (Donald Goodwill)
> > Newsgroups: php.general
> > Date: 14 Jan 2001 15:13:12 -0800
> > Subject: Re: [PHP] PHP vs JSP
> >
> > There is an interesting ZD Net comparison of several
> > scripting languages at
> > http://www.zdnet.com/enterprise/stories/linux/0,12249,2646052,00.html
> > Some time ago I did the comparison of JSP to PHP and
> > JSP turned out to be much, much slower.
> >
> > Now I'm just learning CodeCharge generator and so far
> > it seems really helpful. I even started redoing one
> > project from scratch using it. Maybe surprise your
> > client and create both PHP and JSP versions...
> >
> >
> > - Original Message -
> > From: <[EMAIL PROTECTED]>
> > To: PHP list <[EMAIL PROTECTED]>
> > Sent: Sunday, January 14, 2001 7:35 PM
> > Subject: [PHP] PHP vs JSP
> >
> >
> >> Hi all
> >>
> >> I'm busy working on a contract .. and we need to do
> > some web based
> > stuff
> > .. but the client is intent on using jsp and not PHP.
> >> Is there somewhere where I can get good comparists
> > between the two
> > pro and
> > cons etc etc ..
> >>
> >> I would much rather use PHP  then JSP for the
> > development
> >>
> >> Thanks
> >> Henti Smith
> >>
> >
> >
> > __
> > Do You Yahoo!?
> > Get email at your own domain with Yahoo! Mail.
> > http://personal.mail.yahoo.com/
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

Joe Stump, PHP Hacker
[EMAIL PROTECTED]
http://www.miester.org/


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




Re: [PHP] Unknown number of fields

2001-01-15 Thread Joe Stump

http://www.php.net/manual/en/function.mysql-fetch-field.php

--Joe

On Mon, Jan 15, 2001 at 05:27:03PM +0200, Shimon Dekel wrote:
> Hi,
> I need to be able to reactive an unknown number of fields from a Data
> Base generated form.
> How do I handle an unknown number of fields?
> II can generate a list of all possible fields and try them all but will
> this generate errors?
> I will appreciate any help or information.
> Thanks 
> Shimon Dekel
> 
> ==
> Shimon Dekel  Israeli Vegetable Board
> Information System Manager
> 2 Karlibach St Tel-Aviv 67132
> [EMAIL PROTECTED]   www.yerek.co.il
> ==
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

Joe Stump, PHP Hacker
[EMAIL PROTECTED]
http://www.miester.org/


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




Re: [PHP] date comparison

2001-01-15 Thread Joe Stump

The way you want to do this is with UNIX timestamps. FYI a timestamp is the
number of seconds starting at 1970 and going up (it's important to remember 
that date - since some people were born before, etc.)

So you need to do this:
  
  $dateA = '12-25-1999';
  $dateB = '12-24-1999';
  
  // convert to unix time stamps
  $fooA = explode('-',$dateA);
  $fooB = explode('-',$dateB);
  
  $timestampA = mktime(0,0,0,$fooA[0],$fooA[1],$fooA[0]);
  $timestampB = mktime(0,0,0,$fooB[0],$fooB[1],$fooB[0]);
  
  if($timestampA > $timestampB)
  {
echo $dateA . " is greater than B"; 
  }

Hope this helps - you can also check out this page:

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

--Joe


On Mon, Jan 15, 2001 at 12:00:05PM -0600, Jacky@lilst wrote:
> Greeting all,
> Just now I asked about to tie string values together and would like to thank
> Jason for that. Anyway one more thing, after I have tied string values
> together and assigned that to a virables. can I used the value from that
> variables to compare with another date value? Say another date value I will
> use is also retrieved from a field in table which is in Date data type as
> well. So it will be like
> 
> 
> $query = "select myBirthdate from date where userId='1' ";
> $dateResult =mysql_query($query);
> $myBirthDate = (mysql_result($dateResult,0,"myBirthdate"));
> 
> $thisBirthdate = "$year"."$month"."$day";
> 
> if ($thisBirthdate < $myBirthdate) {
> do something
> } else {
>  do some other thing
> }
> 
> Is it the correct way to do that?
> cheers
> Jack
> [EMAIL PROTECTED]
> "There is nothing more rewarding than reaching the goal you set for
> yourself"
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

Joe Stump, PHP Hacker
[EMAIL PROTECTED]
http://www.miester.org/


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




Re: [PHP] date comparison

2001-01-15 Thread Joe Stump

Yes - it may work like you are saying, but I would use a timestamp to be sure.
You can make comparisons on regular date formats from within MySQL with the
date or datetime fields.

--Joe

On Mon, Jan 15, 2001 at 12:39:13PM -0600, Jacky@lilst wrote:
> all right, now I have both date values in the same format (/mm/dd), say
> $Date1 = 20010115 and $Date2 =20010120. If what I want is to find out if
> $Date1 come before $Date2, can I just use this sniplet below?
> 
> if ($Date1 < $Date2) {
> ...
> } else {
> ...
> }
> 
> Do I still need to use mktime() for this purpose?
> cheers
> Jack
> [EMAIL PROTECTED]
> "There is nothing more rewarding than reaching the goal you set for
> yourself"
> - Original Message -
> From: Jason Murray <[EMAIL PROTECTED]>
> To: 'Jacky@lilst' <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Sunday, January 14, 2001 11:37 PM
> Subject: RE: [PHP] date comparison
> 
> 
> > > can I used the value from that variables to compare with another
> > > date value? Say another date value I will use is also retrieved
> > > from a field in table which is in Date data type as well.
> >
> > When you get into this stuff, it all starts getting a lot more
> complicated.
> >
> > If you want to compare two fields, make sure they're in the same format.
> >
> > Basically, make sure you use four digit years and two digit months and
> > days to create your birthday fields, so they look like (for example, with
> > today's date, 20010115 instead of 2001115 - that second one could really
> > be anything).
> >
> > If you're sure you're storing the birthdays properly, you can then cut
> > the strings up when you pull them out of the database, the first 4 chars
> > are the year, the next two make the month (regardless of the actual month,
> > this way it'll be "01" not "1"), then the day.
> >
> > Do that for both of the dates.
> >
> > Now, you can use the mktime() command to turn them into unix tiumestamps.
> >
> > $unixtimeme   = mktime(myhour, myminute, mysecond, mymonth, myday,
> myyear);
> > $unixtimethem = mktime(theirhour, theirminute, theirsecond, theirmonth,
> > theirday, theiryear);
> >
> > Now, a unix timestamp is the number of seconds from 00:00:01, Jan 1, 1970.
> >
> > You can figure out the difference in seconds between the two timestamps.
> >
> > Divide it by (24*3600), which is the number of seconds in a day, and there
> > you have the number of days between the dates.
> >
> > Incidentally, if you want to find the number of days between your
> birthDAYS,
> > then you'll want to substitute in a specific year in the mktime()
> statements
> > above, as you'll otherwise end up with the number of days between your
> exact
> > DATES of birth.
> >
> > Jason
> >
> > --
> > Jason Murray
> > [EMAIL PROTECTED]
> > Web Design Team, Melbourne IT
> > Fetch the comfy chair!
> >
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

Joe Stump, PHP Hacker
[EMAIL PROTECTED]
http://www.miester.org/


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




Re: [PHP] Date data type problem

2001-01-15 Thread Joe Stump

This is not possibly - do this on $date2 first:

$foo_date2 = str_replace('-',$foo_date2);

then 

if($date1 < $foo_date2)
{

}
else
{

}

--Joe

On Mon, Jan 15, 2001 at 03:15:38PM -0600, Jacky@lilst wrote:
> Hi people,
> I have tried to compare 2 date values to see if one come before another using the 
>sniplet below:
> 
> if ($date1 < $date2) {
> do something
> }else{
> ...
> }
> 
> while $date1 is in "mmdd" format but $date2 is in "-mm-dd" formate because I 
>get value of $date2 from a "date" data type field from a table. 
> Can I use this "-mm-dd" to compare with value from another date variabile in the 
>"mmdd" format?  If not possible, How do I make both of them to be in the same 
>format?
> cheers
> Jack
> [EMAIL PROTECTED]
> "There is nothing more rewarding than reaching the goal you set for yourself"

-- 

Joe Stump, PHP Hacker
[EMAIL PROTECTED]
http://www.miester.org/


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




Re: [PHP] load balancing with php/apache?

2001-01-15 Thread Joe Stump

I would agree - we started using one at work (the 760 I believe) with 128GB of
online RAID 4 storage - YUM! We run a large SUN DB and run our DB straight from
the NetApp. NetApp basically rules.

--Joe


On Mon, Jan 15, 2001 at 10:08:32AM -, Tim Parkin wrote:
> A NetApp (Network Appliance) is a big RAID that uses multiple scsi drives to
> create a single transparent volume which, with CIFS (transparent filesystem)
> can be used by any OS. They are v fast, use NVRAM buffering and can go up to
> post terabyte storage capacity without worries. 
> 
> Oh and they start at 60k pounds sterling
> 
> But they are great. Network Attatched Storage at its best (gigabit fibre
> too)
> 
> Tim Parkin
> Didio Communications
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 15, 2001 08:39
> To: Alex Black; [EMAIL PROTECTED]
> Subject: Re: [PHP] load balancing with php/apache?
> 
> 
> Addressed to: Alex Black <[EMAIL PROTECTED]>
>   [EMAIL PROTECTED]
> 
> ** Reply to note from Alex Black <[EMAIL PROTECTED]> Sun, 14 Jan 2001
> 17:16:50 -0800
> >   
> > > Whoever said NFS is slow hasn't used a NetApp
> >   
> 
> OK, I'll bite.  What is NetApp?   Network Appliance?
> 
> 
> Is this a cache technology, or will it help if I want to transfer 1GB
> of data with no duplication?  Once upon a time I was considering using
> NFS for backing up my web servers.  Then I found it would take over 150
> hours per backup over my 56K Frame Relay link.  I've got it down to
> about 46 hours with tar.gz and ftp.  It takes most of my sleep time
> during the week.
> 
> 
> 
> 
> 
> 
> Rick Widmer
> Internet Marketing Specialists
> http://www.developersdesk.com
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

Joe Stump, PHP Hacker
[EMAIL PROTECTED]
http://www.miester.org/


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




Re: [PHP] Modifying arrays

2001-01-15 Thread Joe Stump

  $array = array('foo','bar','hello');
  for($i = 0 ; $i < sizeof($array) ; ++$i)
  {
if($i == 1)
{
  $array[$i] = 'not_bar';
}

  }

Hope this helps! Also check out:
http://www.php.net/manual/en/ref.array.php

 

--Joe



On Mon, Jan 15, 2001 at 01:19:56PM +0200, Catalin Borcea wrote:
> How do I modify the value of the current element of an array?
> 
> -- Catalin Borcea --
>   \\\|///
>  \\ - - //
>( @ @ )
>  -oOOO(_)OOOo
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

Joe Stump, PHP Hacker
[EMAIL PROTECTED]
http://www.miester.org/


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




Re: [PHP] variable question

2001-01-19 Thread Joe Stump

Put them in an array? PHP allows for variable variables, but I'm not sure they
work with classes.

This works:

 $foo0 = 'a';
 $foo1 = 'b';
 $foo2 = 'c';
 $foo3 = 'd';
 $foo4 = 'e';

 for($i = 0 ; $i < 5 ; ++$i)
 {
   $var = 'foo'.$i;
   echo $$var;
 }

Try it with an object...

--Joe


On Fri, Jan 19, 2001 at 05:15:25PM -0500, Michael Zornek wrote:
> ok so i have an object that has (among other things) the following properties:
> 
> $vendor_data->s9
> $vendor_data->s10
> $vendor_data->s11
> $vendor_data->s12
> ...
> $vendor_data->s40
> 
> The values are 1 or 0
> 
> I'd like to write a loop to say:
> 
> for ($count=9; $count>40; $count++) {
>   if ($vendor_data->s(insert_number_here) == 1) {
>   echo something;
>   }
> }
> 
> any thoughts?
> 
> Mike
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

Joe Stump, PHP Hacker
[EMAIL PROTECTED]
http://www.miester.org/


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




Re: [PHP] I dont know what to do here?

2001-01-22 Thread Joe Stump

To pass more than one argument type:

http://foo.com/script.php?var1=hello&var2=foo&var3=bar

--Joe

On Tue, Jan 23, 2001 at 01:44:19PM +1300, Sefton wrote:
> Hello,
> 
> I have a form in an htm file that is sending info to a cgi script
> (formmail.pl) but the confirmation page I am using is php3. I want to pass
> the value of a text box in the form to the php3 page.
> 
> Kinda like thanks you message $message has been sent.
> 
> I don't know how to send to the cgi script and pass the variable to the
> confirmation page.
> Here is my code so far for the form action.
> 
>  action="/cgi-bin/formmail.pl?http://www.domainname.co.nz/developing/faq/faq_
> confirm.php3">
> 
> So I need the faq_confirm.php3 page to appear, plus have it send the
> variable $message that is one of the fields on the form.
> I thought you just added it like ?message
> But i already have a ?
> 
> Please help?
> 
> Chris
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

Joe Stump, PHP Hacker
[EMAIL PROTECTED]
http://www.miester.org/


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




Re: [PHP] Sorry! Help needed!

2001-01-23 Thread Joe Stump

Here is the difference between method="post" and method="get" - "get" passes
the variables on the url (ie script.php?var1=foo&var2=foobar) and "post" passes
them behind the scenes. They both have the same effect. The difference is that
if a user reloads the page with a "get" request it reloads without any noticable
effect to the user, on the other hand, a reload on a "post" request will pop up
the "You must repost the previous form. [ OK ] [ Cancel ]" message.

--Joe

On Tue, Jan 23, 2001 at 02:13:26PM +0200, Anna wrote:
> Sorry for it isnt PHP related, but maybe someone can answer or point where 
> to look
> 
> I have some disagreement with one person about method="post"... Is this 
> possible and good use as action html files: for example - > process form 
> data to other page via html...
> 
> Cant find answer nowhere... always are only server side form handler...
> 
> AnnA
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

Joe Stump, PHP Hacker
[EMAIL PROTECTED]
http://www.miester.org/


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




Re: [PHP] help!!! (PHP)

2001-01-23 Thread Joe Stump

Use cron for this - put the following in your crontab ("crontab -e") to run a
script everyday at midnite:

0 0 * * * lynx -source http://www.server.com/script_to_run_every_night.php


man crontab will tell you how to run on different days, etc.

--Joe

On Tue, Jan 23, 2001 at 09:53:13AM -0300, Bruno Freire wrote:
> Hi ... 
> I'm having some problem's here
> I'm need to know  if my apache server is able to run scripts in a specific
> date and hour.
> 
> For example: 
> 
> Every month, in the 15th day, I need to run a script PHP that check my Mysql
> database for some cause.
> Is that possible???
> 
> I'm realy thanks!!!
> 
> 
> Bruno  de F. F
> 
> City: Belo Horizonte
> Estate: Minas Gerais
> Country: Brazil
-- 

Joe Stump, PHP Hacker
[EMAIL PROTECTED]
http://www.miester.org/


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




Re: [PHP] Search Engines and PHP

2001-01-23 Thread Joe Stump

You might want to look at Jeremy Brands VERY useful "variables from uri" 
function that can be found at http://www.nirvani.net/software/ I use this 
religiously and am quite pleased with it.

--Joe

On Tue, Jan 23, 2001 at 02:19:46PM -0500, Kristofer Widholm wrote:
> At 13.33 +0100 01-01-23, Sander Pilon poked the keyboard as follows:
> >  >
> >>  >If you want to be totally searchengine-safe, do not use variables on the
> >>  >url, do not rely on cookies and do not rely on POST variables
> >>  for the pages
> >>  >you want to have the searchengine spider.
> >>
> >>  How the heck do you build a dynamic site without URL variables,
> >>  cookies, or POST variables?
> >>
> >>  Kristofer
> >
> >One way would be to use the url path.
> >
> >Http://script.php/these/are/variables/passed/to/php
> >
> >You fool the searchengine, it thinks 'script.php' is a directory and its
> >getting a file called 'php', but actually you're calling 'script.php' with
> >'/these/are/variables/passed/to/php' as parameters.
> 
> I'm assuming that the tradeoff is the loss of having your variables 
> pre-populated in your scripts and that you have to parse the URL for 
> them. While it's probably easy enough to write my own, does anyone 
> have -- ready made -- a robust and versatile function for populating 
> variables from a URL.
> 
> My impulse is to go with this:
> 
> list($var1,$var2,$var3)=explode("/","$PHP_SELF");
> 
> Anyone one have a better idea?
> 
> A difference to note, it strikes me, is that using this method, it is 
> no longer arbitrary in which order the variables are stacked in the 
> URL. <http://domain/script.php/value1/value2/value3> would be a 
> different page from <http://domain/script.php/value3/value1/value2>, 
> whereas using variable declarations in the URL like so 
> <http://domain/script.php?value2=foo&value3=bar&value1=barfly> means 
> you can put them in any order you like.
> 
> Kristofer
> -- 
> __
> 
> Kristofer Widholm
> Web Pharmacy
> [EMAIL PROTECTED]
> 191 Grand Street, Brooklyn  NY  11211
> 718.599.4893
> __
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

Joe Stump, PHP Hacker
[EMAIL PROTECTED]
http://www.miester.org/


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




Re: [PHP] ->

2001-01-24 Thread Joe Stump

$Something is an instance of a class - so like this:

  class Foo
  {
var $test 

function echo_test()
{
  echo $this->test;
}
  }


  $foo = new Foo;
  $foo->test = 'this';
  $foo->echo_test();

--Joe

On Wed, Jan 24, 2001 at 12:05:17PM -0700, Karl J. Stubsjoen wrote:
> What does -> do?
> As in:
> $Something->then_something_over_here
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

Joe Stump, PHP Hacker
[EMAIL PROTECTED]
http://www.miester.org/


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




[PHP] looking for people for open source project

2001-01-24 Thread Joe Stump

I've started a little pet project on the side and I'm looking to enlist people
in it - no better place to find PHP coders than here I suppose. If you are 
interested in donating a few hours here and there to an Open Source project
then visit http://www.miester.org/geekshare for more info.

Thanks!

--Joe


-- 

Joe Stump, PHP Hacker
[EMAIL PROTECTED]
http://www.miester.org/


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




Re: [PHP] PHP - Interrupted Scripts,

2001-01-24 Thread Joe Stump

set_time_limit(0) sets the limit to 0 or inifinate. But it will end like any
other script (ie end of script or exit;)


--Joe

On Wed, Jan 24, 2001 at 09:41:44PM +0100, Timo Mika Gl??er wrote:
> and what does set_time_limit(0) do??? set it to infinity???
> 
> i have some fucntion call in there which sets the time-limit each time a
> loop is called ... the documentation says that this does prolong the
> excution time... is that correct???
> 
>   - timO
> 
> 
> 
> -UrsprĆ¼ngliche Nachricht-
> Von: Joe Stump [mailto:[EMAIL PROTECTED]]
> Gesendet: Mittwoch, 24. Januar 2001 21:43
> An: Timo Mika Gl??er
> Betreff: Re: [PHP] PHP - Interrupted Scripts,
> 
> 
> By default PHP cuts off execution at 30 seconds.
> 
> --Joe
> 
> On Wed, Jan 24, 2001 at 09:36:17PM +0100, Timo Mika Gl??er wrote:
> > why setting time-limit to 0???
> >
> >
> > - timo
> >
> > -UrsprĆ¼ngliche Nachricht-
> > Von: Joe Stump [mailto:[EMAIL PROTECTED]]
> > Gesendet: Mittwoch, 24. Januar 2001 21:37
> > An: Timo Mika Gl??er
> > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > Betreff: Re: [PHP] PHP - Interrupted Scripts,
> >
> >
> > try set_time_limit(0) for starters. Otherwise I'm clueless.
> >
> > --Joe
> >
> > On Wed, Jan 24, 2001 at 09:31:17PM +0100, Timo Mika Gl??er wrote:
> > > Hi,
> > > I had this problem over and over again: A script takes a long time to
> > > execute and is interrupted in the middle of its action by either a
> > IE-Crash
> > > or and Proxy-Error. Can one prevent or circumvent that problem???
> > >
> > > Thanks for your fast response in advance,
> > >
> > > Timo Mika GlƤƟer
> > >
> > > ___
> > >
> > > Timo Mika GlƤƟer (mailto:[EMAIL PROTECTED])
> > >
> > >
> > > GewinnIDEE AG
> > > Mexikoring 29
> > > D-22297 Hamburg
> > >
> > > Tel. ++49 (040) 631282-22
> > > Fax. ++49 (040) 631282-10
> > >
> > >
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> > --
> >
> > Joe Stump, PHP Hacker
> > [EMAIL PROTECTED]
> > http://www.miester.org/
> >
> >
> 
> --
> 
> Joe Stump, PHP Hacker
> [EMAIL PROTECTED]
> http://www.miester.org/
> 
> 
> 

-- 

Joe Stump, PHP Hacker
[EMAIL PROTECTED]
http://www.miester.org/


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




Re: [PHP] PHP - Interrupted Scripts,

2001-01-24 Thread Joe Stump

try set_time_limit(0) for starters. Otherwise I'm clueless.

--Joe

On Wed, Jan 24, 2001 at 09:31:17PM +0100, Timo Mika Gl??er wrote:
> Hi,
> I had this problem over and over again: A script takes a long time to
> execute and is interrupted in the middle of its action by either a IE-Crash
> or and Proxy-Error. Can one prevent or circumvent that problem???
> 
> Thanks for your fast response in advance,
> 
> Timo Mika GlƤƟer
> 
> ___
> 
> Timo Mika GlƤƟer (mailto:[EMAIL PROTECTED])
> 
> 
> GewinnIDEE AG
> Mexikoring 29
> D-22297 Hamburg
> 
> Tel. ++49 (040) 631282-22
> Fax. ++49 (040) 631282-10
> 
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

Joe Stump, PHP Hacker
[EMAIL PROTECTED]
http://www.miester.org/


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




Re: [PHP] Urgent help needed, sound scary when anyone did that on title :-)

2001-01-24 Thread Joe Stump

remove the result - so just type $id = mysql_insert_id() and it should work
fine.

--Joe


On Thu, Jan 25, 2001 at 10:21:17AM -0600, Jacky@lilst wrote:
> Hi people,
> I got here the syntax that is suppose to get the id from the "just inserted" record 
>and store it in value, did not work so far and I cannot see what is wrong in there, 
>can anyone give me a hint what is wrong here? ( And the reason I did not use 
>mysql_insert_id here is because the ID field at my tables are all BIGINT so 
>mysql_insert_id won't work, so I have to use LAST_INSERT_ID() instead). By the way, 
>the error after the page is executed keep saying that "Mysql warning : 0 is not Mysql 
>index" ( and point to the line "$FirstLast = mysql_result($resultlast,0,0);"). And I 
>did echo for the value of $FirstLast, it showed that there is no value in there. 
> 
> Sniplet is like this: ( I tried to keep this down as much as try to give most detail 
>at the same time, so apologize for too long sniplet). 
> 
> $sql1 = "insert into firsttable (firstname, lastname) values('Jack','Chan')"; 
> $resultsql1 = mysql_query($sql1);
> $sqlLastID = "select LAST_INSERT_ID() from firsttable";
> $resultlast = mysql_query($sqlLastID);
> $FirstLast = mysql_result($resultlast,0,0);
> 
> $sql2 = "insert into secondtable (FirsttableID,secfirstname, seclastname) 
>values('$FirstLast','Jacky','Chany')"; 
> $resultsql2 = mysql_query($sql2);
> $sqlLastIDsec = "select LAST_INSERT_ID() from secondtable";
> $resultlast2 = mysql_query($sqlLastIDsec);
> $secondLast = mysql_result($resultlast2,0,0);
> 
> $sql3 = "insert into Thirdtable (SecondTableID,FirsttableID,Thirdfirstname, 
>Thirdlastname) values('$secondLast','$FirstLast','Steve','Chan')"; 
> $resultsql3 = mysql_query($sql3);
> $sqlLastIDthird = "select LAST_INSERT_ID() from Thirdtable";
> $resultlast3 = mysql_query($sqlLastIDthird);
> $ThirdLast = mysql_result($resultlast3,0,0);
> 
> **
> what have I done wrong? Please enlighten me here
> Thanks
> 
> Jack
> [EMAIL PROTECTED]
> "There is nothing more rewarding than reaching the goal you set for yourself"

-- 

Joe Stump, PHP Hacker
[EMAIL PROTECTED]
http://www.miester.org/


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




Re: [PHP] crontab help

2001-02-21 Thread Joe Stump

put a sleep(300); at the end of your while() loop - I did this on my mass 
mailer and it worked like a charm.

--Joe

On Fri, Feb 22, 2002 at 02:53:10PM +0800, Arnold Gamboa wrote:
> hi there.
> 
> is there a way to tell crontab to do:
> 
> "run script every 5 mins for 1 hour"..
> 
> i have this mass email script that is so huge that i need it to chunk into
> records and make sure that it will run every 5 mins for 1 hour.
> 
> Thanks for any help.
> 

-- 

-------
Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o)
http://www.miester.org http://www.care2.com /\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V
---


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




Re: [PHP] crontab help

2001-02-22 Thread Joe Stump

I send roughly 1M of these and put a sleep() (not usleep - that's microseconds)
into the while loop - I've come up with a decent balance that sends out a good
number (like 5000) and then sleeps just long enough to get them out of qmail's
queue, then it sends another 5000 (and so on).

Usually takes about 24 hours to send out 1M messages.

--Joe

On Fri, Feb 22, 2002 at 03:36:33PM +0800, Arnold Gamboa wrote:
> thanks for the comment
> 
> let's just say i have 100k emails to send... don't you think that will drain
> the system resources if i send it all at once even if you have usleep(300)
> on each while?
> 
> your comment please.
> 
> > put a sleep(300); at the end of your while() loop - I did this on my mass
> > mailer and it worked like a charm.
> >
> > --Joe
> >
> > On Fri, Feb 22, 2002 at 02:53:10PM +0800, Arnold Gamboa wrote:
> > > hi there.
> > >
> > > is there a way to tell crontab to do:
> > >
> > > "run script every 5 mins for 1 hour"..
> > >
> > > i have this mass email script that is so huge that i need it to chunk
> into
> > > records and make sure that it will run every 5 mins for 1 hour.
> > >
> > > Thanks for any help.
> > >
> >
> > --
> >
> > --
> -
> > Joe Stump, PHP Hacker,
>  -o)
> > http://www.miester.org http://www.care2.com
> /\\
> > "It's not enough to succeed. Everyone else must fail" -- Larry Ellison
> _\_V
> > --
> -
> >
> >
> >
> 

-- 

---
Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o)
http://www.miester.org http://www.care2.com /\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V
---


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




Re: [PHP] crontab help

2001-02-22 Thread Joe Stump

BTW when it sleeps PHP takes up no noticable resources. Also I'm running the
php binary to send out these messages (that way I can use screen and make sure
that my browser doesn't crash, os freeze, etc.)

--Joe

On Fri, Feb 22, 2002 at 03:36:33PM +0800, Arnold Gamboa wrote:
> thanks for the comment
> 
> let's just say i have 100k emails to send... don't you think that will drain
> the system resources if i send it all at once even if you have usleep(300)
> on each while?
> 
> your comment please.
> 
> > put a sleep(300); at the end of your while() loop - I did this on my mass
> > mailer and it worked like a charm.
> >
> > --Joe
> >
> > On Fri, Feb 22, 2002 at 02:53:10PM +0800, Arnold Gamboa wrote:
> > > hi there.
> > >
> > > is there a way to tell crontab to do:
> > >
> > > "run script every 5 mins for 1 hour"..
> > >
> > > i have this mass email script that is so huge that i need it to chunk
> into
> > > records and make sure that it will run every 5 mins for 1 hour.
> > >
> > > Thanks for any help.
> > >
> >
> > --
> >
> > --
> -
> > Joe Stump, PHP Hacker,
>  -o)
> > http://www.miester.org http://www.care2.com
> /\\
> > "It's not enough to succeed. Everyone else must fail" -- Larry Ellison
> _\_V
> > --
> -
> >
> >
> >
> 

-- 

---
Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o)
http://www.miester.org http://www.care2.com /\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V
---


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




Re: [PHP] crontab help

2001-02-22 Thread Joe Stump

1.) sleep() is in seconds - plain old seconds - so sleep(300) == 5 minutes.

2.) yes - send, sleep, send, ...

--Joe


On Thu, Feb 22, 2001 at 11:09:05PM +0800, Arnold Gamboa wrote:
> hi,
> 
> thanks again. questions:
> 
> 1. sleep(300) would mean pause by 300 mins, right?  That's why i thought you
> mean usleep(300) - 300 microseconds. please comment
> 2. what you mean is i will send 5000 emails, then pause and send again?
> 
> Thanks for your help.
> 
> > I send roughly 1M of these and put a sleep() (not usleep - that's
> microseconds)
> > into the while loop - I've come up with a decent balance that sends out a
> good
> > number (like 5000) and then sleeps just long enough to get them out of
> qmail's
> > queue, then it sends another 5000 (and so on).
> >
> > Usually takes about 24 hours to send out 1M messages.
> >
> > --Joe
> >
> > On Fri, Feb 22, 2002 at 03:36:33PM +0800, Arnold Gamboa wrote:
> > > thanks for the comment
> > >
> > > let's just say i have 100k emails to send... don't you think that will
> drain
> > > the system resources if i send it all at once even if you have
> usleep(300)
> > > on each while?
> > >
> > > your comment please.
> > >
> > > > put a sleep(300); at the end of your while() loop - I did this on my
> mass
> > > > mailer and it worked like a charm.
> > > >
> > > > --Joe
> > > >
> > > > On Fri, Feb 22, 2002 at 02:53:10PM +0800, Arnold Gamboa wrote:
> > > > > hi there.
> > > > >
> > > > > is there a way to tell crontab to do:
> > > > >
> > > > > "run script every 5 mins for 1 hour"..
> > > > >
> > > > > i have this mass email script that is so huge that i need it to
> chunk
> > > into
> > > > > records and make sure that it will run every 5 mins for 1 hour.
> > > > >
> > > > > Thanks for any help.
> > > > >
> > > >
> > > > --
> > > >
> > >
> > ----------
> > > -
> > > > Joe Stump, PHP Hacker,
> > >  -o)
> > > > http://www.miester.org http://www.care2.com
> > > /\\
> > > > "It's not enough to succeed. Everyone else must fail" -- Larry Ellison
> > > _\_V
> > >
> > --
> > > -
> > > >
> > > >
> > > >
> > >
> >
> > --
> >
> > --
> -
> > Joe Stump, PHP Hacker,
>  -o)
> > http://www.miester.org http://www.care2.com
> /\\
> > "It's not enough to succeed. Everyone else must fail" -- Larry Ellison
> _\_V
> > --
> -
> >
> >
> >
> 

-- 

---
Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o)
http://www.miester.org http://www.care2.com /\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V
---


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




Re: [PHP] isset()

2001-02-22 Thread Joe Stump

I stand firm on strlen() for the following reasons ...

if(!$var) will sometimes act strangely (has for me in the past) when variables
are set to something other than what you are expecting.

if(isset($var)) will return true if your text field is declared but not filled
in.

if(empty($var)) will return true if $var is set to 0 (for obvious reason) so is
only good for certain instances.

strlen() on the other hand converts the variable to a string and returns a count
of characters. It's never failed or acted funky. For this reason I use it 
religiously. 

Others might say "well it's extra overhead" to which I reply "I'll take an extra
bazillionth of a second to know for sure I have what I need"

--Joe

On Thu, Feb 22, 2001 at 08:18:22AM -0800, Steve Edberg wrote:
> I would do this:
> 
> if (!$AgeChild) $AgeChild = 'NA';
> 
> More compact, easier to read (to me, anyway). This presumes that a 
> value of '' (empty string, interpreted by PHP as false) is NOT a 
> valid value here.
> 
> As far as your sniplet goes, it is possible that there may be some 
> PHP type-casting issues here, depending on: whether $AgeChild is 
> numeric or string; the fact that the STRING "false" isn't equivalent 
> to the CONSTANT false, the use of == vs. ===.
> 
> Time to check out the docs - specifically the types and variables 
> sections (also the functions->variables section)...
> 
>   - steve
> 
> 
> 
> At 5:07 PM -0600 2/22/01, Jacky@lilst wrote:
> >People
> >I tried to check if teh field has set a vaule in it before submit 
> >using isset with the sniplet below
> >
> >if ((isset($AgeChild))=="false") {
> >$AgeChild = "NA";
> >}
> >
> >The resule is that it always displays NA whether or not it has vaule 
> >in the field, what is the correct way of using isset for this 
> >purpose? Or should I use empty() ?
> >Jack
> >[EMAIL PROTECTED]
> >"There is nothing more rewarding than reaching the goal you set for yourself"
> 
> 
> -- 
> +--- "They've got a cherry pie there, that'll kill ya" --+
> | Steve Edberg   University of California, Davis |
> | [EMAIL PROTECTED]   Computer Consultant |
> | http://aesric.ucdavis.edu/  http://pgfsun.ucdavis.edu/ |
> +-- FBI Special Agent Dale Cooper ---+
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

---
Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o)
http://www.miester.org http://www.care2.com /\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V
---


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




Re: [PHP] Download PHP from Linux machine?

2001-02-23 Thread Joe Stump

lynx -source 
http://www.php.net/do_download.php?download_file=php-4.0.4pl1.tar.gz&source_site=www.php.net
 > php-4.0.4pl1.tar.gz will work - also try wget

--Joe

On Fri, Feb 23, 2001 at 03:28:14PM -0600, Jorge Alvarez wrote:
> Hi there,
> 
> I want to download PHP from my Linux server, but I can't just type "lynx
> http://www.php.net/do_download.php?download_file=php-4.0.4pl1.tar.gz&source_
> site=www.php.net"
> 
> This is the link in the PHP downloads page, but the shell gets confused by
> the & character.
> 
> What should I do?
> 
> Best Regards,
> 
> Jorge.
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

---
Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o)
http://www.miester.org http://www.care2.com /\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V
---


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




Re: [PHP] Order by Date (Newbie)

2001-02-23 Thread Joe Stump

To order by dates use SQL

select * from news order by PostDate DESC;

and then make sure that PostDate is a date or datetime - hell even an int with
a unix timestamp (aka time()) will work.

--Joe

On Fri, Feb 23, 2001 at 07:52:54PM -0500, Brian S. Drexler wrote:
> Ok, I must be missing something, but does anyone have a script that will
> order by the closest date in the future that hasn't been here yet.  Did that
> make sense?
> 
> Brian
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

-----------
Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o)
http://www.miester.org http://www.care2.com /\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V
---


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




Re: [PHP] Help INSERTing to MySQL

2001-02-23 Thread Joe Stump

Before your VALUES you need to have a list of the fields ie:

insert into table (id,fname,lname) values ('$id','$fname','$lname')

--joe

On Fri, Feb 23, 2001 at 08:00:30PM -0500, Clayton Dukes wrote:
> Hello,
> This is my first attempt, so I'm prolly doing something stupid, but can someone tell 
>me why this doesn't work?
> All it returns is "Unable to INSERT to database"
> 
> 
> 
> ---BEGIN---
> $time = time();
>$rand = Random_Password(5);
>$docid = $time . $rand;
> 
> if (isset($email) && isset($docid)) {
> mysql_connect("$HOSTNAME", "$DB_USER", "$DB_PASS");
> 
>$query = "INSERT INTO documents VALUES ('$docid', '$category', '$subcategory', 
>'$date', '$subject', '$title', '$author', '$email', '$language', '$gr
> ade', '$level', '$city', '$state', '$county', '$zip', '$authors_comments', 
>'$teachers_comments', 'N', '$docdata')";
> 
>$result = mysql_db_query("$DATABASE", $query) or die("Unable to INSERT to 
>database");
> 
> if ($result) {
> echo "$docid was added to the database";
> }
> }
> ?>
> 
>  Submit a new document to the database
>  
>  Email Address: 
>  Category: 
>  Sub Category: ?>
>  Date Document was written:  (xx-xx-)
>  Document Subject: 
>  Document Title: 
>  Document Author: 
>  Document Language: 
>  Grade Received (Percentage):  
>(xx/100)
>  Grade Level of Paper: High 
>SchoolCollegeOther
>  City in which paper was submitted: value=Jacksonville>
>  State in which paper was submitted: value=FL>
>  County in which paper was submitted: value=Duval> (County, not Country!)
>  School at which paper was submitted: value="Mandarin High School">
>  ZIP code:  (Put your ZIP 
>code in if you don't know your school's)
>      Author's Comments: 
>  Teacher's Comments: 
>  Document (ASCII TEXT ONLY):
>  Paste document text here
>  
>  
> 
> -END-
> 
> 
> 
> TIA!
> Clayton
> 

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

-- 

---
Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o)
http://www.miester.org http://www.care2.com /\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V
---


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




Re: [PHP] special characters with perl,mysql,php

2001-02-23 Thread Joe Stump

What type of special characters?

--Joe

On Fri, Feb 23, 2001 at 08:54:09PM -0600, Mitchell Hagerty wrote:
> Hey All,
> 
> What would be a good method for inserting data into a blob field
> that contained special characters using perl then retrieving that
> data with php?
> 
> URI::Escape has worked well with perl but now that php has
> gotten into the picture I need a new method.
> 
> any suggestions?
> 
> tks
> mitch
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

-------
Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o)
http://www.miester.org http://www.care2.com /\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V
---


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




Re: [PHP] isset()

2001-02-23 Thread Joe Stump

You are COMPLETELY wrong here. isset() is designed to check if a variable is 
SET - NOT if it has something in it. empty() is designed for strings NOT for
ints - so if it's set to 0 it will fail. Finally in PHP 4 + you have problems
when you do checks and variables aren't set. 

I do this, like I said before, because the extra 1 billionth of a second is
worth the overhead. I've programmed for sites ranging from a few hundered hits
a day to a few million hits a day and this works ALL the time.

--Joe

On Sat, Feb 24, 2001 at 03:15:59PM +0900, PHPBeginner.com wrote:
> I don't agree with you in here,
> 
> you usually know what kind of variable you're checking, so strlen() will
> work just as well as
> 
> $var ? 'OK' : 'Empty'
> 
> will work or the isset() - common, it was made for checking the variables -
> use it.
> 
> strlen() is in fact an overhead, why would you allow your design to be some
> sort of untraditional? I don't think there's any necessity for it
> 
> a "good design" often would be something like this:
> 
> $var = 'whatever';
> 
> if($var)
>   ...do this
> else
>   ERROR('no var') // some your func to output the error mess or to continue
> with debugging
> 
> in most cases it will work better and simpler for you without spending these
> bazillions of important for every developer seconds.
> 
> 
> 
> Sincerely,
> 
>  Maxim Maletsky
>  Founder, Chief Developer
> 
>  PHPBeginner.com (Where PHP Begins)
>  [EMAIL PROTECTED]
>  www.phpbeginner.com
> 
> 
> 
> 
> 
> -Original Message-
> From: Joe Stump [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 23, 2001 3:07 AM
> To: Steve Edberg
> Cc: Jacky@lilst; [EMAIL PROTECTED]
> Subject: Re: [PHP] isset()
> 
> 
> I stand firm on strlen() for the following reasons ...
> 
> if(!$var) will sometimes act strangely (has for me in the past) when
> variables
> are set to something other than what you are expecting.
> 
> if(isset($var)) will return true if your text field is declared but not
> filled
> in.
> 
> if(empty($var)) will return true if $var is set to 0 (for obvious reason) so
> is
> only good for certain instances.
> 
> strlen() on the other hand converts the variable to a string and returns a
> count
> of characters. It's never failed or acted funky. For this reason I use it
> religiously.
> 
> Others might say "well it's extra overhead" to which I reply "I'll take an
> extra
> bazillionth of a second to know for sure I have what I need"
> 
> --Joe
> 
> On Thu, Feb 22, 2001 at 08:18:22AM -0800, Steve Edberg wrote:
> > I would do this:
> >
> > if (!$AgeChild) $AgeChild = 'NA';
> >
> > More compact, easier to read (to me, anyway). This presumes that a
> > value of '' (empty string, interpreted by PHP as false) is NOT a
> > valid value here.
> >
> > As far as your sniplet goes, it is possible that there may be some
> > PHP type-casting issues here, depending on: whether $AgeChild is
> > numeric or string; the fact that the STRING "false" isn't equivalent
> > to the CONSTANT false, the use of == vs. ===.
> >
> > Time to check out the docs - specifically the types and variables
> > sections (also the functions->variables section)...
> >
> > - steve
> >
> >
> >
> > At 5:07 PM -0600 2/22/01, Jacky@lilst wrote:
> > >People
> > >I tried to check if teh field has set a vaule in it before submit
> > >using isset with the sniplet below
> > >
> > >if ((isset($AgeChild))=="false") {
> > >$AgeChild = "NA";
> > >}
> > >
> > >The resule is that it always displays NA whether or not it has vaule
> > >in the field, what is the correct way of using isset for this
> > >purpose? Or should I use empty() ?
> > >Jack
> > >[EMAIL PROTECTED]
> > >"There is nothing more rewarding than reaching the goal you set for
> yourself"
> >
> >
> > --
> > +--- "They've got a cherry pie there, that'll kill ya" --+
> > | Steve Edberg   University of California, Davis |
> > | [EMAIL PROTECTED]   Computer Consultant |
> > | http://aesric.ucdavis.edu/  http://pgfsun.ucdavis.edu/ |
> > +-- FBI Special Agent Dale Cooper ---+
> >
> > --
> > PHP General Mailing List (http://www.php.net

Re: [PHP] isset()

2001-02-23 Thread Joe Stump

You're wrong in saying that you "usually know what the variable will be" - you
never know what it's going to be. You aren't entering it you need to 
remember that mostly idiots are inputting the data :O)

--Joe

On Sat, Feb 24, 2001 at 04:17:02PM +0900, PHPBeginner.com wrote:
> have I said it won't work, Joe?
> 
> I said that using strlen() might not be necessary. (re-read my post)
> On my own opinion the same things could be done without using the string
> functions.
> Am I wrong in something there? then thanks for correcting me - will know it
> for the feature.
> 
> 
> Sincerely,
> 
>  Maxim Maletsky
>  Founder, Chief Developer
> 
>  PHPBeginner.com (Where PHP Begins)
>  [EMAIL PROTECTED]
>  www.phpbeginner.com
> 
> 
> 
> 
> -Original Message-
> From: Joe Stump [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, February 24, 2001 4:17 PM
> To: PHPBeginner.com
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] isset()
> 
> 
> You are COMPLETELY wrong here. isset() is designed to check if a variable is
> SET - NOT if it has something in it. empty() is designed for strings NOT for
> ints - so if it's set to 0 it will fail. Finally in PHP 4 + you have
> problems
> when you do checks and variables aren't set.
> 
> I do this, like I said before, because the extra 1 billionth of a second is
> worth the overhead. I've programmed for sites ranging from a few hundered
> hits
> a day to a few million hits a day and this works ALL the time.
> 
> --Joe
> 
> On Sat, Feb 24, 2001 at 03:15:59PM +0900, PHPBeginner.com wrote:
> > I don't agree with you in here,
> >
> > you usually know what kind of variable you're checking, so strlen() will
> > work just as well as
> >
> > $var ? 'OK' : 'Empty'
> >
> > will work or the isset() - common, it was made for checking the
> variables -
> > use it.
> >
> > strlen() is in fact an overhead, why would you allow your design to be
> some
> > sort of untraditional? I don't think there's any necessity for it
> >
> > a "good design" often would be something like this:
> >
> > $var = 'whatever';
> >
> > if($var)
> > ...do this
> > else
> > ERROR('no var') // some your func to output the error mess or to continue
> > with debugging
> >
> > in most cases it will work better and simpler for you without spending
> these
> > bazillions of important for every developer seconds.
> >
> >
> >
> > Sincerely,
> >
> >  Maxim Maletsky
> >  Founder, Chief Developer
> >
> >  PHPBeginner.com (Where PHP Begins)
> >  [EMAIL PROTECTED]
> >  www.phpbeginner.com
> >
> >
> >
> >
> >
> > -Original Message-
> > From: Joe Stump [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, February 23, 2001 3:07 AM
> > To: Steve Edberg
> > Cc: Jacky@lilst; [EMAIL PROTECTED]
> > Subject: Re: [PHP] isset()
> >
> >
> > I stand firm on strlen() for the following reasons ...
> >
> > if(!$var) will sometimes act strangely (has for me in the past) when
> > variables
> > are set to something other than what you are expecting.
> >
> > if(isset($var)) will return true if your text field is declared but not
> > filled
> > in.
> >
> > if(empty($var)) will return true if $var is set to 0 (for obvious reason)
> so
> > is
> > only good for certain instances.
> >
> > strlen() on the other hand converts the variable to a string and returns a
> > count
> > of characters. It's never failed or acted funky. For this reason I use it
> > religiously.
> >
> > Others might say "well it's extra overhead" to which I reply "I'll take an
> > extra
> > bazillionth of a second to know for sure I have what I need"
> >
> > --Joe
> >
> > On Thu, Feb 22, 2001 at 08:18:22AM -0800, Steve Edberg wrote:
> > > I would do this:
> > >
> > > if (!$AgeChild) $AgeChild = 'NA';
> > >
> > > More compact, easier to read (to me, anyway). This presumes that a
> > > value of '' (empty string, interpreted by PHP as false) is NOT a
> > > valid value here.
> > >
> > > As far as your sniplet goes, it is possible that there may be some
> > > PHP type-casting issues here, depending on: whether $AgeChild is
> > > numeric or string; the fact that the STRING "false" isn't equivalent
> > > to th

Re: [PHP] isset()

2001-02-24 Thread Joe Stump

For the last time - put an input box on a page and submit with NOTHING in the
box. Now I want SOMETHING in that box (like a name) - isset() will return true
even though it's empty.

--Joe

On Sat, Feb 24, 2001 at 04:32:11PM +0900, PHPBeginner.com wrote:
> Whatever they input is not the objects, right?
> 
> then (I've just double-checked it, to be sure I am not saying some 'BULL')
> 
> 
> $var = 0;
> 
> if($var)
>   echo 'var matched';
> 
> if(isset($var))
>   echo 'var is set';
> 
> 
> when the $var is 0 the second condition will return true, the first will be
> false instead...
> Obviously if they enter anything else then 0 and NULL (I mean nothing) it
> will return true in both cases, if($var.., if(isset($var... if(strle($var
> ...
> 
> What's wrong with isset() in here?
> I am on PHP4.0.4!
> 
> explain me again, why on user input strlen() would do better then isset() ?
> 
> 
> Sincerely,
> 
>  Maxim Maletsky
>  Founder, Chief Developer
> 
>  PHPBeginner.com (Where PHP Begins)
>  [EMAIL PROTECTED]
>  www.phpbeginner.com
> 
> 
> 
> 
> 
> -Original Message-
> From: Joe Stump [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, February 24, 2001 4:25 PM
> To: PHPBeginner.com
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] isset()
> 
> 
> You're wrong in saying that you "usually know what the variable will be" -
> you
> never know what it's going to be. You aren't entering it you need to
> remember that mostly idiots are inputting the data :O)
> 
> --Joe
> 
> On Sat, Feb 24, 2001 at 04:17:02PM +0900, PHPBeginner.com wrote:
> > have I said it won't work, Joe?
> >
> > I said that using strlen() might not be necessary. (re-read my post)
> > On my own opinion the same things could be done without using the string
> > functions.
> > Am I wrong in something there? then thanks for correcting me - will know
> it
> > for the feature.
> >
> >
> > Sincerely,
> >
> >  Maxim Maletsky
> >  Founder, Chief Developer
> >
> >  PHPBeginner.com (Where PHP Begins)
> >  [EMAIL PROTECTED]
> >  www.phpbeginner.com
> >
> >
> >
> >
> > -Original Message-
> > From: Joe Stump [mailto:[EMAIL PROTECTED]]
> > Sent: Saturday, February 24, 2001 4:17 PM
> > To: PHPBeginner.com
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: [PHP] isset()
> >
> >
> > You are COMPLETELY wrong here. isset() is designed to check if a variable
> is
> > SET - NOT if it has something in it. empty() is designed for strings NOT
> for
> > ints - so if it's set to 0 it will fail. Finally in PHP 4 + you have
> > problems
> > when you do checks and variables aren't set.
> >
> > I do this, like I said before, because the extra 1 billionth of a second
> is
> > worth the overhead. I've programmed for sites ranging from a few hundered
> > hits
> > a day to a few million hits a day and this works ALL the time.
> >
> > --Joe
> >
> > On Sat, Feb 24, 2001 at 03:15:59PM +0900, PHPBeginner.com wrote:
> > > I don't agree with you in here,
> > >
> > > you usually know what kind of variable you're checking, so strlen() will
> > > work just as well as
> > >
> > > $var ? 'OK' : 'Empty'
> > >
> > > will work or the isset() - common, it was made for checking the
> > variables -
> > > use it.
> > >
> > > strlen() is in fact an overhead, why would you allow your design to be
> > some
> > > sort of untraditional? I don't think there's any necessity for it
> > >
> > > a "good design" often would be something like this:
> > >
> > > $var = 'whatever';
> > >
> > > if($var)
> > >   ...do this
> > > else
> > >   ERROR('no var') // some your func to output the error mess or to
> continue
> > > with debugging
> > >
> > > in most cases it will work better and simpler for you without spending
> > these
> > > bazillions of important for every developer seconds.
> > >
> > >
> > >
> > > Sincerely,
> > >
> > >  Maxim Maletsky
> > >  Founder, Chief Developer
> > >
> > >  PHPBeginner.com (Where PHP Begins)
> > >  [EMAIL PROTECTED]
> > >  www.phpbeginner.com
> > >
> > >
> > >
> > >
> > >
> > > -Orig

Re: [PHP] comparing numbers

2001-02-24 Thread Joe Stump

just replace the [] with ()

if($id <= 59)
{
  $id = 81;
}

--Joe

On Sat, Feb 24, 2001 at 09:54:08PM -0500, Clayton Dukes wrote:
> 
> How can I do something like the following shell script, in PHP? (I know this won't 
>work normally, but you get the idea).
> 
> if [ $id <= 59 ]; then
> $id=81
> 
> TIA!
> Clayton Dukes
> 

-- 

-----------
Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o)
http://www.miester.org http://www.care2.com /\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V
---


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




Re: [PHP] Unwanted Characters

2001-02-24 Thread Joe Stump

Look at the chr() function - figure out what the character is (number wise) and
then do an ereg_replace(chr(),'',$string) (from the hip - you can do a replace
with chr() on one of the replaces, I've done it before)

--Joe

On Sun, Feb 25, 2001 at 12:34:21AM -0500, Clayton Dukes wrote:
> 
> How do I remove unwanted/unprintable characters from a variable?
> 
> $sometext = "Thƀe cƘar rƶĆøan over mƖy dog"
> needs to be filtered and reprinted as:
> "The car ran over my dog"
> 
> 
> 
> 
> Thanks :-)
> Clayton Dukes
> 

-- 

-------
Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o)
http://www.miester.org http://www.care2.com /\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V
---


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




Re: [PHP] Escaping double quotes?

2001-02-24 Thread Joe Stump

addslashes() usually works for me...

--Joe

On Sun, Feb 25, 2001 at 01:46:30AM -0500, Ben Cheng wrote:
> How do you escape double quotes?  I have the following which is 
> supposed to make any " in a string into \" but it doesn't seem to 
> work.  What's wrong with it?
> 
> $tmp_string = str_replace ("\"", "\\\"", $tmp_string);
> 
> -Ben
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

---
Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o)
http://www.miester.org http://www.care2.com /\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V
---


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




Re: [PHP] isset()

2001-02-25 Thread Joe Stump

> you do not want to use strlen() for the following reasons:
> 1) makes code unreadable -> very sloppy

Yeah and your if(isset($var) && $var != '') is pretty

> 2) overhead

You call one function and do two comparisons - vs an age old C function 
I'd like to run some numbers on that.

> 3) it will give a warning when $var is not set (error_reporting 15 
> only).

I run on the default error_reporting setting and it's never complained so far.

--Joe


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

-- 

-------
Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o)
http://www.miester.org http://www.care2.com /\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V
---


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




Re: [PHP] crontab help

2001-02-25 Thread Joe Stump

Didn't you just ask this a few days ago?

In your while loop put a sleep(300) which will sleep for 300 seconds after
processing X amount of emails.

--Joe

On Fri, Feb 22, 2002 at 02:53:10PM +0800, Arnold Gamboa wrote:
> hi there.
> 
> is there a way to tell crontab to do:
> 
> "run script every 5 mins for 1 hour"..
> 
> i have this mass email script that is so huge that i need it to chunk into
> records and make sure that it will run every 5 mins for 1 hour.
> 
> Thanks for any help.
> 

-- 

-------
Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o)
http://www.miester.org http://www.care2.com /\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V
---


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




Re: [PHP] isset()

2001-02-25 Thread Joe Stump

empty() fails when $var == 0

--Joe

On Sun, Feb 25, 2001 at 10:50:15AM -0800, Chris Adams wrote:
> On 25 Feb 2001 00:01:30 -0800, Mark Maggelet <[EMAIL PROTECTED]> wrote:
> >On Sat, 24 Feb 2001 17:51:07 +0100, Christian Reiniger 
> >([EMAIL PROTECTED]) wrote:
> >>On Saturday 24 February 2001 17:18, PHPBeginner.com wrote:
> >>> in my preceding email I've written:
> >>>
> >>> if($var!='')
> >>>
> >>> will fix your all your worries without an intervention of a 
> >strings
> >>> function.
> >>
> >>Except that it will throw a warning in PHP4 if $var is not set.
> >>=> isset () should be used.
> >
> >man, this is like the thread that will not die. isset() will return 
> >true for an empty string, which is not what he wants. the right thing 
> >to do is use
> >
> >if((isset($var))&&($var!=""))
> 
> Isn't this a bit more legible:
> 
> if (!empty($var))
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

---
Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o)
http://www.miester.org http://www.care2.com /\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V
---


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




Re: [PHP] mySQL table joins are slow, need rebuild?

2001-02-27 Thread Joe Stump

You need to remember a few things when it comes to joins:

the joined fields must be the EXACT same definition
- example: a join on id int(9) and id int(3) will NOT be optimized
- more: a join on id char(9) and id int(9) is REALLY NOT optimized :O)

We have an accounts table with userID as the key char(15) (don't ask, it's an
old design made by a former employee) which has roughly 1.6 million rows in it.
We regularily do joins on it with other tables that have thousands of records
in less than .05 seconds.

This sounds like a table structure problem to me.

--Joe

On Tue, Feb 27, 2001 at 02:21:53PM -0800, Jason wrote:
> hi,
> 
> i have a query that is comparing a table with 1235 rows with another that
> has 635 rows. The query looks like this:
> 
> $res = mysql_query("select cust_info.ID, cust_info.first_name,
> cust_info.last_name, cust_info.address, cust_info.datestamp from cust_info,
> cust_order_info where cust_info.ID=cust_order_info.cust_id order by
> $mainsort" . $order . ";");
> 
> The parse time with the join is 19 seconds. I have to do a join because
> there a different methods that the user must be able to sort by. The parse
> time on the cust_info table alone, with a order by is .95 seconds.
> 
> Now, we have a RPM binary of mySQL, and when performing the query, not only
> is it slow, but sometimes will dump its core.
> 
> Does anyone see anything wrong with the query, or should we consider
> building the source on our box.. or?
> 
> Thanks.
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

---
Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o)
http://www.miester.org http://www.care2.com /\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V
---


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




Re: [PHP] Direction Help!

2001-02-27 Thread Joe Stump

I've, I guess, graduated to more complex PHP programs mainly through projects
at work. I'd challenge myself to do EVERYTHING in PHP. I've created everything
from large scale, targeted, mailing lists to search engines based on DMOZ with
PHP - with great results. 

I suppose the best way to move on to "advanced features" is to challenge 
yourself and have a good understanding of programming concepts, UNIX, and the
various protocols you work with.

Just my $0.02

--Joe

On Tue, Feb 27, 2001 at 04:01:22PM -0700, Web master wrote:
> Hello Php Gurus,
> 
> Need help on direction. I am using PHP for a while now, I was able to 
> develop very nice sites using PHP/MySql. Now I very comfortable in using 
> PHP and I want to learn more advanced features of PHP. Can anyone tell 
> me go from here??
> I have used PHP for tradtional query based application so far.
> 
> Thanks in advance.
> -Unni
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

-------
Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o)
http://www.miester.org http://www.care2.com /\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V
---


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




Re: [PHP] Double Click

2001-02-27 Thread Joe Stump

Make the id field on the db entry unique - the second query will fail. You 
should also be doing error checking on whether or not the record exists already.

--Joe

On Wed, Feb 28, 2001 at 12:15:38AM -0600, Fabian Fabela wrote:
> Hi,
> 
> I have a page, and when I have to add a product I use a form, many people are used 
>to make double click in every task, so when the product is sent with a double click 
>in the send button, the program send it twice to the data base.
> 
> What can I do to prevent this?
> 
> Thank you.
> 
> Fabian Fabela
> [EMAIL PROTECTED]
> www.vacagorda.com
> 

-- 

-------
Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o)
http://www.miester.org http://www.care2.com /\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V
---


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




Re: [PHP] How to convert a date to an int?(Need help as soon as possible)

2001-03-02 Thread Joe Stump

Well if you have a consistent format (like Month Day, FullYear) then you could
do this:

  function get_unix_stamp($date)
  {
$months = array('Jan' => 1,'Feb' => 2,
'Mar' => 3,'Apr' => 4,
'May' => 5,'Jun' => 6,
'Jul' => 7,'Aug' => 8,
'Sep' => 9,'Oct' => 10,
'Nov' => 11,'Dec' => 11);
$foo = explode(' ',$date);
$month = $months[$foo[0]];
$day = str_replace(',',$foo[1]);
$year = $foo[2];

return mktime(0,0,0,$month,$day,$year);
  }

--Joe

On Fri, Mar 02, 2001 at 06:58:45PM -0500, Fang Li wrote:
> Hi, All,
> I am stucked here.Would you please help as soon as you can?
> 
> LiveDate = "Mar 12,2001"
> 
> how to convert it to a int?
> 
> mktime(0,0,0,?,?,?)
> Because the LiveDate is changable, I could't put a 3,12,2001 in the mktime.
> 
> Thanks a lot.
> 
> Fang
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

---
Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o)
http://www.miester.org http://www.care2.com /\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V
---


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




Re: [PHP] Bug or what?

2001-03-12 Thread Joe Stump

We had NASTY problems with cookies on different servers. I've even seen code
work on one linux/apache machine and not another. This is usually due to the 
fact that the server's clock is off from the browsers clock (or vice versus)
and the browser sees that the cookie has passed and destroys it without setting
it.

--Joe

On Mon, Mar 12, 2001 at 01:08:37PM -0600, Fabio Ottolini (EDB) wrote:
> First File - index.php
> 
>  header("Pragma: no-cache");
> header("Cache-Control: no-cache, must-revalidate");
> if(empty($check)) {
> $page = "index.php?check=1";
> header("Location: $page");
> setcookie("testcookie", "1");
> }
> else {
> if(empty($testcookie)) {   
> echo ("Problem detected!" .
> "Your browser does not support cookies!" .
> "Enable cookies and try again.");
> die;
> }
> else {
> $page = "login.php";
> header("Location: $page");
> }
> }
> ?>
> 
> Second File - login.php
> 
>  header("Pragma: no-cache");
> header("Cache-Control: no-cache, must-revalidate");
> ?>
> 
> 
> Forecast Tool - ATL Key Account
> 
> 
> 
> 
> Login:
> 
> Password:
> 
> 
> 
> 
> 
> 
> 
> 
> Everything works fine when I use these two files with Apache running on Solaris, RH, 
>Windows 98, Windows ME and Windows NT 4.0. The main objective is to test if the 
>browser supports cookies of course. But... If I use Microsoft IIS with these two 
>files it never works! The cookie is NEVER sent to the browser (this was verified 
>using Netscape's option to warn about new cookies coming in) and obviously I always 
>receive the error message stating that my browser doesn't support cookies! 
>Impossible! The same application running on two different servers produces different 
>results? Is it a bug? 
> Thanks in advance!!!
> 
> Best regards,
> 
> FƔbio Ottolini
-- 

---
Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o)
http://www.geekshare.com http://www.care2.com http://www.miester.org/\\
"Those who can, create. Those who can't, complain."_\_V
---


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




Re: [PHP] I want this magic directory

2001-03-14 Thread Joe Stump

Read up on forcetype'ing on phpbuilder.com - it will do just what you want it
to do.

--Joe

On Wed, Mar 14, 2001 at 06:08:18PM +0800, Alex wrote:
> I just want every customer on my site get his own unique id as his directory
> name but the pages requested are all processed by the root.
> Such as: customer1's url is http://www.mysite.com/2000123/
>  customer2's url is http://www.mysite.com/2000124/
>   ^^^UID
> and the pages requested are actually processed by http://www.mysite.com/
> 
> I want it to implement security and personalization. I don't want to use
> .php?uid=XXX because of lazy. :)
> thanks.
> 
> 
> 
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

---
Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o)
http://www.geekshare.com http://www.care2.com http://www.miester.org/\\
"Those who can, create. Those who can't, complain."_\_V
---


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




Re: [PHP] temp file help

2001-04-17 Thread Joe Stump

This is a wonderful IE "feature" - it just tries to open everything regardless
of the browser type. I'd be interested in any working workarounds for this.
I've even sent my own type headers ... all to no avail.

--Joe

On Mon, Apr 16, 2001 at 03:30:30PM -0700, Randy Johnson wrote:
> The following code downloads information on the fly and saves it as a file
> on the user's hard drive.  It works great in Netscape downloads data
> properly but in Internet explorer it doesn't work.
> 
> Here is the error I get any ideas?
> 
> IE was not able to open this site the site is either unavailable or cannot
> be found.
> 
> BUT
> 
> if I right click and says "The file cannot be written to cache".   I even
> commented out the following:
> 
> header("Pragma: no-cache");
> 
> But it still did not work.  Please help !!!
> 
> Thanks
> 
> Randy
> 
> 
> include "db.inc";
> header("Content-disposition: filename=backup.csv");
> header("Content-type: application/octetstream");
> header("Pragma: no-cache");
> header("Expires: 0");
> 
> 
> // doing some DOS-CRLF magic...
> $client=getenv("HTTP_USER_AGENT");
> if (ereg('[^(]*\((.*)\)[^)]*',$client,$regs)):
> $os = $regs[1];
> // this looks better under WinX
> if (eregi("Win",$os)):
>   $crlf="\r\n";
> else:
>   $crlf="\n";
> endif;/* OS = WIN */
> endif;/* ereg $client */
> 
> # DB STATEMENT HERE
> #
>$link_id = db_connect($default_dbname);
>if(!$link_id) error_message(sql_error());
> 
>$result = mysql_query($query)or print "error".mysql_error();
>if(!$result) error_message(sql_error());
>  while($query_data = mysql_fetch_array($result)) {
>  Variable definition/and assignment here
> 
> echo "var1,var2,var3,var4,var5,var6";
>  echo $crlf;
>   }
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


/* Joe Stump
 * Sr. PHP Developer 
 * http://www.Care2.com http://www.joestump.net http://gtk.php-coder.net
 */


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




Re: [PHP] multidimensional arrays

2001-04-17 Thread Joe Stump

> $a[1][2][3][4][5] = "6";
> echo $a[1][2][3][4][5];
> 
> $b[][][][]= "7";
> echo $b[0][0][0][0];
> 
> I get '6' and '7'.  Am I doing something wrong?  This seems like PHP supports
> arrays with
> dimensions greater than 2.

You just need to look at PHP's structure. It makes total sense when you think
about it. You can through arrays into cells in an array without any troubles.
I've had arrays go 4 and 5 deep before just because there was an array I needed
to put in a cell that related to that set of data.

It's not wrong and I regard it as a feature.

--Joe


/* Joe Stump
 * Sr. PHP Developer 
 * http://www.Care2.com http://www.joestump.net http://gtk.php-coder.net
 */


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




Re: [PHP] Tip for cookies

2001-04-17 Thread Joe Stump

Check out "global" it allows you to make things "global" or at the top of your
file you could do a define with the cookie value in it an it would be accessbile
without passing the value to the function - this saves both time in typeing
and is faster since it doesn't have to copy the cookie value to a local variable
each time it is used in a function.

--Joe

On Tue, Apr 17, 2001 at 06:36:45PM -0400, Pat Hanna wrote:
> I found out today after suffering from minor headaches and hair loss that if
> you have functions defined in and outside file name 'foo.php', and in those
> functions you use cookies, you must pass those cookies to the function
> called. I tried using a value from a cookie in a function and it never could
> access it unless I passed it. Funny
> --
> Patrick Hanna
> Database integration--E-commerce solutions
> The Wentworth Company


/* Joe Stump
 * Sr. PHP Developer 
 * http://www.Care2.com http://www.joestump.net http://gtk.php-coder.net
 */


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




Re: [PHP] select question

2001-04-17 Thread Joe Stump

In MySQL you can do this:

$sql = "SHOW TABLES LIKE 'box%'";
$r = mysql_query($sql);

// then loop through the tables and populate

--Joe


On Tue, Apr 17, 2001 at 07:49:11PM -0400, Matt TrollBoy Wiseman wrote:
> How would I word a query to see what tables exist in a db that begin with
> box
> 
> for example include
> boxTABLE1
> boxTABLE2
> boxTABLE3
> but exclude
> sphereTABLE1
> 
> I'm basically trying lo populate a list box with the tables beginning with
> box in PHP.
> 
> Matt "Trollboy" Wiseman
> www.shoggoth.net/trollboy/trollboy.jpg
> [EMAIL PROTECTED]
> "I wish the world had one throat!!"
> -Al Bundy
> 
> -
> Please do not resell my e-mail address
> to anyone or send me unsolicited e-mail
> -
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


/* Joe Stump
 * Sr. PHP Developer 
 * http://www.Care2.com http://www.joestump.net http://gtk.php-coder.net
 */


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




Re: [PHP] MySQL data

2001-04-17 Thread Joe Stump

There are a few ways to do this...

1.) Copy the binary files over in the mysql data directory ... have to be root
and normally at a shell.

2.) SELECT * FROM table and then while() you have rows INSERT INTO other_table
those values

3.) mysqldump can be used via PHP and used by most users ...

hope this helps ...

--Joe

On Tue, Apr 17, 2001 at 09:05:02PM -0300, Augusto Cesar Castoldi wrote:
> This question has not much with PHP, but I work with PHP...
> 
> Can I get the data from a table in MySQL and copy/transfer all data to
> other database to a table with the same name?
> 
> regards,
> 
> Augusto Cesar Castoldi
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


/* Joe Stump
 * Sr. PHP Developer 
 * http://www.Care2.com http://www.joestump.net http://gtk.php-coder.net
 */


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




Re: [PHP] Last 10 rows

2001-04-17 Thread Joe Stump

Well - what is considered the last of the list? Is it a number? are they names?

Either way  you have a field you are ordering by ...

SELECT * FROM table ORDER BY lastname DESC LIMIT 10;

that'll do the trick. FYI you can sort numbers, dates, and chars - this is from
the hip and you might be able to do others ...

--Joe


On Mon, Apr 16, 2001 at 11:53:12PM -0700, Randy Johnson wrote:
> How do I get the last 10 rows in a table?
> 
> thanks
> 
> randy
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


/* Joe Stump
 * Sr. PHP Developer 
 * http://www.Care2.com http://www.joestump.net http://gtk.php-coder.net
 */


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




Re: [PHP] need help

2001-04-18 Thread Joe Stump

The 3rd argument for fwrite() is the length of the string. So you should do:

$fp = fopen('./file.txt','w');
$line = "$text\n";
fwrite($fp,$line,strlen($line));
fclose($fp);

--Joe

On Wed, Apr 18, 2001 at 01:38:11AM -0500, chris herring wrote:
> this is really buggin me... i've got this free-for-all that i want to make, and 
>everything seems logical, but
> 
> echo "";
> echo "";
> echo "";
> echo "";
> echo "";
> 
> 
> 
> if (isset($url) && isset($text)) {
> $fp = fopen("./file.txt", "w");
> fwrite("$fp", "$text", "w");
> fclose($fp);
> }
> 
> ... that isn't writing anything to the file. any help would be appreciated. thx in 
>advance


/* Joe Stump
 * Sr. PHP Developer 
 * http://www.Care2.com http://www.joestump.net http://gtk.php-coder.net
 */


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




Re: [PHP] Characters counting

2001-04-18 Thread Joe Stump

look into the substr() function in PHP

--Joe

On Tue, Apr 18, 2000 at 09:23:39PM +0200, Jorn van Eck wrote:
> Hi there,
> 
> Does someone know how to display for example150 characters from a $ set by
> MySQL?
> --
> Jorn van Eck
> Student Information Engineering
> Almere
> Tel: +31 614430902
> E-mail: [EMAIL PROTECTED]
> Website: http://www.iie.nl/~eck13
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


/* Joe Stump
 * Sr. PHP Developer 
 * http://www.Care2.com http://www.joestump.net http://gtk.php-coder.net
 */


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




Re: [PHP] Finding the records that are NOT linked

2001-04-18 Thread Joe Stump

On your join instead of doing ID=ID do ID!=ID 

--Joe

On Wed, Apr 18, 2001 at 09:55:05PM +0100, Simon Kimber wrote:
> Hi all,
> 
> I have written a PHP/MySQL "top-sites" program.  It has two tables,
> link_sites, which contains the details of all the sites signed up
> (ID,url,title,description) and link_stats in which a new record is inserted
> every time a visitor links in from one of those sites
> (ID,siteID,clientIP,datestamp).
> 
> Can anyone help me write a SQL query to pull out all the sites in link_sites
> that are not mentioned in link_stats..  ie the ones that have never been
> clicked..
> 
> Cheers
> 
> Simon Kimber
> Funny.co.uk - The Comedy Portal
> http://www.funny.co.uk/
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


/* Joe Stump
 * Sr. PHP Developer 
 * http://www.Care2.com http://www.joestump.net http://gtk.php-coder.net
 */


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




Re: [PHP] XML - simple get data from elements

2001-04-18 Thread Joe Stump

I wrote an article for PHPBuilder.com - I would start there - I made it as easy as 
possible.

--Joe

On Wed, Apr 18, 2001 at 04:58:28PM -0400, Mark Bean wrote:
> I have a valid XML file that all I want to do is assign to variables the 
> data in the elements  and .  I know nothing about XML and 
> am not a programmer.  Are there any good tutorials out there to do something 
> as simple as what I'm looking for?  Will expat do what I'm looking for?  I 
> think that I installed PHP properly for XML support.  Is there a way to 
> verify this?
> 
> Thanks,
> Mark
> 
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.com
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


/* Joe Stump
 * Sr. PHP Developer 
 * http://www.Care2.com http://www.joestump.net http://gtk.php-coder.net
 */


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




Re: [PHP] how to scale down image using ImageMagick?

2001-04-19 Thread Joe Stump

I just created a class that gets info resizes and stamps an image with
text. It's pretty simple, but works. If anyone wants it email me privately.

--Joe

On Wed, Apr 18, 2001 at 06:00:38PM -0400, Morgan Curley wrote:
> according to the docs use
> -geometry 175x175> picture.jpeg
> 
> man mogrify:
>   -geometry x{+-}{+-}{%}{!}{<}{>}
>preferred width and height of the image.  See X(1) for 
> details about the geometry specification.
> 
>By default, the width and height are maximum values.  That 
> is, the image is expanded or contracted to
>fit the width and height value while maintaining the aspect 
> ratio of the image.  Append an exclamation
>point to the geometry to force the image size to exactly the 
> size you specify.  For example, if you
>specify 640x480! the image width is set to 640 pixels and 
> height to 480.  If only one factor is speciĀ­
>fied, both the width and height assume the value.
> 
>To specify a percentage width or height instead, append 
> %.  The image size is multiplied by the width
>and height percentages to obtain the final image 
> dimensions.  To increase the size of an image, use a
>value greater than 100 (e.g. 125%).  To decrease an image's 
> size, use a percentage less than 100.
> 
>Use > to change the dimensions of the image only if its size 
> exceeds the geometry specification.  <
>resizes the image only if its dimensions is less than the 
> geometry specification.  For example, if you
>specify 640x480> and the image size is 512x512, the image 
> size does not change.  However, if the image
>is 1024x1024, it is resized to 640x480.
> 
> it looks like mogrify bases its resizing on the first value that is diff 
> than the one supplied i.e. if your image is 200x50 it will scale it to 
> 175x? but if it is 50x200 it will scale it to ?x175
> 
> if it is important you not resize based on height use identify to get the 
> geometry first.
> 
> morgan
> 
> 
> At 04:27 PM 4/18/2001, Noah Spitzer-Williams wrote:
> >I have a bunch of pictures all in ranging filesizes and dimensions. I want
> >to resize the ones that over 175 pixels wide to a 175 pixel wide picture
> >however i want the height to scale down (ie. i dont want a really thin
> >picture, i just want it to be what it would be if it were resized). i have
> >this but i cant figure out how to just scale down the width:
> >
> >c:\progra~1\imagem~1\mogrify.exe -geometry 175x30! picture.jpeg
> >
> >the '!' forces those sizes to be used but obvoiusly i dont want the height
> >to be 30. i want it to be whatever it should be so the picture doesnt look
> >flattened.
> >
> >Thanks! - Noah
> >
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]


/* Joe Stump
 * Sr. PHP Developer 
 * http://www.Care2.com http://www.joestump.net http://gtk.php-coder.net
 */


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




Re: [PHP] image-resize/convert

2001-04-19 Thread Joe Stump

Again - if you have imagemagick installed email me and I'll email you my little
class that does this.

--Joe

On Thu, Apr 19, 2001 at 10:02:47AM +0200, De Bodemschat wrote:
> Hello,
> 
> I'm creating a bunch of photogalleries and wondering about the following:
> 
> - Is it possible to convert an image or a whole dir with images (jpg) to 60%
>   of the original imagesize using php to automate this task?
> 
> I know the gd library is installed, but don't know if it supports jpg... And
> what functions do I need to use?
> >>
> gd-variables in phpinfo():
> GD Support enabled
> GD Version 1.6.2 or higher
> FreeType Support enabled
> FreeType Linkage with TTF library
> PNG Support enabled
> <<
> 
> Hope you people can help.
> THanks,
> 
> Bart Verbeek
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


/* Joe Stump
 * Sr. PHP Developer 
 * http://www.Care2.com http://www.joestump.net http://gtk.php-coder.net
 */


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




Re: [PHP] List Files

2001-04-19 Thread Joe Stump

$foo = `ls help*`;
$files = explode("\n",$foo);
while(list(,$fname) = each($files))
  echo $fname."\n";

--Joe

On Thu, Apr 19, 2001 at 08:25:19AM -0400, [EMAIL PROTECTED] wrote:
> Hi,
> 
> Does anyone know how I can list all the files begining with help in one of my 
> pages.
> 
> So I have a dir which has various files, like so:
> 
> help_me.php
> help_you.php
> help_us.php
> 
> Is there some command I can use to select all the files and then print them 
> out?
> 
> TIA
> Ade
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


/* Joe Stump
 * Sr. PHP Developer 
 * http://www.Care2.com http://www.joestump.net http://gtk.php-coder.net
 */


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




[PHP] convert class

2001-04-20 Thread Joe Stump

I've heard a lot of people asking for info on imagemagick & php. I've created
a small class that resizes images, gets info, and stamps images. It's nothing
to call home to mom about, but it works.

http://www.miester.org/software/convert.php.asc

--Joe

/* Joe Stump
 * Sr. PHP Developer 
 * http://www.Care2.com http://www.joestump.net http://gtk.php-coder.net
 */


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




[PHP] timezones

2001-04-30 Thread Joe Stump

I have a quick question regarding timezones ...

On the local side a record is inserted into the DB by someone in Michigan, while
the server rests in CA. Thus a three hour difference. The local mktime() will
create a timestamp for say 9:00am when in reality it was entered at 12:00noon
in MI. I have 2 character timezones for all my users so it should be easy to
convert the two.

putenv() won't work because of the fact that the timestamp created will be 
9:00 no matter what timezone you put it in. So what needs to be done is some
recognition that 10800 seconds needs to be added to adjust the PST timestamp
to an EST timestamp. Are there any functions out ther that do this?

--Joe

Joe Stump <[EMAIL PROTECTED]>

One is taught by experience to put a premium on those 
few people who can appreciate you for what you are.  


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




Re: [PHP] Link Color Questions

2001-04-30 Thread Joe Stump

No you don't :)

http://www.domain1.com";>url1
http://www.domain2.com";>url2
http://www.domain3.com";>url3
http://www.domain4.com";>url4

--Joe

On Sun, Apr 22, 2001 at 04:18:51PM -0500, Jeff Oien wrote:
> You need to use style sheets:
> http://www.awlonline.com/cseng/titles/0-201-41998-X/liebos/
> http://www.builder.com/Authoring/CSS/?tag=st.bl.7258.dir1.bl_CSS
> http://www.wdvl.com/Authoring/Style/Sheets/
> Jeff Oien
> 
> > Hi,
> >
> >  I would like to know how to make different link in different color on
> > one page.
> >
> > etc.  www.domain1.com in blue color
> >www.domain2.com in red color
> >www.domain3.com in orange color
> >
> > Thank you for your help
> >
> > Mark
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

Joe Stump <[EMAIL PROTECTED]>

It is impossible to love and be wise.  

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




Re: [PHP] timezones

2001-04-30 Thread Joe Stump

Thanks to everyone who sent in the info. The problem is as follows:

1.) the mktime()'s are stored as PST in the DB.
2.) we have users ALL OVER the world - is there a place to find all of the
timezones at?

--Joe

On Mon, Apr 30, 2001 at 12:11:55PM -0700, Mark Maggelet wrote:
> On Mon, 30 Apr 2001 13:56:20 -0500, Joe Stump ([EMAIL PROTECTED])
> wrote:
> >I have a quick question regarding timezones ...
> >
> >On the local side a record is inserted into the DB by someone in
> >Michigan, while
> >the server rests in CA. Thus a three hour difference. The local
> >mktime() will
> >create a timestamp for say 9:00am when in reality it was entered at
> >12:00noon
> >in MI. I have 2 character timezones for all my users so it should be
> >easy to
> >convert the two.
> 
> you could use gmmktime() instead and add or subtract the offset.
> 
> $offsets=array("
> "PST"=>1000,  // not actual values
> "EST"=>-2000,
> ");
> 
> $localtime=gmmktime()+$offsets[$timezone];
> 
> >putenv() won't work because of the fact that the timestamp created
> >will be
> >9:00 no matter what timezone you put it in. So what needs to be done
> >is some
> >recognition that 10800 seconds needs to be added to adjust the PST
> >timestamp
> >to an EST timestamp. Are there any functions out ther that do this?
> >
> >--Joe
> >
> >Joe Stump <[EMAIL PROTECTED]>
> >-
> 
> >---
> >One is taught by experience to put a premium on those
> >few people who can appreciate you for what you are.
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: php-list-
> >[EMAIL PROTECTED]
> 

Joe Stump <[EMAIL PROTECTED]>

Dyslexics of the world  

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




[PHP] server alias

2001-05-14 Thread Joe Stump

Say i have a server foobar.com and in my httpd.conf i have *.foobar.com as
a ServerAlias in my  is there a common PHP var that will give me
the domain someone actually types in?

$SERVER_NAME only gives me foober.com (since that is the servername), but not
the alias someone typed in to get there ...

--Joe


Joe Stump <[EMAIL PROTECTED]>

Life is cheap. It's the accessories that kill you. 

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




Re: [PHP] server alias

2001-05-14 Thread Joe Stump

Works great - thanks!

--Joe

On Tue, May 15, 2001 at 11:51:35AM +1000, Jason Brooke wrote:
> > $SERVER_NAME only gives me foober.com (since that is the servername), but not
> > the alias someone typed in to get there ...
> >
> > --Joe
> 
> Give HTTP_HOST a go
> Check here for more
> http://www.php.net/manual/en/language.variables.predefined.php or use phpinfo()
> to see exactly what you have available
> 
> jason
> 
> 

Joe Stump <[EMAIL PROTECTED]>

There is no remedy for sex but more sex. (contributed by 
Chris Johnston) 

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




Re: [PHP] building a php based subscription site (not a porn site)

2001-11-18 Thread Joe Stump

What I usually do is set a cookie BEFORE sending them to the paypal site then
on the confirm page (which they click through to after they paid) check for the
cookie - if it's there then activate the account. If not then delete the 
account after 5 days (gives them plenty of time to bitch if they didn't click
through).

Make sure to put a LARGE notice on your signup form explaining exactly how to
activate their account.

Hope this helps - it's worked great for me in the past.

--Joe

On Fri, Nov 16, 2001 at 06:02:38PM -0500, Vincent Stoessel wrote:
> I am helping a client make a transition from a ad revenue based site
> to a membership based one and I was wondering if there was some commonly
> used mechanism for php based membership sites. I have made
> membership sites before but they were free. How does one :
> 
> 1. Have a person register a username
> 2. pay for membership ( paypay, payflow)
> 3. Verify that membership is payed for
> 4. Allow user to log in and browse member only content.
> 
> 
> umber 1 and 4 I know how to do but I'm not sure if my list is in
> the correct order. Should they pay for membership, then select a username?
> 
> Has someone done this before?
> -- 
> Vincent Stoessel [EMAIL PROTECTED]
> Java Linux Apache Mysql Php (JLAMP) Engineer
> (301) 362-1750 Mobile (410) 419-8588
> AIM, MSN: xaymaca2020 , Yahoo Messenger: vks_jamaica
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

Joe Stump <[EMAIL PROTECTED]>

"How would this sentence be different if pi equaled 3?" 




msg40405/pgp0.pgp
Description: PGP signature


Re: [PHP] Auto Thumbnail?

2001-11-18 Thread Joe Stump

All you need is the nifty little program called convert - I have a frontend
class called convert.php at my website. Check out http://www.miester.org 
in the code section.

BTW, this bypasses the need for compiling gd into your php compile. Also, you'll
want to make sure you have convert on your system (sometimes isn't installed).
It's part of the Image Magik utility pack.

--Joe

On Fri, Nov 16, 2001 at 11:16:57PM +, cosmin laslau wrote:
> I've got a website which will alllow users to upload photos (jpegs) and, 
> once approved, they'll be up for display. To do that, I need an 
> auto-thumbnail script, preferrably for on-the-fly thumb generation.
> 
> Any ideas? Also, what kind of libraries would I need.
> 
> Thanks. The site is http://www.flat-6.net/f6
> 
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

Joe Stump <[EMAIL PROTECTED]>

"How would this sentence be different if pi equaled 3?" 




msg40406/pgp0.pgp
Description: PGP signature


Re: [PHP] alzheimers and confused

2001-11-18 Thread Joe Stump

if(!eregi("\.jpg$",$image) || !eregi("\.jpeg$",$image))
  die("ERROR: doesn't appear to be a JPeg image!");

--Joe

On Fri, Nov 16, 2001 at 09:45:07PM -0500, jtjohnston wrote:
> OK kids, I'm not 19 ... my old brain gets tired easily and my wife is
> complaining that I stay up too late PHPing :)
> Putting the rest aside, why does AND work and not OR. OR was what I
> meant?
> I meant ... if the string doesn't contain .jpg or the string doesn't
> contain .jpeg ... > ERROR!
> 
> John
> 
>  $errorfound = 0;
> $yourimage =
> 
>"http://callisto.si.usherb.ca/~ang96m04/cgi-bin/postcards/e.jpegstrie/sap_bucket.jpg";;
> 
> // if((!strpos($yourimage, ".jpg")) or (!strpos($yourimage, ".jpeg")))
>  if((!strpos($yourimage, ".jpg")) and (!strpos($yourimage, ".jpeg")))
>  {
>   $errorfound++;
>   echo"Your image \"$yourimage\" did
> not contain .jpg or .jpeg";
>  }else{
>   echo"Your image \"$yourimage\" contains
> .jpg or .jpeg";
>  }
> 
> ?>
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

Joe Stump <[EMAIL PROTECTED]>

"How would this sentence be different if pi equaled 3?" 




msg40407/pgp0.pgp
Description: PGP signature


Re: [PHP] Question on variable variables

2001-11-18 Thread Joe Stump

This would be the logical way to do it (as I see it):

define('MY','pre_');
$a = "dog";
$new_var = MY.$a;

$$new_var and $pre_dog are the same :)

--Joe


On Fri, Nov 16, 2001 at 09:47:12PM -0500, Jeff Lewis wrote:
> I've a question regarding variable variable I was hoping someone could help me with:
> 
> All the examples in the manual have the entire variable name being variable e.g.
> $a = "hello"   and
> $$a being the same as $hello
> 
> What I need to do, however, is append a variable portion to a constant prefix.  So I 
>have a set of variables that are named $MYdog, $MYcat etc. and I need to do
> 
> $a = "dog"
> ${"MY$a"} being the same as $MYdog
> 
> Can this be done, and if so - how? I can't get it to work.
> 
> Jeff

Joe Stump <[EMAIL PROTECTED]>

"How would this sentence be different if pi equaled 3?" 




msg40409/pgp0.pgp
Description: PGP signature


Re: [PHP] comma-formatting numbers

2001-11-18 Thread Joe Stump

Here is an example of number format:



--Joe


On Sat, Nov 17, 2001 at 01:45:16PM -0800, Paul Wolstenholme wrote:
> You can do this using the number_format function or probably sprintf.
> /Paul
> 
> On Saturday, November 17, 2001, at 01:36  PM, Scott Dudley wrote:
> 
> >
> >i'm new to php and am having difficulty translating this tiny awk
> >function that i use to comma format numbers.  can someone assist?  my
> >stumbling block thus far have been the fact the the php regex matching
> >functions don't return the byte offset within the haystack and the regex
> >replace functions don't support the awk and perl-like ampersand "&" in
> >the replacement pattern.  please help and thanks.
> >
> >function commas(num) {
> >  while (num ~ /[0-9][0-9][0-9][0-9]/)
> >sub (/[0-9][0-9][0-9]$|[0-9][0-9][0-9][,]/, ",&", num)
> >
> >  return num
> >}
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

Joe Stump <[EMAIL PROTECTED]>

"How would this sentence be different if pi equaled 3?" 




msg40412/pgp0.pgp
Description: PGP signature


Re: [PHP] PHP Backing up a Database?

2001-11-18 Thread Joe Stump

This is what you'll want to do:

0 0 * * * /path/to/mysqldump -u[username] -p[username] [database] > /path/to/backup.sql

Put that above in your crontab (you might want to tar/gzip it too if it's big)
then download it via cron to your local box.

You could also look into rsync.

--Joe

On Sat, Nov 17, 2001 at 10:25:04PM +, cosmin laslau wrote:
> Hi,
> 
> Say I'm not really confident in the prowess of my server, and I want to 
> download my database onto my computer. Can that be done? What can I look 
> (FTP access) in the directory structure. I guess, where is it usually 
> located?
> 
> Thanks.
> 
> Cosmin Laslau
> 
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

Joe Stump <[EMAIL PROTECTED]>

"How would this sentence be different if pi equaled 3?" 




msg40413/pgp0.pgp
Description: PGP signature


Re: [PHP] extract() question

2001-11-18 Thread Joe Stump

You may want to do something like this instead:



--Joe


On Sun, Nov 18, 2001 at 04:21:46PM -0500, David Bernier wrote:
> There is this array which I would like to convert into a series variables using the 
>extract function: 
> 
>  $oz = array(
>  "lion" => "courage", 
>  "dorothy" => "kansas", 
>  "scarecrow" => "brain"
>  "tin man" => "heart"); 
> 
> extract($oz);
> ?>
> 
> now, I would like to access my new variables. it is obviously easy for $lion, 
>$dorothy, and $scarecrow but it isn't for "tin man".
> 
> from this, I have 3 or 4 questions:
> 1) has $oz["tin man"] been passed into a variable?
> 2) if yes, how do I access the variable that came out of $oz["tin man"]?
> 3) let's pretend that I have no control over the names of the keys for $oz, how 
>should I have called extract() to tell it to replace the space between "tin" and 
>"man" by a underscore character?
> 4)  finally, is there a way to access and retrieve that values of the symbol table 
>without knowing their names?
> 
> David
> 

Joe Stump <[EMAIL PROTECTED]>

"How would this sentence be different if pi equaled 3?" 




msg40414/pgp0.pgp
Description: PGP signature


Re: [PHP] relative paths

2001-11-18 Thread Joe Stump

An easy way to fix this common problem is this:

define('BASE_INCLUDE_PATH','/var/www/includes/');

include(BASE_INCLUDE_PATH.'my_include.inc');

Just make sure to include the file with the BASE_INCLUDE_PATH define using a
relative path ... ie.



--Joe


On Sat, Nov 17, 2001 at 05:15:02PM +0100, Mitja Pagon wrote:
> Hi!
> 
> I want to know if there is a way to include(require) a file using a path
> relative to web server root.
> 
> I'm aware of the fact that you can specify include path, but I believe that
> this is not the best solution, since applications written that way aren't
> easily portable.
> 
> What I'm looking for is something similar to what "/" does in HTML paths and
> SSI include directives.
> 
> Thanks,
> 
> Mitja Pagon
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

Joe Stump <[EMAIL PROTECTED]>

"How would this sentence be different if pi equaled 3?" 




msg41133/pgp0.pgp
Description: PGP signature


Re: [PHP] random letters and numbers

2001-03-24 Thread Joe Stump

Sure - use md5()

--Joe

On Sat, Mar 24, 2001 at 12:05:49PM -0500, Randy Johnson wrote:
> Is there an easy way to create random numbers and letters for a file example
> 
> 
> http://www.mydomain.com/1w2e3rff.txt  
> 
> and then after they download it have it be deleted off the server?
> 
> 
> thanks
> 
> randy
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
/*\
 *Joe Stump  *
 *www.Care2.com  *   
 *Office: 650.328.0198   *
 *Extension: 122 *
\*/
www.miester.org

-BEGIN GEEK CODE BLOCK-
Version: 3.12 
GB/E/IT d- s++:++ a? C UL++$ P+ L+++$ E! W+++$
N+@ o? K? w---! O-@ M+@ V-! P(++) PE(+) Y+@ PGP+++@ t+@
5? R-! tv@ b+ DI++@ D() G++@ e+@ h@ r+! z(+**)!
--END GEEK CODE BLOCK--


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




[PHP] New PHP-GTK Site

2001-03-27 Thread Joe Stump

I've noticed there isn't really a jumping off point for the PHP-GTK beginners
and users. I spent the last few hours throwing a site together that has the
basics to fill this void.

It has:

1.) An application archive
2.) News 
3.) Discussion
4.) Helpful Links

I've put up one of my initial apps and plan to put up a few others and maybe
a small HOWTO. I'd like the people who have been posting apps to take a few 
minutes to post their apps here as well. Also, anyone who was thinking of 
posting their apps it might be better served if we posted them in a more
central location. Finally, if anyone wants to help out (admin, howtos, etc.)
please feel free to contact me. 

As for me, I'm tired and plan on working on it more tomarrow :o)

--Joe


/*****\
 *Joe Stump  *
 *www.Care2.com  *   
 *Office: 650.328.0198   *
 *Extension: 122 *
\*/
www.miester.org

-BEGIN GEEK CODE BLOCK-
Version: 3.12 
GB/E/IT d- s++:++ a? C UL++$ P+ L+++$ E! W+++$
N+@ o? K? w---! O-@ M+@ V-! P(++) PE(+) Y+@ PGP+++@ t+@
5? R-! tv@ b+ DI++@ D() G++@ e+@ h@ r+! z(+**)!
--END GEEK CODE BLOCK--


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




[PHP] Re: [PHP-GTK] New PHP-GTK Site

2001-03-27 Thread Joe Stump

So tired I forgot to put in the URL:

http://gtk.php-coder.net

--Joe

On Tue, Mar 27, 2001 at 10:32:26PM -0500, Joe Stump wrote:
> I've noticed there isn't really a jumping off point for the PHP-GTK beginners
> and users. I spent the last few hours throwing a site together that has the
> basics to fill this void.
> 
> It has:
> 
> 1.) An application archive
> 2.) News 
> 3.) Discussion
> 4.) Helpful Links
> 
> I've put up one of my initial apps and plan to put up a few others and maybe
> a small HOWTO. I'd like the people who have been posting apps to take a few 
> minutes to post their apps here as well. Also, anyone who was thinking of 
> posting their apps it might be better served if we posted them in a more
> central location. Finally, if anyone wants to help out (admin, howtos, etc.)
> please feel free to contact me. 
> 
> As for me, I'm tired and plan on working on it more tomarrow :o)
> 
> --Joe
> 
> 
> /*\
>  *Joe Stump  *
>  *www.Care2.com  *   
>  *Office: 650.328.0198   *
>  *Extension: 122 *
> \*/
> www.miester.org
> 
> -BEGIN GEEK CODE BLOCK-
> Version: 3.12 
> GB/E/IT d- s++:++ a? C UL++$ P+ L+++$ E! W+++$
> N+@ o? K? w---! O-@ M+@ V-! P(++) PE(+) Y+@ PGP+++@ t+@
> 5? R-! tv@ b+ DI++@ D() G++@ e+@ h@ r+! z(+**)!
> --END GEEK CODE BLOCK--
> 
> 
> -- 
> PHP GTK Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
/*\
 *Joe Stump  *
 *www.Care2.com  *   
 *Office: 650.328.0198   *
 *Extension: 122 *
\*/
www.miester.org

-BEGIN GEEK CODE BLOCK-
Version: 3.12 
GB/E/IT d- s++:++ a? C UL++$ P+ L+++$ E! W+++$
N+@ o? K? w---! O-@ M+@ V-! P(++) PE(+) Y+@ PGP+++@ t+@
5? R-! tv@ b+ DI++@ D() G++@ e+@ h@ r+! z(+**)!
--END GEEK CODE BLOCK--


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




Re: [PHP] file deletions ....

2001-03-28 Thread Joe Stump

Make sure that the PHP user (usually nobody) has the access to delete those
files - I usually just do `rm -fr /path/to/file.foo`; and it works fine.

--Joe

On Wed, Mar 28, 2001 at 09:42:36AM +0100, Steve Brett wrote:
> hi,
> 
> i need to delete files in my web folder so i can 'tidy' them up. i have a
> username and password that has ftp access and so far i've tried system(),
> unlink() and setting up an ftp connection (they use php 4.03 whihc seems to
> have ftp access closed).
> 
> i have no problem listing the files i want to delete but seem unable to
> delete them.
> 
> can anyone help ?
> 
> Steve
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
/*\
 *Joe Stump  *
 *www.Care2.com  *   
 *Office: 650.328.0198   *
 *Extension: 122 *
\*/
www.miester.org

-BEGIN GEEK CODE BLOCK-
Version: 3.12 
GB/E/IT d- s++:++ a? C UL++$ P+ L+++$ E! W+++$
N+@ o? K? w---! O-@ M+@ V-! P(++) PE(+) Y+@ PGP+++@ t+@
5? R-! tv@ b+ DI++@ D() G++@ e+@ h@ r+! z(+**)!
--END GEEK CODE BLOCK--


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




Re: [PHP] New PHP-GTK Site

2001-03-28 Thread Joe Stump

PHP-GTK, for those who don't know, is an implementation of GTK using the PHP
language. It basically allows you to program GUI applications in PHP on Windows,
Linux, and basically any other OS that GTK and PHP will compile on.

To find out more information check out:

http://www.gtk.org
http://gtk.php.net
http://gtk.php-coder.net

--Joe

On Wed, Mar 28, 2001 at 11:19:24AM -0800, elias wrote:
> What is PHP-GTK?
> Can you just write me a short list of what it can do?
> 
> "Joe Stump" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I've noticed there isn't really a jumping off point for the PHP-GTK
> beginners
> > and users. I spent the last few hours throwing a site together that has
> the
> > basics to fill this void.
> >
> > It has:
> >
> > 1.) An application archive
> > 2.) News
> > 3.) Discussion
> > 4.) Helpful Links
> >
> > I've put up one of my initial apps and plan to put up a few others and
> maybe
> > a small HOWTO. I'd like the people who have been posting apps to take a
> few
> > minutes to post their apps here as well. Also, anyone who was thinking of
> > posting their apps it might be better served if we posted them in a more
> > central location. Finally, if anyone wants to help out (admin, howtos,
> etc.)
> > please feel free to contact me.
> >
> > As for me, I'm tired and plan on working on it more tomarrow :o)
> >
> > --Joe
> >
> >
> > /*\
> >  *Joe Stump  *
> >  *www.Care2.com  *
> >  *Office: 650.328.0198   *
> >  *Extension: 122 *
> > \*/
> > www.miester.org
> >
> > -BEGIN GEEK CODE BLOCK-
> > Version: 3.12
> > GB/E/IT d- s++:++ a? C UL++$ P+ L+++$ E! W+++$
> > N+@ o? K? w---! O-@ M+@ V-! P(++) PE(+) Y+@ PGP+++@ t+@
> > 5? R-! tv@ b+ DI++@ D() G++@ e+@ h@ r+! z(+**)!
> > --END GEEK CODE BLOCK--
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
/*\
 *Joe Stump  *
 *www.Care2.com  *   
 *Office: 650.328.0198   *
 *Extension: 122 *
\*/
www.miester.org

-BEGIN GEEK CODE BLOCK-
Version: 3.12 
GB/E/IT d- s++:++ a? C UL++$ P+ L+++$ E! W+++$
N+@ o? K? w---! O-@ M+@ V-! P(++) PE(+) Y+@ PGP+++@ t+@
5? R-! tv@ b+ DI++@ D() G++@ e+@ h@ r+! z(+**)!
--END GEEK CODE BLOCK--


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




  1   2   >