https://github.com/islamic-network/alquran-api-client-php
A PHP API Client for the AlQuran.cloud REST API
https://github.com/islamic-network/alquran-api-client-php
quran quran-api-client
Last synced: 7 months ago
JSON representation
A PHP API Client for the AlQuran.cloud REST API
- Host: GitHub
- URL: https://github.com/islamic-network/alquran-api-client-php
- Owner: islamic-network
- License: gpl-3.0
- Created: 2016-05-16T10:19:11.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-04-22T08:26:43.000Z (about 2 years ago)
- Last Synced: 2024-07-07T04:46:43.982Z (12 months ago)
- Topics: quran, quran-api-client
- Language: PHP
- Size: 677 KB
- Stars: 10
- Watchers: 4
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ
[](https://circleci.com/gh/islamic-apps/alquran-api-client-php)
[](https://github.com/islamic-network/alquran-api-client-php/releases)

[](https://github.com/islamic-network/alquran-api-client-php/blob/master/LICENSE)### AlQuran Cloud API Client (PHP)
This is a PHP API client that uses the rest API at alquran.cloud to fetch Quran Ayahs, Surahs Juzs or the entire Quran..### Installation
The API Client is a composer package. To use it, you need to run the following:
```
composer require alquran/api-client
```### Usage
#### Instantiate the Client
```
$t = new \AlQuranCloud\ApiClient\Client();
```#### Getting an Ayah
To get a single ayah, use:
```
$t->ayah(765); // This will return Ayah 765
$t->ayah(765, 'en.pickthall'); // This will return Ayah 765 with Marmaduke Pickthall's English translation
$t->ayah('2:255'); // This will return Surah 2, Ayah 255 (which is Ayat Al Kursi)
```#### Getting a Surah
To get a surah, use:
```
$t->surah(36); // This will return Surah Yaseen
$t->surah(36, 'en.asad'); // This will return Surah Yaseen with Muhammad Asad's English translation
```#### Getting a Juz
To get a juz, use:
```
$t->juz(30); // This will return Juz 30 (there are only 30!)
```#### Getting Editions, Searching and more...
Please see the complete documentation in docs/index.html (Clone the repo and open the file in a browser).### Authors and Contributors
Meezaan-ud-Din Abdu Dhil-Jalali Wal-Ikram (@meezaan).### Support or Contact
For support, please visit http://alquran.cloud/api or http://alquran.cloud/contact.