RE: [PHP-DB] running PHP from the cron
| From: | Simon R Jones | Date: | Mon, 19 Feb 2001 17:42:57 +0000 |
| Subject: | RE: [PHP-DB] running PHP from the cron | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-6748@lists.php.net to get a copy of this message | ||
> I run my PHP crons like this:
>
> 0 6 * * * /usr/local/bin/lynx -source
> "http://www.domain.com/file.php"
>
> This is not the most secure of course, as the file is below the root
> and could be hit by any user. But works for my particular case ...
>
> Anyone know of a method to make this more secure ... password
> protecting the directory it's in? chnaging the permissions of the
> file???
if that's how you do it what about putting a .htaccess file in the web
directory with the PHP script in it restricting access to only your
webserver, that way the script would run from the cron, but no-one else
could access the script.
si
-------------------------------------------
Studio 24 Ltd | tel. 01223 501 892
30 Hopkins Close | fax. 0870 063 1216
Cambridge | mob. 07974 074 547
CB4 1FD | www.studio24.net