thegamer Posted January 17, 2009 Share Posted January 17, 2009 I have to send an email remainder at a particular time which written as a php script and is possible through crone definetly.But that particular script should be executed only once and its access through URL should be restricted .How? Link to comment https://forums.phpfreaks.com/topic/141190-how-to-restrict-access-to-crone-through-url/ Share on other sites More sharing options...
genericnumber1 Posted January 17, 2009 Share Posted January 17, 2009 The simplest way: Don't put it in your htdocs folder. Link to comment https://forums.phpfreaks.com/topic/141190-how-to-restrict-access-to-crone-through-url/#findComment-738968 Share on other sites More sharing options...
dawsba Posted January 17, 2009 Share Posted January 17, 2009 presuming u only have 1 server if($_SERVER[REMOTE_ADDR] != $_SERVER[sERVER_ADDR]) die(); Link to comment https://forums.phpfreaks.com/topic/141190-how-to-restrict-access-to-crone-through-url/#findComment-739078 Share on other sites More sharing options...
lokie538 Posted January 17, 2009 Share Posted January 17, 2009 Nice idea dawsba!! Link to comment https://forums.phpfreaks.com/topic/141190-how-to-restrict-access-to-crone-through-url/#findComment-739082 Share on other sites More sharing options...
genericnumber1 Posted January 17, 2009 Share Posted January 17, 2009 IP Addresses can be spoofed; I wouldn't trust that method. If you insist on keeping it in your htdocs directory, disallow access to its directory through .htaccess. Link to comment https://forums.phpfreaks.com/topic/141190-how-to-restrict-access-to-crone-through-url/#findComment-739258 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.