If you are using Apache with your PHP then all you need to do make sure your Apache starts automatically. There are many ways of doing this depending on your distro as well. Just google for the various options and pick the one you prefer.
Thanks for your effort. But this is something different from i want..
I may not be clear in specifying what i want.
I have a website and it should run 24X7 (for this what you gave is a perfect solutions. Thanks.)
In the website , itself, i'm having a program may be an API, that has to be run indepedent of the status of the website. (i.e the specific program need not to use http connections and it has nothing to do on the client side.)
That specific API should be running on the server all the time (something like firewall..)
Can i write a program and make them running..?
I think it may be somewhat clear now.
Thanks again