Git Product home page Git Product logo

alquran-api-client-php's Introduction

CircleCI

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.

alquran-api-client-php's People

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.