PHP Classes

PHP Muslim Salat Times Calculation: Calculate muslim prayer times in any world city

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 166 All time: 8,890 This week: 79Up
Version License PHP version Categories
salatclass 1GNU General Publi...5Algorithms, PHP 5, Geography


This package is specific mainly for applications used in Saudi Arabia Saudi Arabia .

This class can calculate muslim prayer times in any world city.

It can take the geographic coordinates, time zone and twilight values of a given city and calculates the times that pray time should occur.

The class can calculate pray times for a specific day and returns an array of the 5 pray times for that day.

Picture of KHALID
Name: KHALID <contact>
Classes: 1 package by
Country: Morocco Morocco
Age: 43
All time rank: 424314 in Morocco Morocco
Week rank: 275 Up3 in Morocco Morocco Up



//$city array($name, $latitude, $longitude, $time_zone, $Fajr_twilight, $Isha_twilight, $asr_hanafi)
$city = array("Tanger", "35.7847" , "-5.8128", 0, -19.5, -17.5, false);

//Minutes to add/remove frm calcilations for more accuracy, if any. array($Fajr, $Dhohr, $Asr, $Maghrib, $Isha)
$mintoadd = array(0,0,0,0,0);

//Date to calculae for, default today array($year, $month, $day)
$DayToCalculate = array(date('Y'), date('m'), date('d'));

$salat = new SalatTimes($city, $mintoadd, $DayToCalculate);

$tm = $salat->calculate();
  for (
$i=0; $i < 5 ; $i++)
$tm[$i] . '<br>';


  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example Example file
Plain text file salatClass.class.php Class Main salat class

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:8,890
This week:79Up