 <p>The <code>.htaccess</code> method mentioned by Yada is valid. Another approach would be to do this in your PHP script itself. If it's a cronjob running through CLI:</p> <pre><code>if (!empty($_SERVER['REMOTE_ADDR'])) { // If a "remote" address is set, we know that this is not a CLI call header('HTTP/1.1 403 Forbidden'); die('Access denied. Go away, shoo!'); } </code></pre> <p>Or if it's triggered by a browser request from the other PHP script, just verify if the IP is yours/local:</p> <pre><code>if ($_SERVER['REMOTE_ADDR'] != '192.168.1.5') { // Or whatever your local IP is header('HTTP/1.1 403 Forbidden'); die('Get out and stay out!'); } </code></pre>