Example Code:
<?php
date_default_timezone_set('UTC');
include('I18N_Arabic.php');
$Arabic = new I18N_Arabic('Salat');
$Arabic->setLocation(33.513, 36.292, 3);
$Arabic->setDate(date('j'), date('n'), date('Y'));
$times = $Arabic->getPrayTime();
echo "<b>Damascus, Syria</b> ".date('l F j, Y')."<br /><br />";
echo "<b>Fajr:</b> {$times[0]}<br />";
echo "<b>Sunrise:</b> {$times[1]}<br />";
echo "<b>Zuhr:</b> {$times[2]}<br />";
echo "<b>Asr:</b> {$times[3]}<br />";
echo "<b>Maghrib:</b> {$times[4]}<br />";
echo "<b>Isha:</b> {$times[5]}<br />";
$direction = $Arabic->getQibla();
echo "<b>Qibla Direction (from the north direction):</b> $direction<br />";
?>
Total execution time is 0.039484024047852 seconds
Amount of memory allocated to this script is 336904 bytes
Names of included or required files:
- /srv/www/vhosts/ar-php.org/httpdocs/I18N_Arabic/I18N_Arabic/Examples/Salat.php
- /srv/www/vhosts/ar-php.org/httpdocs/I18N_Arabic/I18N_Arabic.php
- /srv/www/vhosts/ar-php.org/httpdocs/I18N_Arabic/I18N_Arabic/I18N_Arabic_Salat.php
Related Class Documentation