Jump to content

stopping a script being manually triggered


richardjh

Recommended Posts

Hello

I have a script which when triggered by a cron job will dump a list of articles to my site (dumping twice a week - Monday and Friday). I've noticed that this script has started to trigger at times other than the cron settings and I am surmising that either a robot or perhaps a real human has stumbled upon the script and triggered it at these times.

Is there a  way to tweak the script so that it will only trigger via a cron task and not if someone or something (robot) requests the page via the browser?

 

thanks for advice

R

I'll look into Thorpe's idea of having the script called using cli rather than http but that approach all looks rather daunting!

 

thanks for the advice

 

would eregi work? e.g. if the script is called directly then have the script die?

 

if (!eregi($PHP_SELF)) {
die ("No direct access!");
    }

 

Although this bit of code doesn't seem to work but you get the gist of what I'm trying to say.

I'll look into Thorpe's idea of having the script called using cli rather than http but that approach all looks rather daunting!

 

thanks for the advice

 

would eregi work? e.g. if the script is called directly then have the script die?

 

if (!eregi($PHP_SELF)) {
die ("No direct access!");
    }

 

Although this bit of code doesn't seem to work but you get the gist of what I'm trying to say.

 

So...moving a file from one folder to another is a daunting task?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.