Re: Can php do this?
| From: | Michael A. Peters | Date: | Sun, 25 Nov 2001 04:36:37 +0000 |
| Subject: | Re: Can php do this? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-75634@lists.php.net to get a copy of this message | ||
If you have built the php standalone binary then its easy-
#!/usr/local/bin/php
<?php
// your php code here
?>
What I do when I build php is build it twice. First I build it with all my
options EXCEPT for with-apxs=/blah
That builds the standalone binary, and I install that in /usr/local/bin
Then, I build the apache module and install that where my apache modules
go.
This allows me to use php as a regular unix scripting language, so I can
do stuff from the crontab.
btw- I'm actually doing a very similar thing-
I have some customer support software that pops my support e-mail address
and puts the message in a MySQL database.
I have a cron job that calls a php shell script that pops the e-mail for
me every 15 minutes.
That way I don't have to log on to the support application as often, and
the customers get an automated response fairly quickly, giving them a
unique case ID etc.
On Sat, 24 Nov 2001 22:04:21 EST
Joelmon2001@aol.com mentioned:
> Thanks for your time . *This* = create follow up autoresponders
> Or at least have php run with cron, so I can daily hit a mysql
> db and use php to email those people at a specified time, like
> every 3 days. Just so when I have users to the site who register
> and their name/email is in a table "users" in db "data",
> php/cron can be used to pull the name/email from mysql
> and (with unsubscribe message at bottom) email them when I
> say to do so in cron. Getting cron by itself to work is fine
> but with php script that connects to mysql and emails users?
> Can that be done?
>
> Sort of like cron doing what you would do if you visited
> page.php and once it's hit, it emails specified users in a database
> Would I need path to php in the cron script to do this?
> Or am I just living a dream?
>
> The idea of emailing users in a mysql db with php script
> every day is very appealing to me. (Yes, with unsubscribe feature)
> ;)
>
> Thanks, I hope to goodness this made sense and you
> enjoyed your holiday
>
> Joel
>
--
-=-=-=-=-=-=-=-=-=-=-=-=-
Michael A. Peters
http://24.5.29.77:10080/