Jump to content

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?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.