FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » PHP script to only be accessed by cron
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: PHP script to only be accessed by cron [message #175273 is a reply to message #175265] Wed, 31 August 2011 08:20 Go to previous messageGo to previous message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma:
Senior Member
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

2/. Check the id of the parent process: compare that with running
processes . If it ain't cron abort the program.

3/. When you have it working, delete the source code.


> I wouldn't mind encoding the page, too, JUST in case I have a root
> breach (not expected, of course, but not impossible).


That's the second reason to write it in C.

Since I would
> only need to encode one page, once, would it be reasonable to use the
> free trial of Zend Guard? Or would you guys suggest something
> different?
>

Why not start with the right approach, instead of patching the wrong
approach?

I like PHP. But its not the only language in town and this is where I
would definitely get out the C compiler

> TIA,
>
> Jason
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: php help
Next Topic: Newbie: very basic jquery drag drop
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Oct 07 04:27:47 GMT 2024

Total time taken to generate the page: 0.04652 seconds