php-general Digest 18 Aug 2002 11:43:43 -0000 Issue 1532

Topics (messages 113097 through 113132):

Re: preg_match help?
        113097 by: Bas Jobsen
        113098 by: vic
        113099 by: vic
        113115 by: Jason Wong

How Can I Generate an Email List from a MySQL Table
        113100 by: Roger Lewis
        113101 by: Chris Knipe
        113103 by: Roger Lewis
        113105 by: Justin French
        113112 by: Manuel Lemos

yesterday's day of week
        113102 by: Kenton Letkeman
        113106 by: Jason Wong
        113107 by: Justin Garrett
        113108 by: Justin French

array's
        113104 by: Pafo
        113110 by: Jason Wong
        113111 by: robert mischke

Random Passwords Generator
        113109 by: Csar Aracena
        113114 by: Manuel Lemos
        113116 by: Liam MacKenzie

Re: quick ereg() question
        113113 by: Jason Wong

Re: PHP - mail() function problem
        113117 by: N. Pari Purna Chand
        113118 by: N. Pari Purna Chand

ICQ interface?
        113119 by: Justin French
        113123 by: Justin French

pop-up
        113120 by: Mantas Kriauciunas
        113121 by: Justin French
        113122 by: Mantas Kriauciunas
        113124 by: Jason Soza
        113127 by: Justin French

Re: Cleanup script
        113125 by: Julio Nobrega

Help needed about queries with MySQL, thanks.
        113126 by: Jean-Marc Godart
        113128 by: Jason Wong
        113129 by: Jean-Marc Godart
        113130 by: Jason Wong

Installing PHP... ASAP
        113131 by: Konstantin

Sort multidimensional array using Natural-Order
        113132 by: Hessu

Administrivia:

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

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

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


----------------------------------------------------------------------
--- Begin Message ---
preg_match("/.*<b[^>]+>(.*)<font face=\"Verdana\" size=\"3\">.*/", 
$contents,$story);
echo $story[1];

preg_match always return a array. The first element ($array[0])contains your 
complete regexp. The next ($array[1])one the first match between () etc.
Don't use ! but /




Op zondag 18 augustus 2002 01:27, schreef Jason Soza:
> I seriously need some help trying to make a match here. Obligatory
> disclaimer: yes, I've searched google.com, I've read the PHP manual section
> on preg_match(), and I've sat here for 3 hours trying to resolve this on my
> own. :) Any help would be great:
>
> I need to match everything between:
>
> <b>$headline
>
> Where $headline is a variable that will be filled out of a foreach() loop.
> The pattern should return everything until it hits:
>
> <font face="Verdana" size="3">
>
> The text file this is taken out of looks like:
>
> <font face="Verdana" size="3"><b>Headline here</b></font><p>
>
> News story, blah, blah, blah...
>
> <font face="Verdana" size="3"><b>Another headline</b></font><p>
>
> More news, blah, blah...
>
> ...
>
> The contents of the text file echo correctly before the preg_match, but the
> preg_match I've tried:
>
> preg_match("!<b[^>]+>(.*)<font face=\"Verdana\" size=\"3\">!", $contents,
> $story);
>
> Returns array(), so no matches are made. Any suggestions?
>
> TIA,
>
> Jason Soza
--- End Message ---
--- Begin Message ---
Ok, since I've been trying to get this working forever, how wold you get
something like this working I need, to get everything between these 2
tags:

<div class=Section1> and </div>

Someone gave me this code:

preg_match('!<div class=Section1[^>]+>(.*)</div>!Uis',$str,$regs);

with the ! in front, and !Uis at the end, what does that mean? 

And when i try it with your script:

preg_match('/.*<div class=Section1[^>]+>(.*)</div>.*/',$str,$regs);
$good = $regs[1];
echo $good;


I get:

Warning: Unknown modifier 'd' in
/home/victor/argilent-www/sites/malibu_place_2/main.php on line 197

197 is the preg_match code line.

- Vic


-----Original Message-----
From: Bas Jobsen [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, August 17, 2002 6:49 PM
To: Jason Soza; PHP-General
Subject: Re: [PHP] preg_match help?

preg_match("/.*<b[^>]+>(.*)<font face=\"Verdana\" size=\"3\">.*/", 
$contents,$story);
echo $story[1];

preg_match always return a array. The first element ($array[0])contains
your 
complete regexp. The next ($array[1])one the first match between () etc.
Don't use ! but /




Op zondag 18 augustus 2002 01:27, schreef Jason Soza:
> I seriously need some help trying to make a match here. Obligatory
> disclaimer: yes, I've searched google.com, I've read the PHP manual
section
> on preg_match(), and I've sat here for 3 hours trying to resolve this
on my
> own. :) Any help would be great:
>
> I need to match everything between:
>
> <b>$headline
>
> Where $headline is a variable that will be filled out of a foreach()
loop.
> The pattern should return everything until it hits:
>
> <font face="Verdana" size="3">
>
> The text file this is taken out of looks like:
>
> <font face="Verdana" size="3"><b>Headline here</b></font><p>
>
> News story, blah, blah, blah...
>
> <font face="Verdana" size="3"><b>Another headline</b></font><p>
>
> More news, blah, blah...
>
> ...
>
> The contents of the text file echo correctly before the preg_match,
but the
> preg_match I've tried:
>
> preg_match("!<b[^>]+>(.*)<font face=\"Verdana\" size=\"3\">!",
$contents,
> $story);
>
> Returns array(), so no matches are made. Any suggestions?
>
> TIA,
>
> Jason Soza

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

______________________________________________________________________ 
Post your ad for free now! http://personals.yahoo.ca
--- End Message ---
--- Begin Message ---
 Actually I made a mistake, I get nothing, which might mean that I am
looking for the wrong thing in ereg preg match, or I don't know ,much
about reg exp and that space is throwing it off???? 

I dunno.. 

- Vic


-----Original Message-----
From: vic [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, August 17, 2002 8:30 PM
To: [EMAIL PROTECTED]; 'Jason Soza'; 'PHP-General'
Subject: RE: [PHP] preg_match help?

Ok, since I've been trying to get this working forever, how wold you get
something like this working I need, to get everything between these 2
tags:

<div class=Section1> and </div>

Someone gave me this code:

preg_match('!<div class=Section1[^>]+>(.*)</div>!Uis',$str,$regs);

with the ! in front, and !Uis at the end, what does that mean? 

And when i try it with your script:

preg_match('/.*<div class=Section1[^>]+>(.*)</div>.*/',$str,$regs);
$good = $regs[1];
echo $good;


I get:

Warning: Unknown modifier 'd' in
/home/victor/argilent-www/sites/malibu_place_2/main.php on line 197

197 is the preg_match code line.

- Vic


-----Original Message-----
From: Bas Jobsen [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, August 17, 2002 6:49 PM
To: Jason Soza; PHP-General
Subject: Re: [PHP] preg_match help?

preg_match("/.*<b[^>]+>(.*)<font face=\"Verdana\" size=\"3\">.*/", 
$contents,$story);
echo $story[1];

preg_match always return a array. The first element ($array[0])contains
your 
complete regexp. The next ($array[1])one the first match between () etc.
Don't use ! but /




Op zondag 18 augustus 2002 01:27, schreef Jason Soza:
> I seriously need some help trying to make a match here. Obligatory
> disclaimer: yes, I've searched google.com, I've read the PHP manual
section
> on preg_match(), and I've sat here for 3 hours trying to resolve this
on my
> own. :) Any help would be great:
>
> I need to match everything between:
>
> <b>$headline
>
> Where $headline is a variable that will be filled out of a foreach()
loop.
> The pattern should return everything until it hits:
>
> <font face="Verdana" size="3">
>
> The text file this is taken out of looks like:
>
> <font face="Verdana" size="3"><b>Headline here</b></font><p>
>
> News story, blah, blah, blah...
>
> <font face="Verdana" size="3"><b>Another headline</b></font><p>
>
> More news, blah, blah...
>
> ...
>
> The contents of the text file echo correctly before the preg_match,
but the
> preg_match I've tried:
>
> preg_match("!<b[^>]+>(.*)<font face=\"Verdana\" size=\"3\">!",
$contents,
> $story);
>
> Returns array(), so no matches are made. Any suggestions?
>
> TIA,
>
> Jason Soza

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

______________________________________________________________________ 
Post your ad for free now! http://personals.yahoo.ca

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

______________________________________________________________________ 
Post your ad for free now! http://personals.yahoo.ca
--- End Message ---
--- Begin Message ---
On Sunday 18 August 2002 08:29, vic wrote:
> Ok, since I've been trying to get this working forever, how wold you get
> something like this working I need, to get everything between these 2
> tags:
>
> <div class=Section1> and </div>
>
> Someone gave me this code:
>
> preg_match('!<div class=Section1[^>]+>(.*)</div>!Uis',$str,$regs);
>
> with the ! in front, and !Uis at the end, what does that mean?

It's good that someone else does the work for, but it's also good to read the 
documentation as well. All these regexes has what is called a delimiter, 
everything that is enclosed within the delimiter is the expression. In most 
cases the '/' is used as the delimiter. But if you're trying to match '/' in 
your expression (as in your case you're looking for </div>) then it makes 
sense to use a different delimiter, one that ideally is not used in your 
expression. Thus the above use of '!'. The 'Uis' are modifiers and modify 
matching behaviour (rtfm).


> And when i try it with your script:
>
> preg_match('/.*<div class=Section1[^>]+>(.*)</div>.*/',$str,$regs);
> $good = $regs[1];
> echo $good;
>
>
> I get:
>
> Warning: Unknown modifier 'd' in
> /home/victor/argilent-www/sites/malibu_place_2/main.php on line 197

Hopefully from the above explanation you can see that:

  /.*<div class=Section1[^>]+>(.*)</div>.*/'

here you're using '/' as the delimiter. Thus everything between the first 2 
'/' is the expression, ie:

  .*<div class=Section1[^>]+>(.*)<

Whatever is after the 2nd '/' is treated as a modifier, and hence your 
warning, unknown modifier.


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
What the scientists have in their briefcases is terrifying.
                -- Nikita Khruschev
*/

--- End Message ---
--- Begin Message ---
I have a MySQL table named "users" in which there is a column named
"email_address" and another named "is_subscribed".  I would like to send an
email to all of the addresses for which "is_subscribed" is true.  I think I
know how to send the email, i.e.,

mail($to, $subject, $message, $headers);

I tested this out and it works fine when, for instance, $to =
"[EMAIL PROTECTED], [EMAIL PROTECTED]" or some such collection of
addresses.

My problem is how do you create the variable, $to, from the MySQL table so
that it contains all of the addresses separated by commas.

Thanks for your help,

Roger Lewis

--- End Message ---
--- Begin Message ---
$to = '';
while ($blah = mysql_fetch_row($ref)) {
  $to =+ $blah['address'];
};

Be careful however.  Most SMTP servers has a limit on the number of
recipients you can send one email to.  It's a very easy way to trigger spam
alerts and stuff.

--
me


----- Original Message -----
From: "Roger Lewis" <[EMAIL PROTECTED]>
To: "Php-General" <[EMAIL PROTECTED]>
Sent: Sunday, August 18, 2002 5:10 AM
Subject: [PHP] How Can I Generate an Email List from a MySQL Table


> I have a MySQL table named "users" in which there is a column named
> "email_address" and another named "is_subscribed".  I would like to send
an
> email to all of the addresses for which "is_subscribed" is true.  I think
I
> know how to send the email, i.e.,
>
> mail($to, $subject, $message, $headers);
>
> I tested this out and it works fine when, for instance, $to =
> "[EMAIL PROTECTED], [EMAIL PROTECTED]" or some such collection of
> addresses.
>
> My problem is how do you create the variable, $to, from the MySQL table so
> that it contains all of the addresses separated by commas.
>
> Thanks for your help,
>
> Roger Lewis
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Thanks for the quick responses from Chris, Daren, and Kevin.  I didn't know
so many would be up Sat night.
This looks like it might do the trick since I only have 20 to 30 recipients
and I have a dedicated server.  I'll check it out and let you know.
Thanks again,
Roger

-----Original Message-----
From: Chris Knipe [mailto:[EMAIL PROTECTED]]
Sent: Saturday, August 17, 2002 8:37 PM
To: Roger Lewis; Php-General
Subject: Re: [PHP] How Can I Generate an Email List from a MySQL Table

$to = '';
while ($blah = mysql_fetch_row($ref)) {
  $to =+ $blah['address'];
};

Be careful however.  Most SMTP servers has a limit on the number of
recipients you can send one email to.  It's a very easy way to trigger spam
alerts and stuff.

--
me


----- Original Message -----
From: "Roger Lewis" <[EMAIL PROTECTED]>
To: "Php-General" <[EMAIL PROTECTED]>
Sent: Sunday, August 18, 2002 5:10 AM
Subject: [PHP] How Can I Generate an Email List from a MySQL Table


> I have a MySQL table named "users" in which there is a column named
> "email_address" and another named "is_subscribed".  I would like to send
an
> email to all of the addresses for which "is_subscribed" is true.  I think
I
> know how to send the email, i.e.,
>
> mail($to, $subject, $message, $headers);
>
> I tested this out and it works fine when, for instance, $to =
> "[EMAIL PROTECTED], [EMAIL PROTECTED]" or some such collection of
> addresses.
>
> My problem is how do you create the variable, $to, from the MySQL table so
> that it contains all of the addresses separated by commas.
>
> Thanks for your help,
>
> Roger Lewis
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
on 18/08/02 2:20 PM, Roger Lewis ([EMAIL PROTECTED]) wrote:

> Thanks for the quick responses from Chris, Daren, and Kevin.  I didn't know
> so many would be up Sat night.

It's not Saturday night everywhere :)

Justin French

--- End Message ---
--- Begin Message ---
Hello,

On 08/18/2002 12:10 AM, Roger Lewis wrote:
> I have a MySQL table named "users" in which there is a column named
> "email_address" and another named "is_subscribed".  I would like to send an
> email to all of the addresses for which "is_subscribed" is true.  I think I
> know how to send the email, i.e.,
> 
> mail($to, $subject, $message, $headers);
> 
> I tested this out and it works fine when, for instance, $to =
> "[EMAIL PROTECTED], [EMAIL PROTECTED]" or some such collection of
> addresses.
> 
> My problem is how do you create the variable, $to, from the MySQL table so
> that it contains all of the addresses separated by commas.

Your best solution is to put all recipients in separate Bcc: headers 
(one per line) and send just one message.


-- 

Regards,
Manuel Lemos

--- End Message ---
--- Begin Message ---
I have been able to get yesterdays date 
eg. $yesterday = date('d')-1;  result is "17"
but am having trouble getting yesterdays day of the week.
eg. $yesterday = date('D')-1;  result is "-1"
eg. $yesterday = date('l')-1;  result is "-1"

Is there something I am missing?  I cannot find the documentation on this.

--- End Message ---
--- Begin Message ---
On Sunday 18 August 2002 09:38, Kenton Letkeman wrote:
> I have been able to get yesterdays date
> eg. $yesterday = date('d')-1;  result is "17"
> but am having trouble getting yesterdays day of the week.
> eg. $yesterday = date('D')-1;  result is "-1"
> eg. $yesterday = date('l')-1;  result is "-1"
>
> Is there something I am missing? 

You're trying to subtract 1 from a string.

> I cannot find the documentation on this.

I'm flabbergasted -- where did you look?

The proper way of doing this (ie getting yesterday's day of week and not 
subtracting 1 from a string) is to look at the examples in manual.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Who loves not wisely but too well
Will look on Helen's face in hell,
But he whose love is thin and wise
Will view John Knox in Paradise.
                -- Dorothy Parker
*/

--- End Message ---
--- Begin Message ---
Get the current timestamp and subtract a day's worth of seconds.

date('D', time() - 24 * 60 * 60);

Justin

"Kenton Letkeman" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have been able to get yesterdays date
> eg. $yesterday = date('d')-1;  result is "17"
> but am having trouble getting yesterdays day of the week.
> eg. $yesterday = date('D')-1;  result is "-1"
> eg. $yesterday = date('l')-1;  result is "-1"
>
> Is there something I am missing?  I cannot find the documentation on this.
>


--- End Message ---
--- Begin Message ---
There is a magic little function called strtotime()... it takes just about
any english phrase, and acts on it... there are examples in the manual:

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

In this case, I'm guessing you'd want

$yesterday = strtotime('yesterday');


Another approach would be to get the current time stamp (or any time stamp),
and minus 24 hours from it:

60 seconds * 60 minutes * 24 hours = 86400 seconds.

$yesterday = time() - 86400;


Either way, you've got a timestamp (seconds since some date in 1970)
representing yesterday, which you can feed into date():

echo date('l',$yesterday);
echo date('d',$yesterday);
echo date('D',$yesterday);

etc etc


Justin French


on 18/08/02 11:38 AM, Kenton Letkeman ([EMAIL PROTECTED]) wrote:

> I have been able to get yesterdays date
> eg. $yesterday = date('d')-1;  result is "17"
> but am having trouble getting yesterdays day of the week.
> eg. $yesterday = date('D')-1;  result is "-1"
> eg. $yesterday = date('l')-1;  result is "-1"
> 
> Is there something I am missing?  I cannot find the documentation on this.
> 

--- End Message ---
--- Begin Message ---
anyone that can find the problem..?
description below.

<html>
<head>
<title>debug</title>
</head>
<body>
'***************************************' OUTPUT
'**************************************'<br><br>
<?php

class Relic {

  var $RelicName = Array();
  var $RelicType = Array();
  var $RelicRealm = Array();
  var $RelicOwner = Array();
  var $i;

 function PrintInfo() {
   for ($this->i = 0; $this->i < count($this->RelicName); $this->i++) {
   print "$this->RelicName[$this->i]  :  $this->RelicType[$this->i]  :
$this->RelicRealm[$this->i]  :  $this->RelicOwner[$this->i]<br>";
   }
 }

 function SetName($name) {
     $this->RelicName[] = $name;
 }

 function SetType($type) {
   $this->RelicType[] = $type;
 }

 function SetRealm($realm) {
   $this->RelicRealm[] = $realm;
 }

 function SetRelicOwner($owner) {
   $this->RelicOwner[] = $owner;
 }

}

$temp = new Relic();
$temp->SetName("olle");
$temp->SetType("melee");
$temp->SetRealm("Hibernia");
$temp->SetRelicOwner("Albion");
$temp->SetName("bertil");
$temp->SetType("melee");
$temp->SetRealm("Albion");
$temp->SetRelicOwner("Hibernia");
$temp->SetName("sture");
$temp->SetType("magic");
$temp->SetRealm("Midgard");
$temp->SetRelicOwner("Midgard");
$temp->PrintInfo();
?>

</body>
</html>

the function PrintInfo prints out this:
'***************************************' OUTPUT
'**************************************'

Array[0] : Array[0] : Array[0] : Array[0]
Array[1] : Array[1] : Array[1] : Array[1]
Array[2] : Array[2] : Array[2] : Array[2]

heh,, not exacly what i wanted  :/

regards
patrick



--- End Message ---
--- Begin Message ---
On Sunday 18 August 2002 12:25, Pafo wrote:
> anyone that can find the problem..?
> description below.



>  function PrintInfo() {
>    for ($this->i = 0; $this->i < count($this->RelicName); $this->i++) {
>    print "$this->RelicName[$this->i]  :  $this->RelicType[$this->i]  :
> $this->RelicRealm[$this->i]  :  $this->RelicOwner[$this->i]<br>";
>    }
>  }

Not sure why you're defining your counter as $this->i. I would just use $i. 
Your problem is that inside double quotes the expression:

  $this->RelicName[$this->i]

is ambiguous. In this case what the interpreter has done is to print 
$this->RelicName, which is an array, so your output contains 'Array'. It then 
prints a literal bracket '[', then the value of $this-i, then another literal 
bracket ']', and thus that is what you see.

To remove the ambiguity to need to state exactly what you mean and enclose 
your expression in {} :

print "{$this->RelicName[$this->i]} ..."


> the function PrintInfo prints out this:
> '***************************************' OUTPUT
> '**************************************'
>
> Array[0] : Array[0] : Array[0] : Array[0]
> Array[1] : Array[1] : Array[1] : Array[1]
> Array[2] : Array[2] : Array[2] : Array[2]
>
> heh,, not exacly what i wanted  :/


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Argue for your limitations, and sure enough, they're yours.
                -- Messiah's Handbook : Reminders for the Advanced Soul
*/

--- End Message ---
--- Begin Message ---
> anyone that can find the problem..?
> description below.
> 
> <html>
> <head>
> <title>debug</title>
> </head>
> <body>
> '***************************************' OUTPUT 
> '**************************************'<br><br>
> <?php
> 
> class Relic {
> 
>   var $RelicName = Array();
>   var $RelicType = Array();
>   var $RelicRealm = Array();
>   var $RelicOwner = Array();
>   var $i;
> 
>  function PrintInfo() {
>    for ($this->i = 0; $this->i < count($this->RelicName); 

genereal question:
would be
for($i = 0; $ii < count($this->RelicName)
faster ?


> $this->i++) {
>    print "$this->RelicName[$this->i]  :  
> $this->RelicType[$this->i]  : $this->RelicRealm[$this->i]  :  
> $this->RelicOwner[$this->i]<br>";
>    }
>  }

echo  $this->RelicName[$this->i]." : ".$this->RelicType[$this->i]." :
".$this->RelicRealm[$this-      i].":"$this-RelicOwner[$this->i]."<br>";

echo and print functions obviously
don't get along with class variable 
in quotes.

greetings 
robert

> 
>  function SetName($name) {
>      $this->RelicName[] = $name;
>  }
> 
>  function SetType($type) {
>    $this->RelicType[] = $type;
>  }
> 
>  function SetRealm($realm) {
>    $this->RelicRealm[] = $realm;
>  }
> 
>  function SetRelicOwner($owner) {
>    $this->RelicOwner[] = $owner;
>  }
> 
> }
> 
> $temp = new Relic();
> $temp->SetName("olle");
> $temp->SetType("melee");
> $temp->SetRealm("Hibernia");
> $temp->SetRelicOwner("Albion");
> $temp->SetName("bertil");
> $temp->SetType("melee");
> $temp->SetRealm("Albion");
> $temp->SetRelicOwner("Hibernia");
> $temp->SetName("sture");
> $temp->SetType("magic");
> $temp->SetRealm("Midgard");
> $temp->SetRelicOwner("Midgard");
> $temp->PrintInfo();
> ?>
> 
> </body>
> </html>
> 
> the function PrintInfo prints out this: 
> '***************************************' OUTPUT 
> '**************************************'
> 
> Array[0] : Array[0] : Array[0] : Array[0]
> Array[1] : Array[1] : Array[1] : Array[1]
> Array[2] : Array[2] : Array[2] : Array[2]
> 
> heh,, not exacly what i wanted  :/
> 
> regards
> patrick
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---
--- Begin Message ---
Hi all. I know there must be several ways of doing this but I wonder
what the best solution is. I'm tired of making and looking at scripts
that creates random passwords for users from a "words.txt" list. These
kind of passwords are limited only to the number of strange words your
fingers type into a file, for which I think it's not the most secure way
of giving away new passwords. I know there are other types of password
generating scripts, but I want to know from the users of this list which
would be the best one.

I think that pre-made passwords (choose randomly) are dangerous, because
most users DO NOT change their given password once received and hackers
CAN access that words.txt file no matter what level of protection you
use for that server/folder.

Isn't there a function or something that would generate random passwords
following given rules like:

- from x to y characters long.
- lower AND/OR upper case.
- numbers AND characters combination.
- random numbers AND characters.

Which are the functions (or combination of functions) I can use to
achieve this? Thanks in advance,

Cesar Aracena
On Dial-Up
CE / MCSE+I
Neuquen, Argentina
+54.299.6356688
+54.299.4466621



--- End Message ---
--- Begin Message ---
Hello,

On 08/18/2002 01:51 AM, Csar aracena wrote:
> Hi all. I know there must be several ways of doing this but I wonder
> what the best solution is. I'm tired of making and looking at scripts
> that creates random passwords for users from a "words.txt" list. These
> kind of passwords are limited only to the number of strange words your
> fingers type into a file, for which I think it's not the most secure way
> of giving away new passwords. I know there are other types of password
> generating scripts, but I want to know from the users of this list which
> would be the best one.
> 
> I think that pre-made passwords (choose randomly) are dangerous, because
> most users DO NOT change their given password once received and hackers
> CAN access that words.txt file no matter what level of protection you
> use for that server/folder.
> 
> Isn't there a function or something that would generate random passwords
> following given rules like:
> 
> - from x to y characters long.
> - lower AND/OR upper case.
> - numbers AND characters combination.
> - random numbers AND characters.
> 
> Which are the functions (or combination of functions) I can use to
> achieve this? Thanks in advance,

You may want to try some ready to use components for that same purpose 
like these:

http://www.phpclasses.org/passwordgenerator

http://www.phpclasses.org/securepwd



-- 

Regards,
Manuel Lemos

--- End Message ---
--- Begin Message ---
These may help....
http://scripts.operationenigma.net/

note:
passgen.php
passgen.phps


Leave the rest alone  ;-)



----- Original Message -----
From: "Csar Aracena" <[EMAIL PROTECTED]>
To: "PHP General List" <[EMAIL PROTECTED]>
Sent: Sunday, August 18, 2002 2:51 PM
Subject: [PHP] Random Passwords Generator


> Hi all. I know there must be several ways of doing this but I wonder
> what the best solution is. I'm tired of making and looking at scripts
> that creates random passwords for users from a "words.txt" list. These
> kind of passwords are limited only to the number of strange words your
> fingers type into a file, for which I think it's not the most secure way
> of giving away new passwords. I know there are other types of password
> generating scripts, but I want to know from the users of this list which
> would be the best one.
>
> I think that pre-made passwords (choose randomly) are dangerous, because
> most users DO NOT change their given password once received and hackers
> CAN access that words.txt file no matter what level of protection you
> use for that server/folder.
>
> Isn't there a function or something that would generate random passwords
> following given rules like:
>
> - from x to y characters long.
> - lower AND/OR upper case.
> - numbers AND characters combination.
> - random numbers AND characters.
>
> Which are the functions (or combination of functions) I can use to
> achieve this? Thanks in advance,
>
> Cesar Aracena
> On Dial-Up
> CE / MCSE+I
> Neuquen, Argentina
> +54.299.6356688
> +54.299.4466621
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>



--- End Message ---
--- Begin Message ---
On Sunday 18 August 2002 05:53, eriol wrote:

> It works fine on .php files but I was hoping I could include .inc files as
> well when someone wanted to view the source of them.. To include .inc files
> as viewable php source code, I'd rewrite it similar to below I assume, but
> I'm not understanding the syntax I'm missing..
>
>
>     if (ereg("(\.inc | .php)$",$o0o) && !ereg("\/\.\.", $o0o)){
>       ...
>     }
>
>
> I know I have to use a pipe to seperate allowable file types, but that's
> the extent of what I know.. Any help would be appreciated.. TIA..

A period (.) has a special meaning in that it matches any character. To match 
a literal period you have to escape it with a backslash:

  if (ereg("(\.inc | \.php)$",$o0o) && !ereg("\/\.\.", $o0o)) {

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
vacation, n.:
        A two-week binge of rest and relaxation so intense that
        it takes another 50 weeks of your restrained workaday
        life-style to recuperate.
*/

--- End Message ---
--- Begin Message ---
Hi Jason,

I have found out the mistake I did,
the /usr/bin/sendmail that my MTA(XMAIL in this case)
 uses was not 'chmod +s' ed.

Ans that is the reason when I ran the script in shell ( being logged in as
root)
it worked fine, and not thru apache.

/chandu


----- Original Message -----
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, August 17, 2002 11:49 PM
Subject: Re: [PHP] PHP - mail() function problem


> On Saturday 17 August 2002 21:08, N. Pari Purna Chand wrote:
> > Hi guys,
> >
> > I am facing a strange problem,
> > php's mail() function is not working when a php page is executed thru
> > apache,
> > but the same page which has mail() function is working fine and is
sending
> > mails
> > when php is used as a scripting language in shell.
>
> Is this on the same machine? If so, check that both the apache-php and the
> cgi-php are using the same php.ini (and hence same sendmail settings).
>
> > Any guess what might be causing the problem ?
>
> Try comparing php.ini.
>
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
> /*
> Heard that the next Space Shuttle is supposed to carry several Guernsey
cows?
> It's gonna be the herd shot 'round the world.
> */
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Hi Jason,

I have found out the mistake I did,
the /usr/bin/sendmail that my MTA(XMAIL in this case)
 uses was not 'chmod +s' ed.

Ans that is the reason when I ran the script in shell ( being logged in as
root)
it worked fine, and not thru apache.

/chandu


----- Original Message -----
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, August 17, 2002 11:49 PM
Subject: Re: [PHP] PHP - mail() function problem


> On Saturday 17 August 2002 21:08, N. Pari Purna Chand wrote:
> > Hi guys,
> >
> > I am facing a strange problem,
> > php's mail() function is not working when a php page is executed thru
> > apache,
> > but the same page which has mail() function is working fine and is
sending
> > mails
> > when php is used as a scripting language in shell.
>
> Is this on the same machine? If so, check that both the apache-php and the
> cgi-php are using the same php.ini (and hence same sendmail settings).
>
> > Any guess what might be causing the problem ?
>
> Try comparing php.ini.
>
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
> /*
> Heard that the next Space Shuttle is supposed to carry several Guernsey
cows?
> It's gonna be the herd shot 'round the world.
> */
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Has anyone built, or partially built an interface to ICQ?

I'm not necessarily looking for full IM thru a web/PHP interface, but maybe
some small stuff, like finding out if a certain user is online?

I did a google and found this on Zend.com, but can't get it working (it
returns "unknown" everytime, with any number):

<? 
function get_status($uin)
    { 
    /*************************************
    * Copyright  2000 Scriptmakers.com *
    * Feel free to edit, modify and*
    * redistribute as long as this*
    * message is kept intact.*
    *************************************/
    
    $fp = fsockopen("wwp.icq.com", 80, &$errno, &$errstr, 30);
    if(!$fp)
        { 
        
        echo "$errstr($errno)<br>\n";
        }
    else
        { 
        fputs($fp,"GET/scripts/online.dll?icq=$uin&img=5HTTP/1.0\n\n");
        $do='no'; 
        while(!feof($fp))
            { 
            $line=fgets($fp,128);
            $do=($do=='yes')?'yes':(eregi("^GIF89",$line))?'yes':'no';;
            if($do=='yes')
                { 
                if(ereg("7@ 40",$line))
                    {
                    return 'online';
                    }
                elseif(ereg("w` 40",$line))
                    {
                    return 'offline';
                    }
                elseif(ereg("S3IѱJ",$line))
                    {
                    return 'disabled';
                    }
                } 
            } 
        fclose($fp);
        } 
    return 'unknown';
    } 

/* -------- usage ----------
include('icq_status.php');
$uin=51362125; 
echoget_status($uin);
----------------------------*/
?> 


... and this, which spits out an error:
"Warning: file("http://wwp.icq.com/scripts/online.dll?icq=&img=1";) -
Undefined error: 0 in /usr/local/apache/htdocs/hinge/viewmember.php on line
13"

<? 

$uin= "51362125"; 
function ICQ_Status($uin)
{ 
 $arr = file("http://wwp.icq.com/scripts/online.dll?icq=$uin&img=1";);
 $len = strlen($arr[1]);
 if ($len == "") return "ICQ: <span style=\"color:#707070\">Local
Server</span>"; 
 if ($len == 96) return "ICQ: <span style=\"color:#009000\">Online</span>";
 if ($len == 83) return "ICQ: <span style=\"color:#b00000\">Offline</span>";
 if ($len == 1) return "ICQ: <span style=\"color:#000080\">Disabled</span>";
} 
echo ICQ_Status($uin);

?>


My guess is that these both DID work at one point, but if ICQ keeps changing
their methods, then the scripts become redundant.


Any links / guidance would be great!


Justin French

--- End Message ---
--- Begin Message ---
Sometimes the easiest solutions are the best!!

<img src="http://web.icq.com/whitepages/online?icq=51362125&img=21";>

Courtesy of the ICQ site :)


Justin French






on 18/08/02 5:06 PM, Justin French ([EMAIL PROTECTED]) wrote:

> Has anyone built, or partially built an interface to ICQ?
> 
> I'm not necessarily looking for full IM thru a web/PHP interface, but maybe
> some small stuff, like finding out if a certain user is online?
> 
> I did a google and found this on Zend.com, but can't get it working (it
> returns "unknown" everytime, with any number):
> 
> <? 
> function get_status($uin)
> { 
> /*************************************
> * Copyright  2000 Scriptmakers.com *
> * Feel free to edit, modify and*
> * redistribute as long as this*
> * message is kept intact.*
> *************************************/
> 
> $fp = fsockopen("wwp.icq.com", 80, &$errno, &$errstr, 30);
> if(!$fp)
> { 
> 
> echo "$errstr($errno)<br>\n";
> }
> else
> { 
> fputs($fp,"GET/scripts/online.dll?icq=$uin&img=5HTTP/1.0\n\n");
> $do='no'; 
> while(!feof($fp))
> { 
> $line=fgets($fp,128);
> $do=($do=='yes')?'yes':(eregi("^GIF89",$line))?'yes':'no';;
> if($do=='yes')
> { 
> if(ereg("7@ 40",$line))
> {
> return 'online';
> }
> elseif(ereg("w` 40",$line))
> {
> return 'offline';
> }
> elseif(ereg("S3IѱJ",$line))
> {
> return 'disabled';
> }
> } 
> } 
> fclose($fp);
> } 
> return 'unknown';
> } 
> 
> /* -------- usage ----------
> include('icq_status.php');
> $uin=51362125; 
> echoget_status($uin);
> ----------------------------*/
> ?> 
> 
> 
> ... and this, which spits out an error:
> "Warning: file("http://wwp.icq.com/scripts/online.dll?icq=&img=1";) -
> Undefined error: 0 in /usr/local/apache/htdocs/hinge/viewmember.php on line
> 13"
> 
> <? 
> 
> $uin= "51362125";
> function ICQ_Status($uin)
> { 
> $arr = file("http://wwp.icq.com/scripts/online.dll?icq=$uin&img=1";);
> $len = strlen($arr[1]);
> if ($len == "") return "ICQ: <span style=\"color:#707070\">Local
> Server</span>"; 
> if ($len == 96) return "ICQ: <span style=\"color:#009000\">Online</span>";
> if ($len == 83) return "ICQ: <span style=\"color:#b00000\">Offline</span>";
> if ($len == 1) return "ICQ: <span style=\"color:#000080\">Disabled</span>";
> } 
> echo ICQ_Status($uin);
> 
> ?>
> 
> 
> My guess is that these both DID work at one point, but if ICQ keeps changing
> their methods, then the scripts become redundant.
> 
> 
> Any links / guidance would be great!
> 
> 
> Justin French
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---
--- Begin Message ---
Hey php-general,

  whats the easyest way to send variables to pop-up?

  i got button like this:
  <input type=BUTTON value=Preview onClick=\"topWindow()\"

  its not in the <form> its just standing hare.. do i add to post or
  how is the easy way to do it.. it just pops up window and i need
  to pass variables to that pop up whish takes variables from the form
  before that button. its preview.php that pops out.

-- 
Best regards,
 Mantas                          

Contacts:
[EMAIL PROTECTED]
Http://www.mntkz.tk

--- End Message ---
--- Begin Message ---
You need to modify topWindow() so that you can pass a query string to it,
which you can then use to add to the URL of the pop-up window.

<SCRIPT>
<!--
function userpop(user_id)
    {
    var prefix = "show_user.php?userid=";
    var script = eval("prefix + user_id");
    window.open(script, "view_user",
"toolbar=no,location=no,directories=no,status=yes,menubar=yes,scrollbars=yes
,resizable=no,width=250,height=250");
    }
// -->
</SCRIPT>

<input type=BUTTON value=Preview onClick="userpop('justin');">

This would pop-up a window with the dimensions listed, and I pass a userid
to it, which gets appended to the URL of the new window, passing a userid
variable into the target script via GET.

I *think* all <input>'s need to be in a form tag regardless... a better way
to test your script would be to take the input/form out of the equation, get
your javascript right with a simple <A HREF> tag:

<A HREF="#" onClick="userpop('justin');">

And since this is a JavaScript thing, not a PHP thing, you might want to
address the issue(s) in comp.lang.javascript


Justin French





on 18/08/02 7:14 PM, Mantas Kriauciunas ([EMAIL PROTECTED]) wrote:

> Hey php-general,
> 
> whats the easyest way to send variables to pop-up?
> 
> i got button like this:
> <input type=BUTTON value=Preview onClick=\"topWindow()\"
> 
> its not in the <form> its just standing hare.. do i add to post or
> how is the easy way to do it.. it just pops up window and i need
> to pass variables to that pop up whish takes variables from the form
> before that button. its preview.php that pops out.

--- End Message ---
--- Begin Message ---
Hello Justin,

i don't think that this thing will pass 300 simbols successfuly
i take $nw_text from <TEXTAREA> and i need to pass it to pop-up (other
window) there it will generate preview of that text with some stuff...
but i need to pass also 2 more ...so total is 3 things...one text and
other ones is just like date and username




Sunday, August 18, 2002, 12:22:11 AM, you wrote:

JF> You need to modify topWindow() so that you can pass a query string to it,
JF> which you can then use to add to the URL of the pop-up window.

JF> <SCRIPT>
JF> <!--
JF> function userpop(user_id)
JF>     {
JF>     var prefix = "show_user.php?userid=";
JF>     var script = eval("prefix + user_id");
JF>     window.open(script, "view_user",
JF> "toolbar=no,location=no,directories=no,status=yes,menubar=yes,scrollbars=yes
JF> ,resizable=no,width=250,height=250");
JF>     }
// -->>
JF> </SCRIPT>

JF> <input type=BUTTON value=Preview onClick="userpop('justin');">

JF> This would pop-up a window with the dimensions listed, and I pass a userid
JF> to it, which gets appended to the URL of the new window, passing a userid
JF> variable into the target script via GET.

JF> I *think* all <input>'s need to be in a form tag regardless... a better way
JF> to test your script would be to take the input/form out of the equation, get
JF> your javascript right with a simple <A HREF> tag:

JF> <A HREF="#" onClick="userpop('justin');">

JF> And since this is a JavaScript thing, not a PHP thing, you might want to
JF> address the issue(s) in comp.lang.javascript


JF> Justin French



-- 
Best regards,
 Mantas                            mailto:[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
I just wrote something exactly like this today:

function news_window (headline_str)
{

var headline_link = "/story.asp?headline=" + escape(headline_str);

window.open(headline_link,'','scrollbars=yes,resizable=yes');
}

Now, if I needed to pass along more variables, I'd just add them to the
news_window () arguments, i.e. if I needed to pass along a text field and a
user id, I'd go:

function news_window (headline_str,text,user_id)

Try it, then let us know how it goes. Don't use the <input> tags - once you
make a function like the one above, call it with <a
href="javascript:news_window(your_argument_here)"></a>. Also, try not to say
things like "I don't think it will work" if you haven't given it a shot yet.
I knew -nothing- of JavaScript before I needed to use the window.open()
function today, but now I know enough about it to make some useful scripts.
Try going to google.com and searching for 'javascript reference' - you will
likely find the results handy.

HTH
Jason Soza

-----Original Message-----
From: Mantas Kriauciunas [mailto:[EMAIL PROTECTED]]
Sent: Sunday, August 18, 2002 1:44 AM
To: Justin French
Cc: [EMAIL PROTECTED]
Subject: Re[2]: [PHP] pop-up


Hello Justin,

i don't think that this thing will pass 300 simbols successfuly
i take $nw_text from <TEXTAREA> and i need to pass it to pop-up (other
window) there it will generate preview of that text with some stuff...
but i need to pass also 2 more ...so total is 3 things...one text and
other ones is just like date and username





--- End Message ---
--- Begin Message ---
Well, you're going to have limitations with passing things around in a URL.

You need to post your JS function to comp.lang.javascript, and ask them how
to modify the script so that it POSTs the form data to the new pop-up
window.

Justin French




on 18/08/02 7:44 PM, Mantas Kriauciunas ([EMAIL PROTECTED]) wrote:

> Hello Justin,
> 
> i don't think that this thing will pass 300 simbols successfuly
> i take $nw_text from <TEXTAREA> and i need to pass it to pop-up (other
> window) there it will generate preview of that text with some stuff...
> but i need to pass also 2 more ...so total is 3 things...one text and
> other ones is just like date and username
> 
> 
> 
> 
> Sunday, August 18, 2002, 12:22:11 AM, you wrote:
> 
> JF> You need to modify topWindow() so that you can pass a query string to it,
> JF> which you can then use to add to the URL of the pop-up window.
> 
> JF> <SCRIPT>
> JF> <!--
> JF> function userpop(user_id)
> JF>     {
> JF>     var prefix = "show_user.php?userid=";
> JF>     var script = eval("prefix + user_id");
> JF>     window.open(script, "view_user",
> JF> 
> "toolbar=no,location=no,directories=no,status=yes,menubar=yes,scrollbars=yes
> JF> ,resizable=no,width=250,height=250");
> JF>     }
> // -->>
> JF> </SCRIPT>
> 
> JF> <input type=BUTTON value=Preview onClick="userpop('justin');">
> 
> JF> This would pop-up a window with the dimensions listed, and I pass a userid
> JF> to it, which gets appended to the URL of the new window, passing a userid
> JF> variable into the target script via GET.
> 
> JF> I *think* all <input>'s need to be in a form tag regardless... a better
> way
> JF> to test your script would be to take the input/form out of the equation,
> get
> JF> your javascript right with a simple <A HREF> tag:
> 
> JF> <A HREF="#" onClick="userpop('justin');">
> 
> JF> And since this is a JavaScript thing, not a PHP thing, you might want to
> JF> address the issue(s) in comp.lang.javascript
> 
> 
> JF> Justin French
> 
> 

--- End Message ---
--- Begin Message ---
> I just had a massive open house party...
>
> Is it possible to write a PHP script to collect all the bottles and
> cans, mop the floor, fumigate the carpet and make me lunch?

  PHP is all. You need.

--
Julio Nobrega
Pode acessar:
http://www.inerciasensorial.com.br


"Liam Mackenzie" <[EMAIL PROTECTED]> escreveu na mensagem
001f01c24644$71cf59d0$0b00a8c0@enigma">news:001f01c24644$71cf59d0$0b00a8c0@enigma...
> I just had a massive open house party...
>
> Is it possible to write a PHP script to collect all the bottles and
> cans, mop the floor, fumigate the carpet and make me lunch?
>
>
>


--- End Message ---
--- Begin Message ---
Hello everyone,

I am a new PHP user, from Belgium. I am trying to manage a MySQL database with PHP, 
and I kindly request your help to solve a little (probably very stupid) problem I have 
been dealing with for a while already ...

I have a MySQL database (called "sessions") with a auto-increment INT field called 
"sessionID". I try to check if there is already a record in this database with a given 
sessionID, which is called $sessionID in PHP. I use this query, which must be wrong 
(but I cannot find out why !!!) :

   SELECT * FROM sessions WHERE sessionID = $sessionID

Even though there is already a record with the right sessionID, my program does not 
find it (I always get 0 when using mysql_num_rows() after the query). Though, if I 
replace "$sessionID" by, for example 4, then that works and it says there is already a 
record with that ID.

I guess the problem comes from comparing two different kinds of variables, but I can't 
fix it ... Could anyone please help ? By advance, thank you !!!

Best regards from Belgium,


                    Jean-marc


 
--- End Message ---
--- Begin Message ---
On Sunday 18 August 2002 17:45, Jean-Marc Godart wrote:

> I have a MySQL database (called "sessions") with a auto-increment INT field
> called "sessionID". I try to check if there is already a record in this
> database with a given sessionID, which is called $sessionID in PHP. I use
> this query, which must be wrong (but I cannot find out why !!!) :
>
>    SELECT * FROM sessions WHERE sessionID = $sessionID
>
> Even though there is already a record with the right sessionID, my program
> does not find it (I always get 0 when using mysql_num_rows() after the
> query). Though, if I replace "$sessionID" by, for example 4, then that
> works and it says there is already a record with that ID.
>
> I guess the problem comes from comparing two different kinds of variables,
> but I can't fix it ... Could anyone please help ? By advance, thank you !!!

Have you tried printing out $sessionID to see whether it contains what you 
think it contains?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Under capitalism, man exploits man.  Under communism, it's just the opposite.
                -- J.K. Galbraith
*/

--- End Message ---
--- Begin Message ---
Thanks for your suggestion ... Yes, I tried to print $sessionID (using
echo()) and I get the right value (the one I am looking for) ... Though the
query does not work. Any other idea ??? Thanks again !

    Jean-Marc

----- Original Message -----
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 18, 2002 11:53 AM
Subject: Re: [PHP] Help needed about queries with MySQL, thanks.


> On Sunday 18 August 2002 17:45, Jean-Marc Godart wrote:
>
> > I have a MySQL database (called "sessions") with a auto-increment INT
field
> > called "sessionID". I try to check if there is already a record in this
> > database with a given sessionID, which is called $sessionID in PHP. I
use
> > this query, which must be wrong (but I cannot find out why !!!) :
> >
> >    SELECT * FROM sessions WHERE sessionID = $sessionID
> >
> > Even though there is already a record with the right sessionID, my
program
> > does not find it (I always get 0 when using mysql_num_rows() after the
> > query). Though, if I replace "$sessionID" by, for example 4, then that
> > works and it says there is already a record with that ID.
> >
> > I guess the problem comes from comparing two different kinds of
variables,
> > but I can't fix it ... Could anyone please help ? By advance, thank you
!!!
>
> Have you tried printing out $sessionID to see whether it contains what you
> think it contains?
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
> /*
> Under capitalism, man exploits man.  Under communism, it's just the
opposite.
> -- J.K. Galbraith
> */
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>


--- End Message ---
--- Begin Message ---
On Sunday 18 August 2002 17:59, Jean-Marc Godart wrote:
> Thanks for your suggestion ... Yes, I tried to print $sessionID (using
> echo()) and I get the right value (the one I am looking for) ... Though the
> query does not work. Any other idea ??? Thanks again !

Please post your code so we can have a look.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Awright, which one of you hid my PENIS ENVY?
*/

--- End Message ---
--- Begin Message ---
Hello Guys

I has FreeBSD4.3
I need help how install PHP under Apache2.0.35
when i compile PHP with apxs module support Apache say's

Cannot load /usr/libexec/modules/libphp4.so into
server: /usr/libexec/modules/libphp4.so: Undefined symbol "pthread_getspecific"

I'm the begginer in Unix.
Please if you can answer me how i can install apache with detailed
descriptions i will be very happy :)

-- 
Best regards,
 Konstantin                          mailto:[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
Hi,

I have following filename/date array 
Array ( [0] => Array ( [0] => 1.jpg [1] => 10.jpg [2] => 11.jpg [3] =>
12.jpg [4] => 2.jpg [5] => 3.jpg [6] => 4.jpg [7] => 5.jpg [8] =>
6.jpg [9] => 7.jpg [10] => 8.jpg [11] => 9.jpg ) [1] => Array ( [0] =>
1026502301 [1] => 1026502312 [2] => 1026502313 [3] => 1026502550 [4]
=> 1026502302 [5] => 1026502304 [6] => 1026502305 [7] => 1026502619
[8] => 1026502585 [9] => 1026502308 [10] => 1026502310 [11] =>
1026502311 ) )

I'm trying to sort the array by filename in Natural-Order.
Array_multisort(filelist[0]),SORT_ASC,$filelist[1]) 
don't sort in Natural-Order

usort($filelist[0],"strnatcmp");
Sorts only filenames, any ideas how to get dates also sorted?

-Hessu-
--- End Message ---

Reply via email to