To solve situations where CRON starts another copy before the current one finishes. At the top of the CRON job use: //check if already running $buff = file_get_contents(“cron_stat.txt”); if($buff == 1) { die(); } //set a running flag; file_put_contents(“cron_stat.txt”,”1″); …… …… …… When the CRON will run for the first time “cron_stat.txt” will be blank… Continue reading Prevent CRON from overlapping
Author: Manish
Website Load testing
Using Apache JMeter Full article can be found here : http://jmeter.apache.org/usermanual/build-web-test-plan.html Wapt Pro 30 days trial available. 20 users simulation in the trial version. Website : http://www.loadtestingtool.com/download.shtml LoadImpact Website Free online testing. 50 users simulation. Website : http://loadimpact.com/
PayPal form submit through PHP
PayPal Payments Standard is a quick and easy way to integrate Paypal with any website. Normally the method uses a form to send the various details of the transaction to Paypal server. The below code can simulate the form submission through PHP. With this no form is required. The details of transaction pulled from DB,… Continue reading PayPal form submit through PHP
Distance between two Latitudes and Longitudes – Part 3
This series is about code in various languages that will calculate the distance between two latitudes and longitudes. This article is for the C code. Code courtsey : GeoDataSource /*::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/ /*:: :*/ /*:: This routine calculates the distance between two :*/ /*:: points (given the latitude/longitude of those points). :*/ /*:: It is being used… Continue reading Distance between two Latitudes and Longitudes – Part 3
Distance between two Latitudes and Longitudes – Part 2
This series is about code in various languages that will calculate the distance between two latitudes and longitudes. This article is for the Javascript code. Code courtsey : GeoDataSource /*::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/ /*:: :*/ /*:: This routine calculates the distance between two :*/ /*:: points (given the latitude/longitude of those points). :*/ /*:: It is being used… Continue reading Distance between two Latitudes and Longitudes – Part 2