: How can I run a background PHP script on a hosting account like godaddy? I need to run a PHP script 24x7 on the server I'll be hosting my website on (Probably Godaddy). The PHP script's
I need to run a PHP script 24x7 on the server I'll be hosting my website on (Probably Godaddy). The PHP script's job is to open a socket and wait for incoming connections. Once a connection is established, it receives some data from 'Somewhere' and pushes it to a database. The data from this database will be constantly accessed by my index.php and will be used accordingly having some particular frequency.
The code is all ready and is working perfectly on my LAN using WAMP. But I am absolutely clueless on going about doing this in hosting accounts. I am guessing SSH, cron and cPanel is the way but no idea on how to do it and connect. Please elaborate the entire process and suggest some readings.
More posts by @Alves908
1 Comments
Sorted by latest first Latest Oldest Best
Many hosting companies have in their terms and conditions bans on any background processes which just sit there waiting for connections, additionally they firewalls servers against incoming connections on ports not used as standard on the server for what they believe the server should be used for. As I recall GoDaddy has this restriction on all shared and semi-shared hosting services and only allows this on virtual servers or dedicated servers. To do what you are wanting to do you would need to have a virtual server or dedicated server hosting account which will give you a greater level of access to the server itself and will avoid the strict restrictions applied to shared servers.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2025 All Rights reserved.