Re: PHP script to only be accessed by cron [message #175289 is a reply to message #175273] |
Wed, 31 August 2011 18:37 |
Luuk
Messages: 329 Registered: September 2010
Karma:
|
Senior Member |
|
|
On 31-08-2011 10:20, The Natural Philosopher wrote:
> jwcarlton wrote:
>> I'm writing a PHP script that I want to ONLY be accessed by a
>> predefined cron. Can you guys suggest a way to prevent non-cron
>> accesses?
>>
>
> 1/. Write it in a proper language for this purpose, C, not php
The purpose of this script is not give, at least not by the OP.
Can you tell here why PHP would not be the 'proper language'?
PHP can be used form the comman line quit well, see:
http://www.php.net/manual/en/features.commandline.interactive.php
for some examples
There's NO need to learn how to program in C, if one can do this task in PHP
--
Luuk
|
|
|