php-general Digest 19 Aug 2002 13:41:26 -0000 Issue 1534

Topics (messages 113169 through 113199):

Resetting the timeout
        113169 by: Mike Mannakee
        113170 by: Jason Wong
        113171 by: Martin Towell

Re: mail/variable help needed..
        113172 by: Jason Wong

Re: How Can I Generate an Email List from a MySQL Table
        113173 by: Roger Lewis

max_execute_time does not work on infinitely loop
        113174 by: NoWhErEMan

Re: html parser
        113175 by: Justin French

php string match problem
        113176 by: Pafo
        113177 by: Martin Towell
        113178 by: Martin Towell
        113179 by: Martin Towell
        113180 by: Brad Bulger

PHP License Agreement
        113181 by: daniel cozzolino
        113184 by: Rasmus Lerdorf

Re: ICQ interface?
        113182 by: lallous

Re: sorting multiple-dimensional arrays
        113183 by: Vehbi Sinan Tunalioglu

mail and attachments
        113185 by: Pafo
        113186 by: Vehbi Sinan Tunalioglu
        113187 by: . Edwin
        113191 by: Manuel Lemos

Apache 2.0.40 and php as module
        113188 by: George E. Papadakis

Apache 2.0 and PHP
        113189 by: John Wards
        113193 by: Aaron Gould

Inquiry on sql query class.
        113190 by: Henrik Johansson

upload video
        113192 by: Jamie Ingram

Passing a PHP variable to javascript
        113194 by: Michael
        113195 by: John Wards
        113196 by: Scott Houseman
        113197 by: Justin French
        113199 by: Chris Schoeman

Re: Problem about rpm package of php
        113198 by: Adam Williams

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 ---
Is there any way to set the timeout (max length of time the script has to
execute) from within a script, just for its own execution?

Mike


--- End Message ---
--- Begin Message ---
On Monday 19 August 2002 10:06, Mike Mannakee wrote:
> Is there any way to set the timeout (max length of time the script has to
> execute) from within a script, just for its own execution?

ini_set()

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

/*
Sometimes love ain't nothing but a misunderstanding between two fools.
*/

--- End Message ---
--- Begin Message ---
set_time_limit()

-----Original Message-----
From: Jason Wong [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 12:05 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Resetting the timeout


On Monday 19 August 2002 10:06, Mike Mannakee wrote:
> Is there any way to set the timeout (max length of time the script has to
> execute) from within a script, just for its own execution?

ini_set()

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

/*
Sometimes love ain't nothing but a misunderstanding between two fools.
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
On Monday 19 August 2002 07:23, eriol wrote:

> I understand that PHP will retain the file in a temporary directory (/tmp/)
> until it is stored to the path I've specified (/uploaded/), but I don't
> understand how to get it to print the new file name within the email it
> sends to me.. Currently, it only prints the temporary file name as shown
> above..

That's because at the point that you're assigning $body that is what $file 
contains ...

> As you can see, to the last $body variable, I've added both $info & $file
> as a test, but $info returns null and $file returns the temp path/name
> only.. However, within the returned php/html page, the $file variable
> actually does echo the actual file name the user chose to upload..

..., move it to after you have redefined $file and $info.

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

/*
They're only trying to make me LOOK paranoid!
*/

--- End Message ---
--- Begin Message ---
On Sat, 17 Aug 2002 20:10:02 -0700
"Roger Lewis" <[EMAIL PROTECTED]> wrote:

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


Daren Cotter [mailto:[EMAIL PROTECTED]] responded
Saturday, August 17, 2002 8:42 PM

> // Query database
> $result = mysql_query("SELECT email_address FROM users
> WHERE is_subscribed = 'Y'", $link);
> while ($row = mysql_fetch_array($result)) {
>   mail($row["email_address"], $SUBJECT, $BODY,
> $HEADER);
> }
> mysql_free_result($result);

Darren,
Thanks a lot.  This works fine.  Please have a virtual beer on me! :)

To Chris Knipe [mailto:[EMAIL PROTECTED]] who responded

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


        I tried this, but I got an index error.  It doesn't understand 'address'
and I couldn't figure out what was going on.

To Kevin Waterson who responded
> simply create your array and use implode.
> There is an example of comma seperated lists in the manual
> http://www.php.net/manual/en/function.implode.php

I like this method because it seems more elegant than above, but I don't
seem to be able to create the array properly.
I tried the following  as well as many other combinations, but couldn't get
anything to work:
$sql = "SELECT email_address FROM users WHERE is_subscribed = 1";
$result = mysql_query($sql);
$to = implode(",", mysql_fetch_array($result));

Thanks again everyone for your help

        Roger Lewis


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


__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

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

I have set the max_execute_time in php.ini to 300 (5 mins).
And i found that if my script have a infinitely loop( caused by careless
programming),
the script still executing even 5 mins is passed and uses up all my cpu
resourse.
Even i "stop" and close the browser, the script seen still running on the
background.
(I found the apache.exe is used up 99% of cpu resourse in window task
manager)
What i can do is restart the apache server.

I use the following script to test the situation.
<?php
while (1<10){
 $i=1;}
?>

So is there any way to stop execution of php script?
Since i have make a server for my friend to test his php script,
sometime if his script have such a bad looping, the apache would hanged.

I dont want to restart the server everytime since i;m not sitting in front
my pc anytime.

Thanks in advance
Nowhereman from HK


--- End Message ---
--- Begin Message ---
Roman,

Please direct your question to the list, no to me personally.  When I have
time on the list, I answer what I can... if I start answering questions off
list:

a) others don't benefit
b) others can't join in
c) I consider it a billable, personalised service to you


Parsing HTML is pretty complex stuff, and I haven't finished anything yet.
For me, I wanted to get all <A ...> tags, then get all the elements out of
it, change some, and glue it all back together, AND insert it back into the
HTML page in the right spot.  Not easy!  However it does help if you know
exactly what you want, and can limit the requirements.


HTML is a bitch to parse.  There are tonnes options for attributes of a
link, like:

href=http://foo.com
href="http://foo.com";
href='http://foo.com'
href = "http://foo.com";
href = 'http://foo.com'

Then there's the different methods... http, ftp, mailto, javascript, etc
etc.  Then there's the fact that you may only want to search for links
within your  own domain, or only those outside your domain, and will you
want to keep query strings, port numbers, etc etc intact?


In your case, you might only want an array with a list of all the http://
URLs found in the page... eg:

$urls[1] => 'http://www.indent.com.au/home.php';
$urls[2] => 'http://www.indent.com.au/about.php';
$urls[3] => 'http://google.com';

OR, you might also want the
mailto:
ftp://
file:///
javascript:
...and whatever else in there as well.

OR you might want the whole hyperlink '<A' through to '>'.


It's not up to us to *guess* what you want to achieve.  It's up to you to
CLEARLY SPECIFY the requirements.

1. what is your source?
   a string?
   a HTML file on disk?
   a http:// URL on the web?

2. what specifically do you want to search for?
   
3. what do you want to do with the matches?


You need to be a LOT more specific.


Justin French


on 19/08/02 5:49 AM, Roman Belonohy´ ([EMAIL PROTECTED]) wrote:

> Hi man,
> 
> I'd need to do a script which return all hyperlinks found on some webpage.
> 
> You wrote about the similar script you're writing.
> 
> Could you show me it or advice some approach ?
> 
> thank you,
> 
> Roman
> 

--- End Message ---
--- Begin Message ---
heh,, is it just me or can anyone see whats wrong with this code...

$query = "SELECT * FROM logininfo WHERE loginname = '$LOGINNAME'";
if ($result = mysql_query($query)){
while ($row = mysql_fetch_row($result)){
$temp = $row[8];
$temp2 = $LOGINNAME;
if ($temp == $temp2) {  <--------------  this dosent work
$ierror = "Loginnamnet är redan upptaget!<br>" . $ierror; }
}
} else { print "error"; }
mysql_close($db);

i have tried:
if ($row[8] == $LOGINNAME) {

dosent work either, and when i write:

while ($row = mysql_fetch_row($result)){
print $row[8] . "-" . $LOGINNAME;

it shows the exact same information

anyone got any idea?

patrick


--- End Message ---
--- Begin Message ---
You've got too many closing braces...

if ($temp == $temp2) {
$ierror = "Loginnamnet är redan upptaget!<br>" . $ierror; }   <--- Here's
one
}                                                             <--- Here's
the other
} else { print "error"; }                                     <--- And a
third one

You only need one of them...
HTH
Martin

-----Original Message-----
From: Pafo [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 3:21 PM
To: [EMAIL PROTECTED]
Subject: [PHP] php string match problem


heh,, is it just me or can anyone see whats wrong with this code...

$query = "SELECT * FROM logininfo WHERE loginname = '$LOGINNAME'";
if ($result = mysql_query($query)){
while ($row = mysql_fetch_row($result)){
$temp = $row[8];
$temp2 = $LOGINNAME;
if ($temp == $temp2) {  <--------------  this dosent work
$ierror = "Loginnamnet är redan upptaget!<br>" . $ierror; }
}
} else { print "error"; }
mysql_close($db);

i have tried:
if ($row[8] == $LOGINNAME) {

dosent work either, and when i write:

while ($row = mysql_fetch_row($result)){
print $row[8] . "-" . $LOGINNAME;

it shows the exact same information

anyone got any idea?

patrick



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
oh, just realised, one of them needs to go below the "else" line, to end the
"while" loop

-----Original Message-----
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 3:37 PM
To: 'Pafo'; [EMAIL PROTECTED]
Subject: RE: [PHP] php string match problem


You've got too many closing braces...

if ($temp == $temp2) {
$ierror = "Loginnamnet är redan upptaget!<br>" . $ierror; }   <--- Here's
one
}                                                             <--- Here's
the other
} else { print "error"; }                                     <--- And a
third one

You only need one of them...
HTH
Martin

-----Original Message-----
From: Pafo [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 3:21 PM
To: [EMAIL PROTECTED]
Subject: [PHP] php string match problem


heh,, is it just me or can anyone see whats wrong with this code...

$query = "SELECT * FROM logininfo WHERE loginname = '$LOGINNAME'";
if ($result = mysql_query($query)){
while ($row = mysql_fetch_row($result)){
$temp = $row[8];
$temp2 = $LOGINNAME;
if ($temp == $temp2) {  <--------------  this dosent work
$ierror = "Loginnamnet är redan upptaget!<br>" . $ierror; }
}
} else { print "error"; }
mysql_close($db);

i have tried:
if ($row[8] == $LOGINNAME) {

dosent work either, and when i write:

while ($row = mysql_fetch_row($result)){
print $row[8] . "-" . $LOGINNAME;

it shows the exact same information

anyone got any idea?

patrick



-- 
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
--- End Message ---
--- Begin Message ---
oops again, please ignore my last two posts :(

-----Original Message-----
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 3:38 PM
To: 'Pafo'; [EMAIL PROTECTED]
Subject: RE: [PHP] php string match problem


oh, just realised, one of them needs to go below the "else" line, to end the
"while" loop

-----Original Message-----
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 3:37 PM
To: 'Pafo'; [EMAIL PROTECTED]
Subject: RE: [PHP] php string match problem


You've got too many closing braces...

if ($temp == $temp2) {
$ierror = "Loginnamnet är redan upptaget!<br>" . $ierror; }   <--- Here's
one
}                                                             <--- Here's
the other
} else { print "error"; }                                     <--- And a
third one

You only need one of them...
HTH
Martin

-----Original Message-----
From: Pafo [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 3:21 PM
To: [EMAIL PROTECTED]
Subject: [PHP] php string match problem


heh,, is it just me or can anyone see whats wrong with this code...

$query = "SELECT * FROM logininfo WHERE loginname = '$LOGINNAME'";
if ($result = mysql_query($query)){
while ($row = mysql_fetch_row($result)){
$temp = $row[8];
$temp2 = $LOGINNAME;
if ($temp == $temp2) {  <--------------  this dosent work
$ierror = "Loginnamnet är redan upptaget!<br>" . $ierror; }
}
} else { print "error"; }
mysql_close($db);

i have tried:
if ($row[8] == $LOGINNAME) {

dosent work either, and when i write:

while ($row = mysql_fetch_row($result)){
print $row[8] . "-" . $LOGINNAME;

it shows the exact same information

anyone got any idea?

patrick



-- 
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
--- End Message ---
--- Begin Message ---

have you tried printing them out with surrounding characters, like

echo 'row8=(',$row[8],') LOGINNAME=(',$LOGINNAME,')';

to see if there are leading or trailing spaces?

On Mon, 19 Aug 2002, Pafo wrote:

> heh,, is it just me or can anyone see whats wrong with this code...
>
> $query = "SELECT * FROM logininfo WHERE loginname = '$LOGINNAME'";
> if ($result = mysql_query($query)){
> while ($row = mysql_fetch_row($result)){
> $temp = $row[8];
> $temp2 = $LOGINNAME;
> if ($temp == $temp2) {  <--------------  this dosent work
> $ierror = "Loginnamnet är redan upptaget!<br>" . $ierror; }
> }
> } else { print "error"; }
> mysql_close($db);
>
> i have tried:
> if ($row[8] == $LOGINNAME) {
>
> dosent work either, and when i write:
>
> while ($row = mysql_fetch_row($result)){
> print $row[8] . "-" . $LOGINNAME;
>
> it shows the exact same information
>
> anyone got any idea?
>
> patrick
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

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

I have an issue with an application I have developed that has Macromedia
Director interfacing with MySql via PHP.  I am told by our legal
representation that under the PHP license agreement, the PHP html source
code must be available.  It was my understanding that only the compiler
source code need be made available.  Am i way off track or should I out
asking for PHP website source code?? ;-)

The product is for sale and uses php/mysql for administration.  I have a
software licence for Director and have just purchased the MySql license.

Is there anyone else who has experienced the same situation or could refer
me to an appropriate information source.

thanks
Daniel Cozzolino


--- End Message ---
--- Begin Message ---
Did your legal department read the PHP license at all?  There is nothing
in the PHP license that states this.

The clauses of the PHP license are, with my embedded comments in []'s:

  1. Redistributions of source code must retain the above copyright
     notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright
     notice, this list of conditions and the following disclaimer in
     the documentation and/or other materials provided with the
     distribution.

[So, so far your only requirement, if you are actually redistributing PHP
 itself, which it sounds like you are, is that somewhere you need to put
 the PHP copyright found in the LICENSE file.]

  3. The name "PHP" must not be used to endorse or promote products
     derived from this software without prior written permission. For
     written permission, please contact [EMAIL PROTECTED]

  4. Products derived from this software may not be called "PHP", nor
     may "PHP" appear in their name, without prior written permission
     from [EMAIL PROTECTED]  You may indicate that your software works in
     conjunction with PHP by saying "Foo for PHP" instead of calling
     it "PHP Foo" or "phpfoo"

[Don't call your product PHP 5.0 or Super PHP]

  5. The PHP Group may publish revised and/or new versions of the
     license from time to time. Each version will be given a
     distinguishing version number.
     Once covered code has been published under a particular version
     of the license, you may always continue to use it under the terms
     of that version. You may also choose to use such covered code
     under the terms of any subsequent version of the license
     published by the PHP Group. No one other than the PHP Group has
     the right to modify the terms applicable to covered code created
     under this License.

  6. Redistributions of any form whatsoever must retain the following
     acknowledgment:
     "This product includes PHP, freely available from
     <http://www.php.net/>".

[Finally say where you got PHP from so people can go fetch it themselves.
 The only other thing in the LICENSE file is the warranty disclaimer and
 some contact info.  So, no mention of html source code, compiler source
 code or anything similar.  Now, one of the other licenses of the various
 bits you are using, such as perhaps MySQL's may place further restrictions
 on you.]

-Rasmus

On Mon, 19 Aug 2002, daniel cozzolino wrote:

> Hello all,
>
> I have an issue with an application I have developed that has Macromedia
> Director interfacing with MySql via PHP.  I am told by our legal
> representation that under the PHP license agreement, the PHP html source
> code must be available.  It was my understanding that only the compiler
> source code need be made available.  Am i way off track or should I out
> asking for PHP website source code?? ;-)
>
> The product is for sale and uses php/mysql for administration.  I have a
> software licence for Director and have just purchased the MySql license.
>
> Is there anyone else who has experienced the same situation or could refer
> me to an appropriate information source.
>
> thanks
> Daniel Cozzolino
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
I feel like the request being sent is erroneous.

it was:
        fputs($fp,"GET/scripts/online.dll?icq=$uin&img=5HTTP/1.0\n\n");

It should be:
        fputs($fp,"GET /scripts/online.dll?icq=$uin&img=5 HTTP/1.0\n\n");


And beside that it seems it is an outdated URL


Elias

"Justin French" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
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 ---
Have you ever heard data structures and algorithms? :o)

I recommend you to learn how people sort things in arrays. If you learn 
to sort things in a single dimensional array you will be able to learn 
how to sort the multi-dimensional array. People who have developed PHP 
do nothing more than this.

Try to start with buble-sort algorithm.
Search in google and you'll find lots of web sites which teach sort 
algorithms in C, which is very similar to PHP syntax, you know...

Sometimes, it is better to find custom solutions...
:o)

Have a nice day...

Vehbi Sinan Tunalioglu

Evan Nemerson wrote:

>I have an array that looks like
>
>$array = Array(
>       Array($var1, $var2, $var3),
>       Array($var1, $var2, $var3),
>       Array($var1, $var2, $var3)
>);
>
>I want to sort the arrays within $array by $var3 (although if it helps i can 
>easily change that to $var1). $var1 and $var2 are strings, $var3 is a number 
>(in form of ([0-9]{3}\.[0-9]) )
>
>I know i could put something together that would make a new, 
>single-dimensional array that looks like Array(var3, var3, var3...), sort 
>that, then use that as a reference point, but that's a really sloppy 
>approach, and I'm thinking probably not the best way.
>
>I have a feeling someone is just going to reply with only 
>"php.net/somefunction" in the body of their message, and I'll feel stupid, 
>but oh well. I can't find anything in the man.
>
>Any input would be appreciated.
>
>
>-Evan
>


--- End Message ---
--- Begin Message ---
i got a script that the user signs up on and send a profile to the owners
email address
but i want to implement a file upland and that the uploaded file should be
submitted with the mail..

is this possible in php?
i know its possible in cg..

regards
patrick


--- End Message ---
--- Begin Message ---
If you mean that you want to add attachments to emails it is possible of 
course...
Try Phpmailer...
I recommend you to print out a copy of this script and its helper class 
SMTP so that you can read it and modify (it is not required, guys have 
done everything well enough) and reuse it. You can do more than attach 
things into the mail...

http://phpmailer.sourceforge.net/

Have a nice day...
Vehbi Sinan Tunalioglu

Pafo wrote:

>i got a script that the user signs up on and send a profile to the owners
>email address
>but i want to implement a file upland and that the uploaded file should be
>submitted with the mail..
>
>is this possible in php?
>i know its possible in cg..
>
>regards
>patrick
>
>
>


--- End Message ---
--- Begin Message ---
Also, somebody has already posted (2 weeks ago?) a similar or related 
question. I think, the answers given also apply to this question as well.

- E

>
>If you mean that you want to add attachments to emails it is 
>possible of course...
>Try Phpmailer...
>I recommend you to print out a copy of this script and its helper 
>class SMTP so that you can read it and modify (it is not required, 
>guys have done everything well enough) and reuse it. You can do more 
>than attach things into the mail...
>
>http://phpmailer.sourceforge.net/
>
>Have a nice day...
>Vehbi Sinan Tunalioglu
>
>Pafo wrote:
>
>>i got a script that the user signs up on and send a profile to the 
>>owners
>>email address
>>but i want to implement a file upland and that the uploaded file 
>>should be
>>submitted with the mail..
>>
>>is this possible in php?
>>i know its possible in cg..
>>
>>regards
>>patrick
>>
>>
>>
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>




_________________________________________________________________
$B%-%c%j%"%"%C%W$rL\;X$9$"$J$?$N%J%S%2!<%?!<(B MSN $B="?&!&E>?&(B 
http://career.msn.co.jp/
--- End Message ---
--- Begin Message ---
Hello,

On 08/19/2002 04:52 AM, Pafo wrote:
> i got a script that the user signs up on and send a profile to the owners
> email address
> but i want to implement a file upland and that the uploaded file should be
> submitted with the mail..
> 
> is this possible in php?
> i know its possible in cg..

You may want to try this class that lets you compose message with 
attachments and also lets you have HTML messages with embedded images 
and alternative text versions if you need it.

http://www.phpclasses.org/mimemessage

-- 

Regards,
Manuel Lemos

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

I am trying to install Apache 2.0.40 with the latest php build as  a module
(windows xp) yet it just wont work.
Though I tried all the tricks and possible scenarios no luck.
Does anyone have anyidea why I am getthing this frustrating "Cannot load
D:/Apache/php/sapi/php4apache2.dll into server: The specified procedure
could not be found." message?
Thanks in advance.

-- georgep

--- End Message ---
--- Begin Message ---
Guys and Girls got a question for you.........

Is Apache 2.0 any good and is there any advantages to installing it?

Does it work fine enough with PHP and MySQL?

Would I be able to install it along side 1.3 and run it on a separate port?

Cheers
John Wards
SportNetwork.net

--- End Message ---
--- Begin Message ---
Wait until PHP 4.3.0 before considering Apache 2.0.  Rasmus has indicated
they *may* play better together at that point.  Currently, PHP 4.2.x with
Apache 2 is experimental and should not be used in a production environment.

We use it on our development server without trouble, but that server is not
exposed to a lot of traffic and abuse.

--
Aaron Gould
[EMAIL PROTECTED]
Web Developer


----- Original Message -----
From: "John Wards" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 19, 2002 7:27 AM
Subject: [PHP] Apache 2.0 and PHP


> Guys and Girls got a question for you.........
>
> Is Apache 2.0 any good and is there any advantages to installing it?
>
> Does it work fine enough with PHP and MySQL?
>
> Would I be able to install it along side 1.3 and run it on a separate
port?
>
> Cheers
> John Wards
> SportNetwork.net
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
Hi.

I am constructing a somewhat generic class to contain all queries needed to
make a self sustaining base to
conform for a larger purpose.

Basically I am quite new to the concept of writing classes, which doesn´t
have much to do with this inquiry though.
One of the issues I ran into was how to handle possible multiple selections
from an sql query without putting
in a lot of if statements or switches to accomodate this. Instead I´ve taken
the approach of using the "explode/implode" array handler to overcome this. 
Consider a very simple query: "SELECT foo,bar FROM table ORDER BY foo asc;".
Suppose the "foo" and "bar" was assigned to the array "fields" in the HTML
form (the fields would of course be checked against the table and that
sufficient privileges existed for the logged in user, before trying to
perform the query.), would the "$selected_fields = implode(",",$fields);"
followed by "$sql_query = "SELECT $selected_fields FROM table ORDER BY foo
asc;";" be a proper way of handling this issue or am I in over my head?

Cheers,
Henrik J.

--- End Message ---
--- Begin Message ---

Any one come across this one:
I am trying to write the php code to upload a video file. The code works
fine for images, text etc, but video comes out twice the size and
unreadable.
Any ideas?

--
----------------------------------------------------------------------------
-----------------------------------------
Jamie Ingram


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

This may seem a newbie question...

I have a PHP variable containing the text of the alert I want to display
($text) and I want to have it displayed in a javascript alert box
(something like alert($text) ).
I couldn't find out how to sort this out...

Regards,
Michael


______________________________________________________________________________
Pour mieux recevoir vos emails, utilisez un PC plus performant !
Découvrez la nouvelle gamme DELL en exclusivité sur i (france)
http://www.ifrance.com/_reloc/signhdell

--- End Message ---
--- Begin Message ---
alert(<?echo $text?>)
----- Original Message -----
From: "Michael" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 19, 2002 1:54 PM
Subject: [PHP] Passing a PHP variable to javascript


> Hello everyone,
>
> This may seem a newbie question...
>
> I have a PHP variable containing the text of the alert I want to display
> ($text) and I want to have it displayed in a javascript alert box
> (something like alert($text) ).
> I couldn't find out how to sort this out...
>
> Regards,
> Michael
>
>
>
____________________________________________________________________________
__
> Pour mieux recevoir vos emails, utilisez un PC plus performant !
> Découvrez la nouvelle gamme DELL en exclusivité sur i (france)
> http://www.ifrance.com/_reloc/signhdell
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
Hi Michael.

Use:
<?php
$text = 'Hello, world!';
?>
<SCRIPT LANGUAGE="JavaScript">
alert( '<?= $text?>' );
</SCRIPT>

If this page is parsed by php i.e. its a .php file rather than .html or .js
file,
then the variable will be output as a string constant in the javascript
code.

Cheers!

Scott
----- Original Message -----
From: "Michael" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 19, 2002 2:54 PM
Subject: [PHP] Passing a PHP variable to javascript


> Hello everyone,
>
> This may seem a newbie question...
>
> I have a PHP variable containing the text of the alert I want to display
> ($text) and I want to have it displayed in a javascript alert box
> (something like alert($text) ).
> I couldn't find out how to sort this out...
>
> Regards,
> Michael
>
>
>
____________________________________________________________________________
__
> Pour mieux recevoir vos emails, utilisez un PC plus performant !
> Découvrez la nouvelle gamme DELL en exclusivité sur i (france)
> http://www.ifrance.com/_reloc/signhdell
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
The trick is that javascript has to be triggered somehow -- an onLoad,
onClick, onChange, onMouseOver, etc etc.

When/how do you want to trigger this?


Justin French




on 19/08/02 10:54 PM, Michael ([EMAIL PROTECTED]) wrote:

> Hello everyone,
> 
> This may seem a newbie question...
> 
> I have a PHP variable containing the text of the alert I want to display
> ($text) and I want to have it displayed in a javascript alert box
> (something like alert($text) ).
> I couldn't find out how to sort this out...
> 
> Regards,
> Michael
> 
> 
> ______________________________________________________________________________
> Pour mieux recevoir vos emails, utilisez un PC plus performant !
> Découvrez la nouvelle gamme DELL en exclusivité sur i (france)
> http://www.ifrance.com/_reloc/signhdell
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---
--- Begin Message ---
This is one way to do it        
        
        <?php
        echo "<SCRIPT LANGUAGE=\"JavaScript\">\n";
        echo "<!--\n";
        echo "alert(\"$text\")\n";
        echo "//-->\n";
        echo "</SCRIPT>\n";
        ?>

Chris

On Mon, 19 Aug 2002 12:54:57 GMT, [EMAIL PROTECTED] (Michael) wrote:

>Hello everyone,
>
>This may seem a newbie question...
>
>I have a PHP variable containing the text of the alert I want to display
>($text) and I want to have it displayed in a javascript alert box
>(something like alert($text) ).
>I couldn't find out how to sort this out...
>
>Regards,
>Michael
>
>
>______________________________________________________________________________
>Pour mieux recevoir vos emails, utilisez un PC plus performant !
>Découvrez la nouvelle gamme DELL en exclusivité sur i (france)
>http://www.ifrance.com/_reloc/signhdell

--- End Message ---
--- Begin Message ---
If I haven't responded too late, Install the SRPM package with rpm -ivh
file.srpm or file.src.rpm and then do to the SPECS directory.  In RedHat's
case it is /usr/src/redhat/SPECS and look for something like mod_php.spec
or php.spec and edit it.  That file has a paramaters it passes to
configure script, so add to it a --with-imap and then save the file, and
then run rpm -bb mod_php.spec (or whatever the name of it is) and then it
will build the binary rpm in /usr/src/redhat/RPMS/i386 and you simply rpm
-Uvh it.

                        Adam

On Sat, 17 Aug 2002 [EMAIL PROTECTED] wrote:

> Dear All,
>
> How can I enable --with-imap with rpm / SPRMS packages of php ?
>
> Thank for your help !
>
> Edward.
>
>
>
>
>
>

--- End Message ---

Reply via email to