Test Ar-PHP Functionality Online

header line!
Test PHP Function







Ar-PHP Manual

method getQibla [line 601]

float getQibla( )

Determine Qibla direction using basic spherical trigonometric formula



Tags:

return:  Qibla Direction (from the north direction) in degrees
author:  S. Kamal Abdali <k.abdali@acm.org>
author:  Khaled Al-Sham'aa <khaled@ar-php.org>
source:  http://www.patriot.net/users/abdali/ftp/qibla.pdf
access:  public


Example
  1.      date_default_timezone_set('UTC');
  2.  
  3.      include('./I18N/Arabic.php');
  4.      $obj new I18N_Arabic('Salat');
  5.  
  6.      $obj->setLocation(33.513,36.292,2);
  7.      $obj->setDate(date('j')date('n')date('Y'));
  8.  
  9.      $times $obj->getPrayTime();
  10.  
  11.      echo '<b>Damascus, Syria</b><br />';
  12.      echo date('l F j, Y').'<br /><br />';
  13.  
  14.      echo "<b class=hilight>Imsak:</b> {$times[8]}<br />";
  15.      echo "<b class=hilight>Fajr:</b> {$times[0]}<br />";
  16.      echo "<b class=hilight>Sunrise:</b> {$times[1]}<br />";
  17.      echo "<b class=hilight>Zuhr:</b> {$times[2]}<br />";
  18.      echo "<b class=hilight>Asr:</b> {$times[3]}<br />";
  19.      echo "<b class=hilight>Sunset:</b> {$times[6]}<br />";
  20.      echo "<b class=hilight>Maghrib:</b> {$times[4]}<br />";
  21.      echo "<b class=hilight>Isha:</b> {$times[5]}<br />";
  22.      echo "<b class=hilight>Midnight:</b> {$times[7]}<br />";
Popular
Recent
Links
Ads!
footer line!

No Software Patents! General Public License

Home | Twitter | Blog | Contact

Copyright © 2006 - 2016 Khaled Al-Sham'aa