Skip to content

Latest commit

 

History

History
40 lines (31 loc) · 1.25 KB

README.md

File metadata and controls

40 lines (31 loc) · 1.25 KB

PDF-API-PHP-Client

This is PHP client to consume PDF API

Where to get API Key

You can visit https://www.astrologyapi.com/ to get the astrology API key to be used for your websites or mobile applications.

How to Use

  1. Copy PdfClient.php class file to your local or server file system

  2. Instantiate PdfClient class as follows as follows -

    $clientInstance = new PdfClient($userId, $apiKey);

    Replace $userId and $apiKey with your id and keys respectively. You can get the API key details from https://www.astrologyapi.com/

  3. Call the api as follows:

    $PdfResponse = $clientInstance->call($date, $month, $year, $hour, $min, $lat, $lon, $tzone);

    View test.php for more details about calling PDF API.

  4. The $PdfResponse will be a JSON encoded data returned as an API response. It would contain the response status and link to PDF .

    [
        {
            "status" : true, // true or false
            "pdf_url" : "http://ec2-52-58-178-221.eu-central-1.compute.amazonaws.com/pdfs/pdf-1465733471262.pdf"
        }
    ]

For PDF API documentation, visit - https://www.astrologyapi.com/docs/pdf-docs.php