RE: [PHP] execute script via email?
| From: | jon roig | Date: | Tue, 06 Apr 2004 14:52:34 +0000 |
| Subject: | RE: [PHP] execute script via email? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-182479@lists.php.net to get a copy of this message | ||
Sure... You can write a small php script that uses PHP's imap or pop
functions to monitor any email address. (Check out
http://us3.php.net/manual/en/ref.imap.php
for details.) Once that's
written, just schedule it as a task using the windows scheduler or cron
in unix/linux.
-- jon
-------------------
jon roig
web developer
email: jon@trafficdesigns.com
phone: 888.230.7557
-----Original Message-----
From: BigMark [mailto:neretlis@westnet.com.au]
Sent: Tuesday, April 06, 2004 6:27 AM
To: php-general@lists.php.net
Subject: [PHP] execute script via email?
Is there a way for me to email this script so it executes the close of a
round instead of doing it from the website administration .
(it is a football tipping script)
<?php
include("connect.php");
// Grab variables and insert into database
$x=1;
$Round = $_POST['Round'];
switch ($Round) {
case "QF":
$y = 5;
break;
case "SF":
case "PF":
$y = 3;
break;
case "GF":
$y = 2;
break;
default:
$y = 9;
break;
}
While ($x < $y) {
$Game = $x;
$sql = mysql_query("UPDATE Rounds SET Closed = 'Yes' WHERE Round =
'$Round' AND Game = '$Game'"); $x++;
}
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.644 / Virus Database: 412 - Release Date: 3/26/2004
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.644 / Virus Database: 412 - Release Date: 3/26/2004