PHPackages                             prokerala/astrology-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. prokerala/astrology-sdk

ActiveLibrary[API Development](/categories/api)

prokerala/astrology-sdk
=======================

Prokerala.com Astrology API Client Library for PHP.

v1.5.2(1mo ago)2610.0k22[1 PRs](https://github.com/prokerala/astrology-sdk/pulls)MITPHPPHP &gt;=8.0

Since May 3Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/prokerala/astrology-sdk)[ Packagist](https://packagist.org/packages/prokerala/astrology-sdk)[ RSS](/packages/prokerala-astrology-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (26)Versions (34)Used By (0)

Getting Started with Prokerala Astrology API
============================================

[](#getting-started-with-prokerala-astrology-api)

Prokerala Astrology SDK provides convenient access to Prokerala Astrology API for applications developed in PHP. [Prokerala API](https://api.prokerala.com) integration helps you generate custom [horoscope](https://api.prokerala.com/demo/kundli.php), perform [horoscope matching](https://api.prokerala.com/demo/kundli-matching.php), check [mangal dosha](https://api.prokerala.com/demo/mangal-dosha.php), [panchang](https://api.prokerala.com/demo/panchang.php) and [much more](https://api.prokerala.com/demo).

> We have open sourced the code for our [API demo](https://api.prokerala.com/demo/) at [prokerala/astrology-api-demo](https://github.com/prokerala/astrology-api-demo).

Requirements
------------

[](#requirements)

PHP needs to be a minimum version of PHP 8.0

Installation
------------

[](#installation)

> **If you prefer to work with the JSON response directly, please checkout our dependency free [minimal PHP Client example](https://github.com/prokerala/astrology-api-client-example/tree/master/php) that calls the API directly.**

### Using composer (recommended)

[](#using-composer-recommended)

This is the recommended method for installation of the SDK.

#### Quick Installation

[](#quick-installation)

If you have `composer` already installed, and just want to get started quickly, the following command will install the SDK and its dependencies:

```
composer require prokerala/astrology-sdk:^1.0 nyholm/psr7 guzzlehttp/guzzle symfony/cache
```

That's it. The SDK is now ready to use. You can skip to the **Usage** section below.

#### Detailed Instructions

[](#detailed-instructions)

If you do not have `composer` already installed, you can install it with the following command on \*nix systems.

```
curl -sS https://getcomposer.org/installer | php
```

If you are on Windows, follow the official documentation at [getcomposer.org](https://getcomposer.org/download/).

The current version of the SDK no longer ships with an HTTP client, instead depends on external implementations of `PSR-17` ([HTTP Message factory](https://www.php-fig.org/psr/psr-17/)) and `PSR-18` ([HTTP client](https://www.php-fig.org/psr/psr-18/)). You may choose any implementation of [PSR-17](https://packagist.org/providers/psr/http-factory-implementation) and [PSR-18](https://packagist.org/providers/php-http/client-implementation), for example, the following command installs `nyholm/psr7` for `PSR-17` and Guzzle HTTP client for `PSR-18`.

```
composer require nyholm/psr7 guzzlehttp/guzzle
```

Optionally, you can pass an implementation of `PSR-16` Simple Cache interface for caching the access token and responses. As before, you can choose any implementation of [PSR-16](https://packagist.org/providers/psr/simple-cache-implementation). The following command will install `symfony/cache`.

```
composer require symfony/cache
```

Now that you have all the dependencies installed, install the SDK by running the following command.

```
composer require prokerala/astrology-sdk:^1.0
```

### Manual Installation

[](#manual-installation)

If you are not using composer, download the latest release from the releases section. You should download the zip file. After that include autoload.php in your application and you can use the API as usual.

For further help, Please visit our [documentation](https://api.prokerala.com/docs)

Usage
-----

[](#usage)

This SDK is powering our API demo page. The source code of the demos are open source and available on a separate [GitHub repostiory](https://github.com/prokerala/astrology-api-demo).

```
