{"id":22120520,"url":"https://github.com/islamic-network/aladhan-api-client-php","last_synced_at":"2025-07-25T12:33:43.818Z","repository":{"id":37849976,"uuid":"49197164","full_name":"islamic-network/aladhan-api-client-php","owner":"islamic-network","description":"PHP Client for Prayer Times using the AlAdhan.com API","archived":false,"fork":false,"pushed_at":"2023-03-09T19:56:43.000Z","size":136,"stargazers_count":10,"open_issues_count":0,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-26T03:21:02.529Z","etag":null,"topics":["aladhan","geolocation","islamic-prayer-times","php-client","prayer-times","prayer-times-app"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/islamic-network.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-07T10:10:43.000Z","updated_at":"2024-05-28T09:51:15.000Z","dependencies_parsed_at":"2022-06-22T23:07:38.551Z","dependency_job_id":null,"html_url":"https://github.com/islamic-network/aladhan-api-client-php","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/islamic-network%2Faladhan-api-client-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/islamic-network%2Faladhan-api-client-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/islamic-network%2Faladhan-api-client-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/islamic-network%2Faladhan-api-client-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/islamic-network","download_url":"https://codeload.github.com/islamic-network/aladhan-api-client-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227576613,"owners_count":17788546,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aladhan","geolocation","islamic-prayer-times","php-client","prayer-times","prayer-times-app"],"created_at":"2024-12-01T14:27:17.843Z","updated_at":"2024-12-01T14:27:18.449Z","avatar_url":"https://github.com/islamic-network.png","language":"PHP","readme":"## بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ\n\n[![](https://img.shields.io/github/release/islamic-network/aladhan-api-client-php.svg)](https://github.com/islamic-network/aladhan-api-client-php/releases)\n![](https://img.shields.io/packagist/dt/aladhan/api-client.svg)\n[![](https://img.shields.io/github/license/islamic-network/aladhan-api-client-php.svg)](https://github.com/islamic-network/aladhan-api-client-php/blob/master/LICENSE)\n\n### AlAdhan Prayer Times API Client (PHP)\nThis is a PHP API client that uses the rest API at aladhan.com to generate prayer times for Islamic prayers.\n\nFor more information, please visit http://aladhan.com/prayer-times-api.\n\nThis client is used to build various parts of AlAdhan.com, including apps https://aladhan.com/ramadan-prayer-times/2017/London/UK and https://aladhan.com/ramadan-calendar.\n\n### Installation\nThe API Client is a composer package. To use it, you need to run the following:\n```\ncomposer require aladhan/api-client\n```\n\n### Usage\n\n#### Generating Prayer Times for a Given Day\nTo get prayer times for a given day, use:\n```\n$t = new \\AlAdhanApi\\Times($unix_timestamp , $timezone, $latitude, $longitude, $method);\n$times = $t-\u003eget();\n```\n\nYou can also do this by city:\n\n```\n$t = new \\AlAdhanApi\\TimesByCity('Dubai' , 'United Arab Emirates', $timestamp);\n$times = $t-\u003eget();\n```\nThe $unix_timestamp is a timestamp from the day you want prayer times for. Valid $timezones are listed @ http://php.net/manual/en/timezones.php. See the Getting Co-ordinates below for getting $latitude and $longitude. The $method options can be seen in the Methods class.\n\nThis will return the JSON output as shown on @ http://aladhan.com/rest-api#endpointTimings.\n\n#### Generating prayer times for a given month:\nTo get a list of prayer times for an entire month in a given year, use:\n```\n$c = new \\AlAdhanApi\\Calendar($month, $year, $timezone, $latitude, $longitude);\n$calendar = $c-\u003eget();\n```\n\nYou can also do this by city:\n```\n$c = new \\AlAdhanApi\\CalendarByCity('Dubai', 'United Arab Emirates', $month, $year);\n$calendar = $c-\u003eget();\n```\n\n### Getting Latitude and Longitude Co-ordinates\nThere's also a Location class included with this API that uses Google's geocoding API to convert an address into co-ordinates. Google's API has a free limit (but you need to be making thousands of requests a day for this to kick in), and then they'll cut you off unless you get a license. In any case, this should be sufficient for more people. If you will be making millions of requests, there are other ways to do this. Just get in touch if you need help.\n\n```\n$l = new \\AlAdhanApi\\Location('Sultanahmet Mosque, Istanbul, Turkey'); // Use a location of your choice here.\n$latitude = $l-\u003elatitude;\n$longitude = $l-\u003elongitude;\n```\nYou can now use the above values with the Times or Calendar class to get your prayer times.\n\n### Authors and Contributors\nMeezaan-ud-Din Abdu Dhil-Jalali Wal-Ikram (@meezaan).\n\n### Support or Contact\nFor support, please visit http://aladhan.com/prayer-times-api or http://aladhan.com/contact.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fislamic-network%2Faladhan-api-client-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fislamic-network%2Faladhan-api-client-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fislamic-network%2Faladhan-api-client-php/lists"}