require_once 'vendor/autoload.php'; use Abraham\TwitterOAuth\TwitterOAuth; $connection = new TwitterOAuth('consumer_key', 'consumer_secret', 'access_token', 'access_token_secret'); $followers = $connection->get('followers/list', array('screen_name' => 'twitter')); print_r($followers);
require_once 'vendor/autoload.php'; use GuzzleHttp\Client; $client = new Client(); $response = $client->get('https://maps.googleapis.com/maps/api/geocode/json', [ 'query' => [ 'address' => '1600 Amphitheatre Parkway, Mountain View, CA', 'key' => 'api_key' ] ]); $data = json_decode($response->getBody(), true); print_r($data['results']);In this example, we use the GuzzleHttp library to create a client for making HTTP requests. We then call the `get` method, specifying the API endpoint and any necessary parameters to retrieve geolocation data for the address provided. We then decode the response body using `json_decode` and print out the relevant results. Package library: `abraham/twitteroauth` and `guzzlehttp/guzzle`