So you have a php script you wish to keep running forever
Create bash file - runsForever.sh
#!/bin/sh
ps aux | grep '[d]aemon.php'
if [ $? -ne 0 ]
then
php /home/acct/public_html/daemon.php
fi
Create a cron job for every minute
* * * * * /bin/sh runsForever.sh
or run it this way on CLI:
nohup /bin/sh runsForever.sh &
But when the system reboots, it is gone
PHP Introduction
First of all before we start the PHP we need to know what is PHP what you can use php to do.
Before you continue learning PHPis it advisably u have basic knowledge of :
What is PHP?
What is a PHP file?
Well a PHP file has file extension of ".php"
A PHP file can contain HTML, CSS , Javascript, and PHP code
PHP code are executed on the server, and the result is returned to the browser as plain HTML
What Can PHP Do?
There are other things PHP can do that is not written here, you could search what php can do Next is php installation stay tuned.
I am a native IOS developer, my journey into native IOS development was quite interesting.
I started with IOS 8 back then with XCODE. I initially started writing objective-c coding, but subsequently I learnt how to write SWIFT which is easier and more fun to write.
PROS
The development is fast and work is very smooth working with XCODE.
CONS
The pros of native development is that you cannot easily port your code to Android application unlike when writing IONIC code.
How To Start
Get a MAC laptop and download XCODE today
WHY LARAVEL?
Laravel is easily one of the best and easiest php frameworks to learn out there. Dont even talk about codeigniter, I know it is cool but nah, it is not it.
WHAT IS REQUIRED?
All you require is basic knowledge of php/mysql and a local LAMP server.
HOW DO I GET IT?
You need to take a stroll down here https://laravel.com/docs/5.8/eloquent
You can learn programming in many ways, by reading articles, by watching videos, by reading books.
You can get thousands of videos on any programming topic on youtube. And you can also learn a lot on sites like w3schools, lynda and others.
You can even go for online courses on codecademy, udemy and the likes.
Whatever the language, just get started today!!