{"id":13549328,"url":"https://github.com/anthony-mills/google-places","last_synced_at":"2026-01-10T12:53:21.130Z","repository":{"id":1705093,"uuid":"2434140","full_name":"anthony-mills/google-places","owner":"anthony-mills","description":"PHP wrapper class for the Google Places API","archived":true,"fork":false,"pushed_at":"2018-03-04T20:25:33.000Z","size":80,"stargazers_count":82,"open_issues_count":7,"forks_count":48,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-07T02:17:10.771Z","etag":null,"topics":["geolocation","google-places","navigation","php","php-wrapper"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anthony-mills.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-09-22T01:33:09.000Z","updated_at":"2022-12-03T04:12:33.000Z","dependencies_parsed_at":"2022-09-03T21:30:23.209Z","dependency_job_id":null,"html_url":"https://github.com/anthony-mills/google-places","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthony-mills%2Fgoogle-places","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthony-mills%2Fgoogle-places/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthony-mills%2Fgoogle-places/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthony-mills%2Fgoogle-places/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anthony-mills","download_url":"https://codeload.github.com/anthony-mills/google-places/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246905167,"owners_count":20852812,"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":["geolocation","google-places","navigation","php","php-wrapper"],"created_at":"2024-08-01T12:01:20.732Z","updated_at":"2025-12-17T06:34:36.755Z","avatar_url":"https://github.com/anthony-mills.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"PHP wrapper for using the Google Places API.\nBased on the GPLV2 class created by [André Nosalsky](http://andrenosalsky.com/blog/2011/google-places-api-php-class/).\n\n## BASIC USAGE ##\n\n```php\n\u003c?php\nrequire_once('googlePlaces.php');\n\n$apiKey       = 'Your Google Places API Key';\n$googlePlaces = new googlePlaces($apiKey);\n\n// Set the longitude and the latitude of the location you want to search near for places\n$latitude   = '-33.8804166';\n$longitude = '151.2107662';\n$googlePlaces-\u003esetLocation($latitude . ',' . $longitude);\n\n$googlePlaces-\u003esetRadius(5000);\n$results = $googlePlaces-\u003esearch(); //\n```\n\nA search query can be run again for a fresh set of results using the \"paging\" functionality that was recently added to the API.\n\nTo use simply perform a place search as per normal, and then call the repeat method afterward with the 'next_page_token' element returned by the first search eg. \n\n```php\n$firstSearch = $googlePlaces-\u003eSearch();\n\nif (!empty($firstSearch['next_page_token'])) {\n\t$secondSearch = $googlePlaces-\u003erepeat($firstSearch['next_page_token']);\n}\n```\nThe repeat function can be used twice for each search function allowing up to 60 individual results for each search request. \n\n### Proxy ###\nWhen you use deployment server that changes IP address each time you run a new build, you may want to funnel your request through only one IP address. Therefore, you can allow only that single IP in Google Developers Console `server key`. For that purpose you should setup proxy to route your Google Maps API requests through that.\n\nWhen your proxy is set up, you can use it with googlePlaces.\n\n```php\n$proxy = [];\n$proxy[\"host\"] = \"your host name\";\n$proxy[\"port\"] = 8080;\n$proxy[\"username\"] = \"your username\"; //optional with password\n$proxy[\"password\"] = \"your password\";\n$apiKey       = 'Your Google Places API Key';\n$googlePlaces = new googlePlaces($apiKey, $proxy);\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthony-mills%2Fgoogle-places","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanthony-mills%2Fgoogle-places","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthony-mills%2Fgoogle-places/lists"}