Cgi dating online script service
For example, to update the content of a website, to remove expired articles, to send out e-mails on a given date and a lot more.While some may think that this is were PHP is doomed, I will show you how it’s done. This could cause a lot of extra overhead produced by the script.If your PHP is installed using the Apache module, the approach is a little different.by Till Lots of programmers like PHP for its ability to code and develop web applications fast. We have recently did post on caching with php to make your web sites faster.Today we want to cover another topic many developers are puzzled about, “How to run PHP Scripts with crontab?” Cron is normally available on all Unix and Linux distributions; if you cannot access it, contact your root or server administrator.It is a daemon which allows you to schedule a program or script for a specific time of execution.
The first solution that came to my mind was to run the script directly from my browser (e.g. Since I need to run my script on a regular basis, I squashed that idea. If you get a lot of traffic, the script is executed 1000 times a day and adds a lot of usage on the database and the server.On the other hand, if you do not get a lot of traffic, or people tend to access your site over another file, this will not work out as well. You will need to find out the answer to the following question, Is my PHP installed as CGI or as an Apache module?If the answer to the question above is “CGI” then you need to add a line to your PHP script.It has to be the first line of your script and must contain your server’s PHP executable location: Now you are all set!If you need to run the script on a regular intervals, this is not a solution. To find out do the following: Create a new file, name it , you have it running as an Apache module.
Let’s suppose you either know what cron is or have read about it using the link above. These days most PHP installations are done as a Apache web server modules.