[PHP] sending mail via SMTP server

2002-02-26 Thread Matthew Delmarter

I am using a script to send mail directly to the SMTP socket. It
seemed to work OK for the first 200 emails - then stops sending them.
Is there something I'm missing here?

As you may be able to tell I'm trying to come to grips with how
sockets/SMTP works. Is it like this...

1. I open the socket to the SMTP server
2. I fire the mail through - a few thousand emails
3. I close the socket

Do I have to close and reopen the socket every few hundred emails?

Regards,
Matthew Delmarter



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




[PHP] smtp server and socket connections

2002-02-18 Thread Matthew Delmarter

I just wanted to come to grips with how sockets/SMTP works. Is it like
this...

1. I open the socket to the SMTP server
2. I fire the mail through - a few thousand emails
3. I close the socket

Also, is step 3 necessary?

Regards,

Matthew Delmarter



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




[PHP] smtp server and socket connections

2002-02-18 Thread Matthew Delmarter

I just wanted to come to grips with how sockets/SMTP works. Is it like
this...

1. I open the socket to the SMTP server
2. I fire the mail through - a few thousand emails
3. I close the socket

Also, is step 3 necessary?

Regards,

Matthew Delmarter



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




[PHP] get process id of a script?

2002-01-28 Thread Matthew Delmarter

Is there any way to get the process id of a script running on Apache?

Regards,

Matthew Delmarter



-- 
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] set_time_limit() in a loop

2002-01-27 Thread Matthew Delmarter

Thanks for your reply Paul.

The script is getting subscriber details from a database and then
firing our personalised emails in HTML and text format. The while
statement loops through the query results and fires out the emails
using the mail() command.

It works well so far and indeed does finish the loop OK - but as
mentioned the script is still running 13 hours later. I don't get it.

Any ideas? Is it possible to kill a script via PHP code?

Matthew

PS Here is the script again

?
 ignore_user_abort(true);
 set_time_limit(1800);
 while:
personalise the message;
  mail();
set_time_limit(1800);
 endwhile;
?

-Original Message-
From: Paul Roberts [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 27, 2002 12:08 AM
To: Matthew Delmarter
Cc: PHP Mailing List
Subject: Re: [PHP] set_time_limit() in a loop


what are you doing a while on

if while never ends and you reset the time out each loop and use
ignore_user_abort(true), it will still be going 13 hours latter.

maybe if you send the full code so we can look at it.

Paul Roberts
[EMAIL PROTECTED]

- Original Message -
From: Matthew Delmarter [EMAIL PROTECTED]
To: Martin Towell [EMAIL PROTECTED]
Cc: PHP Mailing List [EMAIL PROTECTED]
Sent: Friday, January 25, 2002 12:55 AM
Subject: RE: [PHP] set_time_limit() in a loop


 I should also mention that the loop is sending mail using mail().

 Is it possible that this is the problem somehow?

 -Original Message-
 From: Martin Towell [mailto:[EMAIL PROTECTED]]
 Sent: Friday, January 25, 2002 1:16 PM
 To: 'Matthew Delmarter'; PHP Mailing List
 Subject: RE: [PHP] set_time_limit() in a loop

 your first thought was correct - it sets it to 1800, it's NOT
 accumulative.

 it would have something to do with  ignore_user_abort(true); and
also
 is your while loop's exit check working?

 Martin


 -Original Message-

 Just wondering about set_time_limit() in a loop.

 The current code looks something like this:

 ?
  ignore_user_abort(true);
  set_time_limit(1800);
  while:
 do stuff;
 set_time_limit(1800);
  endwhile;
 ?

 Does this reset the timeout to 1800 seconds every time it loops? Or
 does it accumulate so that the timeout has 1800 seconds added to it
 every time?

 The reason I ask is that my ISP informs me that the script is still
 running 13 hours later! Or is this related to the ignore_user_abort?

 Regards,
 Matthew Delmarter



 --
 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] set_time_limit() in a loop

2002-01-24 Thread Matthew Delmarter

Just wondering about set_time_limit() in a loop.

The current code looks something like this:

?
 ignore_user_abort(true);
 set_time_limit(1800);

 while:
do stuff;
set_time_limit(1800);
 endwhile;
?

Does this reset the timeout to 1800 seconds every time it loops? Or
does it accumulate so that the timeout has 1800 seconds added to it
every time?

The reason I ask is that my ISP informs me that the script is still
running 13 hours later! Or is this related to the ignore_user_abort?

Regards,

Matthew Delmarter



-- 
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] set_time_limit() in a loop

2002-01-24 Thread Matthew Delmarter

Thanks for your reply Martin.

Any ideas why ignore_user_abort would cause this problem?


-Original Message-
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 25, 2002 1:16 PM
To: 'Matthew Delmarter'; PHP Mailing List
Subject: RE: [PHP] set_time_limit() in a loop

your first thought was correct - it sets it to 1800, it's NOT
accumulative.

it would have something to do with  ignore_user_abort(true); and also
is your while loop's exit check working?

Martin


-Original Message-

Just wondering about set_time_limit() in a loop.

The current code looks something like this:

?
 ignore_user_abort(true);
 set_time_limit(1800);
 while:
do stuff;
set_time_limit(1800);
 endwhile;
?

Does this reset the timeout to 1800 seconds every time it loops? Or
does it accumulate so that the timeout has 1800 seconds added to it
every time?

The reason I ask is that my ISP informs me that the script is still
running 13 hours later! Or is this related to the ignore_user_abort?

Regards,
Matthew Delmarter



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




RE: [PHP] set_time_limit() in a loop

2002-01-24 Thread Matthew Delmarter

I should also mention that the loop is sending mail using mail().

Is it possible that this is the problem somehow?

-Original Message-
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 25, 2002 1:16 PM
To: 'Matthew Delmarter'; PHP Mailing List
Subject: RE: [PHP] set_time_limit() in a loop

your first thought was correct - it sets it to 1800, it's NOT
accumulative.

it would have something to do with  ignore_user_abort(true); and also
is your while loop's exit check working?

Martin


-Original Message-

Just wondering about set_time_limit() in a loop.

The current code looks something like this:

?
 ignore_user_abort(true);
 set_time_limit(1800);
 while:
do stuff;
set_time_limit(1800);
 endwhile;
?

Does this reset the timeout to 1800 seconds every time it loops? Or
does it accumulate so that the timeout has 1800 seconds added to it
every time?

The reason I ask is that my ISP informs me that the script is still
running 13 hours later! Or is this related to the ignore_user_abort?

Regards,
Matthew Delmarter



--
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] mail headers problem

2001-12-12 Thread Matthew Delmarter

I am using the HTML Email Class from Richard Heyes.

Using the sendmail command I want to change the headers on the email
so that the Return-Path is different from the To: data.

The script looks like this:

$mail-send(
$row-firstname,
$row-email,
$newsletter_name,
$newsletter_email,
$newsletter_subject,
'Return-Path: [EMAIL PROTECTED]'
)

It doesn't work! If I change 'Return-Path: [EMAIL PROTECTED]' to
'Reply-To: [EMAIL PROTECTED]' it does work.

Any ideas?


Regards,

Matthew Delmarter



-- 
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] sharing data stored in mysql with another site

2001-10-30 Thread Matthew Delmarter

I have developed a site using PHP and MySQL. 

My question:
How do I share the data stored in the database with another site?

Regards,

Matthew


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

2001-09-30 Thread Matthew Delmarter

How do I use ereg to check for MSIE 5.5 and above.

eg: eregi((MSIE.[56]),$HTTP_USER_AGENT)

This only gets version 5 and 6 ... but I want 5.5 and above. Any
ideas?

Regards,

Matthew Delmarter


-- 
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] display query results at random

2001-09-25 Thread Matthew Delmarter

How do I return a specific record from a db outside of the query?

Let's say I select * from table (using mysql_fetch_object) and get 5
results. I want to display the 5 results in different / random places
on the page.

Place 1 - show details for record 3
Place 2 - show details for record 1
Place 5 - show details for record 5

How do I do this?

I know how to loop thru a mysql result - but what if want to display
things in a random order around the page? I could have multiple select
statements - but this would increase the load on the server and is
unnecessary as all the data was returned from the query - it's just a
matter of knowing how to get it!

Can anyone help?

I am sorry if the question is confusing, but I can't think of a better
way to explain it at the moment (i'm tired)...

Matthew


-- 
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] display query results at random

2001-09-25 Thread Matthew Delmarter

Hi Lawrence,

Thanks for your reply.

I should clarify that I want to control where I output the result.

Place 1 - show details for record 3 //I specifically want record 3
details here
Place 2 - show details for record 1 //I specifically want record 1
details here
Place 5 - show details for record 5 //I specifically want record 5
details here

What I meant by 'random' was that it's not in the order returned by
the mysql query.

Matthew

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 26, 2001 3:56 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] display query results at random


Return into an array, then loop through the array or shuffle it
(easier)?.

Note if you have nulls in DB, you will have to do something different.

n'est pas?



e.g. (untested)

mysql_fetch_array

?php
mysql_connect ($host, $user, $password);
$result = mysql_db_query (database,select user_id, fullname from
table);
$j=0;
while ($row[$j] = mysql_fetch_array ($result)) {
$j++;
}
mysql_free_result ($result);

srand ((float)microtime()*100);
shuffle ($row);

//do output stuff with array

?

-Original Message-
From: Matthew Delmarter [mailto:[EMAIL PROTECTED]]
Sent: September 26, 2001 12:01 PM
To: PHP Mailing List
Subject: [PHP] display query results at random


How do I return a specific record from a db outside of the query?

Let's say I select * from table (using mysql_fetch_object) and get 5
results. I want to display the 5 results in different / random places
on the page.

Place 1 - show details for record 3
Place 2 - show details for record 1
Place 5 - show details for record 5

How do I do this?

I know how to loop thru a mysql result - but what if want to display
things in a random order around the page? I could have multiple select
statements - but this would increase the load on the server and is
unnecessary as all the data was returned from the query - it's just a
matter of knowing how to get it!

Can anyone help?

I am sorry if the question is confusing, but I can't think of a better
way to explain it at the moment (i'm tired)...

Matthew


--
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] send mail to mailing list using mail() or smtp?

2001-08-23 Thread Matthew Delmarter

I would appreciate some feedback. I am writing a script to fire off
emails in HTML or text format to everyone in a mailing list. It works
no problem - but I am concerned with how many emails it can deal with
over time.

The script has no timeout setting, I am not sure if it needs one. It
fires off 100 emails, pauses for 1 minute using sleep(60), and then
fires off another 100. It sends the mail using mail(). I did my first
send the other day to 930 addresses and it worked fine.

My question - is this going to work for a few thousand emails? What
about 100,000? Would it be better to send the mail directly to the
smtp server? Can you foresee any problems?

I look forward to your reply...

Regards,

Matthew Delmarter


-- 
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] stop a batch of mail during send

2001-08-13 Thread Matthew Delmarter

Let's say I am mailing 1000 members of a mailing list - is it possible
to stop the process once started? In particular I am looking for a
browser based solution...

Regards,

Matthew Delmarter


-- 
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] stop a batch of mail during send

2001-08-13 Thread Matthew Delmarter

Let's say I am mailing 1000 members of a mailing list - is it possible
to stop the process once started? In particular I am looking for a
browser based solution...

Regards,

Matthew Delmarter


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

2001-08-05 Thread Matthew Delmarter

Hi all,

I am curious about how to best define the size of fields in mysql. Is
there some size that are better used than others?

For example without thinking about it to much I would tend to size
fields in multiples of 10 - 20, 50, 100, 200 etc... Is this the best
answer?

Regards,

Matthew Delmarter
Web Developer

AdplusOnline.com Ltd
www.adplusonline.com

Phone: 06 8357684
Cell: 025 2303630


-- 
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] is there a performance hit using flush() ?

2001-08-05 Thread Matthew Delmarter

I am looping through a few thousand records and would like to display
the results every loop. Eg:

while($row = mysql_fetch_object($sql)):
echo Hi $row-namebr;
flush();
endwhile;

A simple example - but you see what I am trying to achieve. Perhaps a
more realistic example is displaying the results of a mail program as
it fires off mail to hundreds of members in a database.

Will this slow down the execution of the script at all - or much?

Regards,

Matthew Delmarter


-- 
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] using placeholders and db results

2001-08-05 Thread Matthew Delmarter

Here is an example of my code:

  $text = Hi ##firstname## ##lastname##,;
  $text = ereg_replace(##([^#]+)##, $row-.\\1, $text);

$row- is a result of using mysql_fetch_object. I would expect it to
replace ##firstname## and ##lastname## with the value of
$row-firstname and $row-lastname respectively... but nothing
happens. I presume it is a variable problem...

Can anyone help with this code?

Matthew


-- 
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] dynamic variable names?

2001-07-31 Thread Matthew Delmarter

Is it possible to dynamically assign a variable name?

For example:
variable name is $var_.name
or $var_.$name

Regards,

Matthew Delmarter

-- 
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] dynamic variable names?

2001-07-31 Thread Matthew Delmarter

I'll try again... my explanation of my exact problem was not too good
last time :P

I am working with the following code:

$text = ##firstname##;
$text = ereg_replace(##([^#]+)##, $row[\\1], $text);

$row[] is a result of using mysql_fetch_array. I would expect it to
replace ##firstname## with the value of $row[firstname]... but
nothing happens.

Matthew


-- 
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] storing array in mysql

2001-07-30 Thread Matthew Delmarter

Hi all,

I want to store the results of a multiple select input box in a mysql
db. The box looks like this:
select name='name[]' size='5' multiple
option value='id'name/option
/select

I cannot seem to store the array in a database and then output the
result using foreach. Any tips?

Regards,

Matthew Delmarter
Web Developer

AdplusOnline.com Ltd
www.adplusonline.com

Phone: 06 8357684
Cell: 025 2303630


-- 
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] storing array in mysql

2001-07-30 Thread Matthew Delmarter

Hi Ben,

This is a section of the insert statement I used ($lists_actual is the
array):

$lists_actual  = serialize($lists_actual);
Then : INSERT INTO $table (lists_actual) VALUES ('$lists_actual')

When I look in the db there is serialized data there - it appears like
this:
a:4:{i:0;s:1:1;i:1;s:1:2;i:2;s:1:3;i:3;s:1:

When I output this to the screen I get the same as above. But when I
try to echo the unserialized result I get nothing. I am using:
echo $db_result-lists_actual (nothing is returned)

If I try to display the result using foreach I get the warning
Invalid argument supplied for foreach(). I am using:
$array = unserialize($db_result-lists_actual);
foreach($array AS $val) {
echo $val;
};

I hope the problem is clear, I am thoroughly confused at this stage! I
should admit that I am only just getting used to arrays...

Matthew

-Original Message-
From: Ben Bleything [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 31, 2001 3:03 PM
To: 'Matthew Delmarter'
Subject: RE: [PHP] storing array in mysql


Have you tried serialize()'ing it before storing and then
unserialize()'ing it afterwards?

http://www.php.net/serialize
http://www.php.net/unserialize

=
Ben

-Original Message-
From: Matthew Delmarter [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 30, 2001 8:10 PM
To: PHP Mailing List
Subject: [PHP] storing array in mysql

Hi all,

I want to store the results of a multiple select input box in a mysql
db. The box looks like this:
select name='name[]' size='5' multiple
option value='id'name/option
/select

I cannot seem to store the array in a database and then output the
result using foreach. Any tips?

Regards,

Matthew Delmarter
Web Developer

AdplusOnline.com Ltd
www.adplusonline.com

Phone: 06 8357684
Cell: 025 2303630


--
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] search based on array

2001-07-30 Thread Matthew Delmarter

How do I search mysql based on an array?

For example suppose I had an array of array(1,2,3). And I want to
search like so:

SELECT * FROM table WHERE id=arrayvalues

Regards,

Matthew


-- 
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] search array for value

2001-07-30 Thread Matthew Delmarter

How do I search an array? 

For example if I want to know if $array contains 1...

Regards,

Matthew Delmarter

-- 
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] mailing in batches

2001-07-23 Thread Matthew Delmarter

I want to set up a script that sends a bunch of emails - pauses - and
resumes until all messages are sent.

The way this will happen is that a person will create the newsletter, check
it, and then press the Send button which will start the process of sending
the mail in bunches. How do I get a script to run in the background? I am
only familiar with processing script within an html page that is returned to
a client. Will a script like this keep running even if a browser window is
closed?

Also is there any examples of this kind of app?

Regards,

Matthew Delmarter
Web Developer

AdplusOnline.com Ltd
www.adplusonline.com

Phone: 06 8357684
Cell: 025 2303630


-- 
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] using image place holders in a database field?

2001-07-10 Thread Matthew Delmarter

Hi all,

I want to use image place holders in a mysql field. The field will store a
newsletter article and I want to include and display an image in the
article.

For example I will have:
the article text ##image_name## some more article text.

I will use str_replace to replace ##image_name## with the html tag to
display such as img src='/images/image_name'.

But - I don't know how to write the str_replace! Can anyone help?

Also, is there are better way to do this?? Can I have images displayed in
the middle of text from a field some other way?

I also cannot seem to find much on using place holders in a field - but I
can see it's advantages.

I hope this all makes sense...

Regards,

Matthew Delmarter


-- 
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] using image place holders in a database field?

2001-07-10 Thread Matthew Delmarter

Hi all,

I want to use image place holders in a mysql field. The field will store a
newsletter article and I want to include and display an image in the
article.

For example I will have:
the article text ##image_name## some more article text.

I will use str_replace to replace ##image_name## with the html tag to
display such as img src='/images/image_name'.

But - I don't know how to write the str_replace! Can anyone help?

Also, is there are better way to do this?? Can I have images displayed in
the middle of text from a field some other way?

I also cannot seem to find much on using place holders in a field - but I
can see it's advantages.

I hope this all makes sense...

Regards,

Matthew Delmarter


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




RE: [PHP] sending 5000+ emails - use PHP?

2001-07-02 Thread Matthew Delmarter

Is it possible to stop the mail delivery once the process has started - even
in the middle of a run?

-Original Message-
From: Michael Stearne [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 02, 2001 2:07 PM
To: Matthew Delmarter
Cc: PHP Mailing List
Subject: Re: [PHP] sending 5000+ emails - use PHP?


PHP can handle this (although you will definitely have to disable
script timeout) in one run. But a smarter thing to do would be to not
send all the 5000 emails at one time rather come up with a method
that runs the PHP script every 5 minutes (a cron job)  and send the
newsletter out in 200+ email batches.  This will reduce the load one
the web server and also the mail server.

Michael



On Sunday, July 1, 2001, at 09:13 PM, Matthew Delmarter wrote:

 I at looking at using PHP to send a monthly newsletter to 5000+
 users who
 have subscribed via our site. The newsletter will be in HTML format for
 those who have selected this option - otherwise plain text.

 Can PHP handle something like this?

 Regards,

 Matthew Delmarter


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



-- 
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] sending 5000+ emails - use PHP?

2001-07-01 Thread Matthew Delmarter

I at looking at using PHP to send a monthly newsletter to 5000+ users who
have subscribed via our site. The newsletter will be in HTML format for
those who have selected this option - otherwise plain text.

Can PHP handle something like this?

Regards,

Matthew Delmarter


-- 
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] PHAkt for Macromedia Ultradev

2001-07-01 Thread Matthew Delmarter

I have just found PHAkt for Macromedia UltraDev.
http://www.interakt.ro/products/PHAkt/

Has anyone out there used it?

I am interested in your opinion of the code it writes. Does it speed up
development? Is it easy to jump in and edit the code without breaking
something?

Any feedback appreciated...

Regards,

Matthew Delmarter


-- 
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] mnoGoSearch PHP udm_ functions

2001-06-20 Thread Matthew Delmarter

I am looking at using mnoGoSearch on one of my sites and compiling with
support for MySQL. Then I noticed that PHP has introduced some udm functions
for use with mnoGoSearch. Can someone explain to me why we need mnoGoSearch
Functions in PHP?

Also, can anyone explain what the categories option is is mnoGoSearch?

Regards,

Matthew Delmarter


-- 
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] get name of file

2001-03-19 Thread Matthew Delmarter

How do I return the name of a file without any extensions or path info.

Eg how do I return "about" from "http://www.domainz.com/about.htm".

Regards,

Matthew Delmarter

-- 
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] get current events from mysql query by date?

2001-03-05 Thread Matthew Delmarter

I have a mysql database of events. It contains the following fields:

- EventID
- EventName
- EventDescription
- EventStartDate
- EventEndDate

I would like to query the database for the next 5 events from the current
date (today). Any ideas?

Regards,

Matthew Delmarter
Web Developer


-- 
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] check all values in HTTP_GET_VARS

2001-02-18 Thread Matthew Delmarter

I want to check to see if all vars in HTTP_GET_VARS array are empty. How can
I do this?

The code would work like this:

if(all HTTP_GET_VARS empty):
do this;
else:
echo this;
endif;




Regards,

Matthew Delmarter


-- 
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] sessions javascript problem

2001-02-07 Thread Matthew Delmarter

I have an interesting problem with sessions (using enable-trans-sid).

I have created a page with the following javascript function on it:

function swapImgRestore() {
  var i,x,a=document.sr; for(i=0;aia.length(x=a[i])x.oSrc;i++)
x.src=x.oSrc;
}

However when I disable browser cookies the code is altered by
enable-trans-sid - notice the "" :

function swapImgRestore() {
  var i,x,a=document.sr; for(i=0;aia.length(x="a[i])x.oSrc;i++)"
x.src="x.oSrc;
"

Why does enable-trans-sid do this? It effectively stuffs up the javascript.
Anyone know a solution, other than rewriting the javascript :)

Regards,

Matthew Delmarter


-- 
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] sessions or db for shopping cart

2001-01-29 Thread Matthew Delmarter

I am about to build my own shopping cart but would like some feedback on the
following:

1. Using arrays stored in a PHP4 session vs. a database for storing cart
details.
2. What is the best method of passing session data if cookies disabled.

I hope you can help...

Matthew


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