This script can be used to auto-post to Facebook groups using graph API.
Post updates to buffer using this library – https://github.com/thewebguy/bufferapp-php details documentation about the api is available from https://buffer.com/developers/api
Doing a regular file_get_contents with gist API will return forbidden to allow the connection the user agent should be passed with the request.
Using an API from http://www.ipgp.net/ this snippet demonstrates getting a city from an IP address pass the IP address in a var called $ip and the API key in a var called $apikey. If the session has not been created then a lookup is done and the city is added to a session.