<?php
while(true){
//code goes here.....
}
?>
I want to make a PHP web server, so how can I make this script run forever with Curl?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Don’t forget to set maximum execution time to infinite(0).
Better make sure you don’t run more than one instance, if that’s your intention:
If in CLI mode, just run the file.
If in another PHP on a webserver, you could start the one which must run infinetely like this (instead of using cURL, this eliminating a dependency):
Or you could start from linux cron using wget like this:
Or you could start from Windows Scheduler using bitsadmin running a .bat file which contains this: