2017 © Pedro Pelรกez
 

library api-client

AlAdhan.com REST API Bundle

image

aladhan/api-client

AlAdhan.com REST API Bundle

  • Sunday, February 11, 2018
  • by meezaan
  • Repository
  • 1 Watchers
  • 4 Stars
  • 114 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 13 Versions
  • 5 % Grown

The README.md

ุจูุณู’ู…ู ุงู„ู„ู‡ู ุงู„ุฑูŽู‘ุญู’ู…ูฐู†ู ุงู„ุฑูŽู‘ุญููŠู’ู…ู

, (*1)

AlAdhan Prayer Times API Client (PHP)

This is a PHP API client that uses the rest API at aladhan.com to generate prayer times for Islamic prayers., (*2)

For more information, please visit http://aladhan.com/prayer-times-api., (*3)

This client is used to build various parts of AlAdhan.com, including apps https://aladhan.com/ramadan-prayer-times/2017/London/UK and https://aladhan.com/ramadan-calendar., (*4)

Installation

The API Client is a composer package. To use it, you need to run the following:, (*5)

composer require aladhan/api-client

Usage

Generating Prayer Times for a Given Day

To get prayer times for a given day, use:, (*6)

$t = new \AlAdhanApi\Times($unix_timestamp , $timezone, $latitude, $longitude, $method);
$times = $t->get();

You can also do this by city:, (*7)

$t = new \AlAdhanApi\TimesByCity('Dubai' , 'United Arab Emirates', $timestamp);
$times = $t->get();

The $unix_timestamp is a timestamp from the day you want prayer times for. Valid $timezones are listed @ http://php.net/manual/en/timezones.php. See the Getting Co-ordinates below for getting $latitude and $longitude. The $method options can be seen in the Methods class., (*8)

This will return the JSON output as shown on @ http://aladhan.com/rest-api#endpointTimings., (*9)

Generating prayer times for a given month:

To get a list of prayer times for an entire month in a given year, use:, (*10)

$c = new \AlAdhanApi\Calendar($month, $year, $timezone, $latitude, $longitude);
$calendar = $c->get();

You can also do this by city:, (*11)

$c = new \AlAdhanApi\CalendarByCity('Dubai', 'United Arab Emirates', $month, $year);
$calendar = $c->get();

Getting Latitude and Longitude Co-ordinates

There's also a Location class included with this API that uses Google's geocoding API to convert an address into co-ordinates. Google's API has a free limit (but you need to be making thousands of requests a day for this to kick in), and then they'll cut you off unless you get a license. In any case, this should be sufficient for more people. If you will be making millions of requests, there are other ways to do this. Just get in touch if you need help., (*12)

$l = new \AlAdhanApi\Location('Sultanahmet Mosque, Istanbul, Turkey'); // Use a location of your choice here.
$latitude = $l->latitude;
$longitude = $l->longitude;

You can now use the above values with the Times or Calendar class to get your prayer times., (*13)

Authors and Contributors

Meezaan-ud-Din Abdu Dhil-Jalali Wal-Ikram (@meezaan)., (*14)

Support or Contact

For support, please visit http://aladhan.com/prayer-times-api or http://aladhan.com/contact., (*15)

The Versions

11/02 2018

dev-master

9999999-dev

AlAdhan.com REST API Bundle

  Sources   Download

The Requires

 

The Development Requires

by Meezaan-ud-Din Abdu Dhil-Jalali Wal-Ikram

11/02 2018

1.10

1.10.0.0

AlAdhan.com REST API Bundle

  Sources   Download

The Requires

 

The Development Requires

by Meezaan-ud-Din Abdu Dhil-Jalali Wal-Ikram

25/10 2017

1.9

1.9.0.0

AlAdhan.com REST API Bundle

  Sources   Download

The Requires

 

The Development Requires

by Meezaan-ud-Din Abdu Dhil-Jalali Wal-Ikram

25/10 2017

dev-api_independence

dev-api_independence

AlAdhan.com REST API Bundle

  Sources   Download

The Requires

 

The Development Requires

by Meezaan-ud-Din Abdu Dhil-Jalali Wal-Ikram

07/06 2017

1.7

1.7.0.0

AlAdhan.com REST API Bundle

  Sources   Download

The Requires

 

The Development Requires

by Meezaan-ud-Din Abdu Dhil-Jalali Wal-Ikram

07/06 2017

1.8

1.8.0.0

AlAdhan.com REST API Bundle

  Sources   Download

The Requires

 

The Development Requires

by Meezaan-ud-Din Abdu Dhil-Jalali Wal-Ikram

07/06 2017

1.6

1.6.0.0

AlAdhan.com REST API Bundle

  Sources   Download

The Requires

 

The Development Requires

by Meezaan-ud-Din Abdu Dhil-Jalali Wal-Ikram

07/06 2017

1.5

1.5.0.0

AlAdhan.com REST API Bundle

  Sources   Download

The Requires

 

The Development Requires

by Meezaan-ud-Din Abdu Dhil-Jalali Wal-Ikram

29/05 2017

1.4

1.4.0.0

AlAdhan.com REST API Bundle

  Sources   Download

The Requires

 

The Development Requires

by Meezaan-ud-Din Abdu Dhil-Jalali Wal-Ikram

29/05 2017

1.3

1.3.0.0

AlAdhan.com REST API Bundle

  Sources   Download

The Requires

 

The Development Requires

by Meezaan-ud-Din Abdu Dhil-Jalali Wal-Ikram

04/05 2017

v1.2

1.2.0.0

AlAdhan.com REST API Bundle

  Sources   Download

The Requires

 

The Development Requires

by Meezaan-ud-Din Abdu Dhil-Jalali Wal-Ikram

03/10 2016

v1.1

1.1.0.0

AlAdhan.com REST API Bundle

  Sources   Download

The Requires

 

The Development Requires

by Meezaan-ud-Din Abdu Dhil-Jalali Wal-Ikram

28/07 2016

v1.0.0

1.0.0.0

AlAdhan.com REST API Bundle

  Sources   Download

The Requires

 

The Development Requires

by Meezaan-ud-Din Abdu Dhil-Jalali Wal-Ikram