user checkins

Grab all the users checkins.

$api_checkins = 'https:api.foursquare.comv2usersselfcheckins?oauth_token=' . $token;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $api_checkins);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$foursquare_checkins_base = curl_exec($ch);
curl_close($ch);

$foursquare_checkins = json_decode($foursquare_checkins_base, true);

foreach ($foursquare_badges['response']['badges'] as $badge){
	
	$badgeId = $badge['badgeId'];
	$name = $badge['name'];
	$description = $badge['description'];
	$badgeimg = $badge['image'];
	
	$prefix = $badgeimg['prefix'];
	$size = '114';
	$imgend = $badgeimg['name'];
	$imgurl = $prefix . $size . $imgend;
}