This is PHP client to consume PDF API
You can visit https://www.astrologyapi.com/ to get the astrology API key to be used for your websites or mobile applications.
-
Copy PdfClient.php class file to your local or server file system
-
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/ -
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.
-
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