executing PHP without loading web page

Hi there. I’ve been working on a PHP script that I would eventually like to have running 24/7 - it scans my twitter feed for new mentions and alerts me, plus gives me the ability to autoreply to mentions.

My question is this: Right now, in the testing phase, to run the script I go to www.myurl.com/mytestscript.php

Eventually I’d like to just have it running without having that URL be available. Ideally I’d have a separate page that would allow me to turn the script on and off or customize various elements.

How does one execute a PHP script without loading it as a URL.
Is it practical to have a PHP script running in an infinite loop (or as a chron job of sorts)
Is it possible to send a ‘break’ command of some kind of that script?


It sounds like you would want to run a cron job. Cron jobs can be set to run at time based intervals, so you could run this every 5/15 mins, whatever you find most appropriate.

This seemed like a decent place to get some info on PHP and cron

Thank you, I spent the day working on learning cron jobs and now have that part of my code working flawlessly! Really appreciate the help.

Great! Happy to help you learn something new and useful :slight_smile:

Sponsor our Newsletter | Privacy Policy | Terms of Service